Skip to content

Commit a61e494

Browse files
committed
style: format entire repo with prettier
One-time repo-wide prettier pass over the remaining files (docs content, app, components, scripts). Formatting only; no content or behavior changes.
1 parent decbc06 commit a61e494

92 files changed

Lines changed: 1818 additions & 1642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎INTEGRATOR-EXAM-ANSWER-KEY.md‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ all **3 practical tasks** accepted.
1616

1717
## Section 1 — Multiple choice key
1818

19-
| Q | Answer | Note |
20-
|---|---|---|
21-
| Q1 | **B** | Access token in `Authorization`. ID token is for the app to read. |
22-
| Q2 | **B** | `openid` makes it an OIDC request → ID token returned. |
23-
| Q3 | **C** | PKCE replaces the secret for public clients. |
24-
| Q4 | **B** | Tenant resolved by request **host**. |
25-
| Q5 | **B** | No `code_verifier` → can't complete the exchange. |
26-
| Q6 | **C** | Client Credentials + `@faable/auth-sdk` (no user). |
27-
| Q7 | **C** | M2M with empty scope → full catalog (Auth0 parity). |
28-
| Q8 | **B** | Audience isn't `faable:management:<account_id>`. |
29-
| Q9 | **C** | Payload readable; signature verified locally via JWKS. |
30-
| Q10 | **B** | Prod callback URL not allow-listed. |
31-
| Q11 | **C** | Audience is not one of the four building blocks (Account, Connections, Clients, Users/Teams). |
32-
| Q12 | **B** | `nonce` binds the ID token to this login (`state` is the CSRF one). |
19+
| Q | Answer | Note |
20+
| --- | ------ | --------------------------------------------------------------------------------------------- |
21+
| Q1 | **B** | Access token in `Authorization`. ID token is for the app to read. |
22+
| Q2 | **B** | `openid` makes it an OIDC request → ID token returned. |
23+
| Q3 | **C** | PKCE replaces the secret for public clients. |
24+
| Q4 | **B** | Tenant resolved by request **host**. |
25+
| Q5 | **B** | No `code_verifier` → can't complete the exchange. |
26+
| Q6 | **C** | Client Credentials + `@faable/auth-sdk` (no user). |
27+
| Q7 | **C** | M2M with empty scope → full catalog (Auth0 parity). |
28+
| Q8 | **B** | Audience isn't `faable:management:<account_id>`. |
29+
| Q9 | **C** | Payload readable; signature verified locally via JWKS. |
30+
| Q10 | **B** | Prod callback URL not allow-listed. |
31+
| Q11 | **C** | Audience is not one of the four building blocks (Account, Connections, Clients, Users/Teams). |
32+
| Q12 | **B** | `nonce` binds the ID token to this login (`state` is the CSRF one). |
3333

3434
## Section 2 — Short answer rubric (2 pts each)
3535

36-
**Q13 (ID vs access token).** Full marks if they state: ID token = *who the user is*,
37-
read by the app (identity claims, OIDC); access token = *what the bearer may do*, sent
36+
**Q13 (ID vs access token).** Full marks if they state: ID token = _who the user is_,
37+
read by the app (identity claims, OIDC); access token = _what the bearer may do_, sent
3838
to a resource server in `Authorization: Bearer`, scoped by `aud`/`scope`. 1 pt if they
3939
get the distinction but misassign the use (e.g. "send the ID token to APIs").
4040

‎app/(site)/[[...mdxPath]]/page.jsx‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { generateStaticParamsFor, importPage } from 'nextra/pages'
22
import { useMDXComponents as getMDXComponents } from '../../../mdx-components'
33
import { datesForMdxPath } from '../../_lib/last-modified'
4-
import { buildBreadcrumb, buildArticle, buildFaqPage } from '../../_lib/page-schema'
4+
import {
5+
buildArticle,
6+
buildBreadcrumb,
7+
buildFaqPage
8+
} from '../../_lib/page-schema'
59

610
export const generateStaticParams = generateStaticParamsFor('mdxPath')
711

@@ -15,20 +19,20 @@ export async function generateMetadata(props, parent) {
1519
return {
1620
...metadata,
1721
alternates: {
18-
canonical: `https://faable.com/docs/${path}`,
22+
canonical: `https://faable.com/docs/${path}`
1923
},
2024
openGraph: {
2125
...previousMetadata.openGraph,
2226
...metadata.openGraph,
2327
title: metadata.title,
2428
description: metadata.description,
25-
url: `https://faable.com/docs/${path}`,
29+
url: `https://faable.com/docs/${path}`
2630
},
2731
twitter: {
2832
...previousMetadata.twitter,
2933
...metadata.twitter,
3034
title: metadata.title,
31-
description: metadata.description,
35+
description: metadata.description
3236
}
3337
}
3438
}
@@ -57,15 +61,15 @@ export default async function Page(props) {
5761
title: metadata?.title,
5862
description: metadata?.description,
5963
published,
60-
modified,
64+
modified
6165
})
6266
const faqPage = metadata?.schema === 'faq' ? buildFaqPage(route) : null
6367
const schemas = [breadcrumb, article, faqPage].filter(Boolean)
6468

6569
const lastUpdated = modified.toLocaleDateString('en-US', {
6670
year: 'numeric',
6771
month: 'long',
68-
day: 'numeric',
72+
day: 'numeric'
6973
})
7074

7175
return (
@@ -81,7 +85,8 @@ export default async function Page(props) {
8185
<MDXContent {...props} params={params} />
8286
{mdxPath.length > 0 && (
8387
<p style={{ fontSize: '0.85rem', opacity: 0.55, marginTop: '3rem' }}>
84-
Last updated on <time dateTime={modified.toISOString()}>{lastUpdated}</time>
88+
Last updated on{' '}
89+
<time dateTime={modified.toISOString()}>{lastUpdated}</time>
8590
</p>
8691
)}
8792
</Wrapper>

‎app/(site)/layout.jsx‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Footer, Layout, Navbar } from "nextra-theme-docs";
2-
import { Head } from "nextra/components";
3-
import { getPageMap } from "nextra/page-map";
4-
import "nextra-theme-docs/style.css";
1+
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
2+
import 'nextra-theme-docs/style.css'
3+
import { Head } from 'nextra/components'
4+
import { getPageMap } from 'nextra/page-map'
55

66
const navbar = (
77
<Navbar
@@ -34,23 +34,23 @@ const navbar = (
3434
target="_blank"
3535
rel="noopener"
3636
style={{
37-
background: "#2563eb",
38-
color: "#fff",
39-
padding: "6px 14px",
37+
background: '#2563eb',
38+
color: '#fff',
39+
padding: '6px 14px',
4040
borderRadius: 6,
4141
fontWeight: 600,
4242
fontSize: 14,
43-
whiteSpace: "nowrap",
43+
whiteSpace: 'nowrap'
4444
}}
4545
>
4646
Start free
4747
</a>
4848
</Navbar>
49-
);
49+
)
5050
const footer = (
5151
<Footer>
5252
<span>
53-
{new Date().getFullYear()} ©{" "}
53+
{new Date().getFullYear()} ©{' '}
5454
<a
5555
href="https://faable.com?utm_source=docs&utm_medium=referral&utm_content=footer"
5656
rel="noopener"
@@ -61,7 +61,7 @@ const footer = (
6161
.
6262
</span>
6363
</Footer>
64-
);
64+
)
6565

6666
// Documentation pages render inside the Nextra theme chrome (navbar, sidebar,
6767
// footer). This lives in a (site) route group so standalone pages outside the
@@ -79,5 +79,5 @@ export default async function SiteLayout({ children }) {
7979
{children}
8080
</Layout>
8181
</>
82-
);
82+
)
8383
}

‎app/_lib/last-modified.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function sourceFileFor(route) {
1212
`${rel}.md`,
1313
`${rel}.mdx`,
1414
path.join(rel, 'index.md'),
15-
path.join(rel, 'index.mdx'),
15+
path.join(rel, 'index.mdx')
1616
]
1717
for (const candidate of candidates) {
1818
const abs = path.join(CONTENT_DIR, candidate)
@@ -31,15 +31,15 @@ function gitDates(file) {
3131
try {
3232
const out = execFileSync('git', ['log', '--format=%cI', '--', file], {
3333
cwd: process.cwd(),
34-
stdio: ['ignore', 'pipe', 'ignore'],
34+
stdio: ['ignore', 'pipe', 'ignore']
3535
})
3636
.toString()
3737
.trim()
3838
if (out) {
3939
const lines = out.split('\n')
4040
return {
4141
modified: new Date(lines[0]),
42-
published: new Date(lines[lines.length - 1]),
42+
published: new Date(lines[lines.length - 1])
4343
}
4444
}
4545
} catch {

‎app/_lib/llms.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SECTIONS = [
1010
{ prefix: '/deploy', title: 'Faable Deploy' },
1111
{ prefix: '/auth', title: 'Faable Auth' },
1212
{ prefix: '/cli', title: 'CLI' },
13-
{ prefix: '/platform', title: 'Platform & Policies' },
13+
{ prefix: '/platform', title: 'Platform & Policies' }
1414
]
1515

1616
// Recursively collect every page route from Nextra's page map.
@@ -33,7 +33,7 @@ function sourceFileFor(route) {
3333
`${rel}.md`,
3434
`${rel}.mdx`,
3535
path.join(rel, 'index.md'),
36-
path.join(rel, 'index.mdx'),
36+
path.join(rel, 'index.mdx')
3737
]
3838
for (const candidate of candidates) {
3939
const abs = path.join(CONTENT_DIR, candidate)
@@ -69,7 +69,7 @@ export async function collectPages() {
6969
const routes = [...collectRoutes(pageMap)]
7070

7171
const pages = routes
72-
.map((route) => {
72+
.map(route => {
7373
const file = sourceFileFor(route)
7474
if (!file) return null
7575
const raw = fs.readFileSync(file, 'utf8')
@@ -79,7 +79,7 @@ export async function collectPages() {
7979
url: `${SITE_URL}${route === '/' ? '' : route}`,
8080
title: meta.title || firstHeading(body) || route,
8181
description: meta.description || '',
82-
body: body.trim(),
82+
body: body.trim()
8383
}
8484
})
8585
.filter(Boolean)
@@ -89,11 +89,12 @@ export async function collectPages() {
8989
for (const { title } of SECTIONS) grouped.set(title, [])
9090

9191
for (const page of pages) {
92-
const section = SECTIONS.find((s) => page.route.startsWith(s.prefix))
92+
const section = SECTIONS.find(s => page.route.startsWith(s.prefix))
9393
grouped.get(section ? section.title : 'Overview').push(page)
9494
}
9595

96-
for (const list of grouped.values()) list.sort((a, b) => a.route.localeCompare(b.route))
96+
for (const list of grouped.values())
97+
list.sort((a, b) => a.route.localeCompare(b.route))
9798

9899
return grouped
99100
}

‎app/_lib/page-schema.js‎

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const publisher = {
88
'@type': 'Organization',
99
name: 'Faable',
1010
url: 'https://faable.com',
11-
logo: 'https://faable.com/assets/logo/Emblem.png',
11+
logo: 'https://faable.com/assets/logo/Emblem.png'
1212
}
1313

14-
const urlForRoute = (route) => `${SITE_URL}${route === '/' ? '' : route}`
14+
const urlForRoute = route => `${SITE_URL}${route === '/' ? '' : route}`
1515

1616
function humanize(slug) {
17-
return slug.replace(/[-_]/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
17+
return slug.replace(/[-_]/g, ' ').replace(/\b\w/g, c => c.toUpperCase())
1818
}
1919

2020
// schema.org BreadcrumbList from the page path. The leaf uses the real page
@@ -30,7 +30,7 @@ export function buildBreadcrumb(mdxPath, leafTitle) {
3030
const isLast = i === segments.length - 1
3131
items.push({
3232
name: isLast && leafTitle ? leafTitle : humanize(segment),
33-
url: `${SITE_URL}${acc}`,
33+
url: `${SITE_URL}${acc}`
3434
})
3535
})
3636

@@ -41,17 +41,23 @@ export function buildBreadcrumb(mdxPath, leafTitle) {
4141
'@type': 'ListItem',
4242
position: i + 1,
4343
name: item.name,
44-
item: item.url,
45-
})),
44+
item: item.url
45+
}))
4646
}
4747
}
4848

4949
// TechArticle for a docs page — gives AI engines and search a verifiable,
5050
// dated, attributed unit they can cite. dates are ISO strings.
51-
export function buildArticle({ route, title, description, published, modified }) {
51+
export function buildArticle({
52+
route,
53+
title,
54+
description,
55+
published,
56+
modified
57+
}) {
5258
if (!title) return null
5359
const url = urlForRoute(route)
54-
const iso = (d) => (d instanceof Date ? d.toISOString() : d)
60+
const iso = d => (d instanceof Date ? d.toISOString() : d)
5561
return {
5662
'@context': 'https://schema.org',
5763
'@type': 'TechArticle',
@@ -64,7 +70,7 @@ export function buildArticle({ route, title, description, published, modified })
6470
datePublished: iso(published),
6571
dateModified: iso(modified),
6672
author: publisher,
67-
publisher,
73+
publisher
6874
}
6975
}
7076

@@ -119,7 +125,7 @@ export function buildFaqPage(route) {
119125
mainEntity: faqs.map(({ question, answer }) => ({
120126
'@type': 'Question',
121127
name: question,
122-
acceptedAnswer: { '@type': 'Answer', text: answer },
123-
})),
128+
acceptedAnswer: { '@type': 'Answer', text: answer }
129+
}))
124130
}
125131
}

0 commit comments

Comments
 (0)