@tenphi/docs 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/schema.json +252 -10
- package/dist/{config-CmoSqvii.js → config-Ci9Nv0wQ.js} +163 -10
- package/dist/config-Ci9Nv0wQ.js.map +1 -0
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +1 -1
- package/dist/{content-Btz1o52C.js → content-XLQlJDnf.js} +221 -7
- package/dist/content-XLQlJDnf.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/markdown/index.d.ts +1 -1
- package/dist/{types-CH6E2v-J.d.ts → types-C-AgUcAb.d.ts} +63 -19
- package/dist/{types-CH6E2v-J.d.ts.map → types-C-AgUcAb.d.ts.map} +1 -1
- package/package.json +2 -2
- package/dist/config-CmoSqvii.js.map +0 -1
- package/dist/content-Btz1o52C.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-XLQlJDnf.js","names":["parseYaml","inside","parseYaml"],"sources":["../src/html/index.ts","../src/graph/openapi.ts","../src/npm/index.ts","../src/graph/index.ts","../src/validation/index.ts","../src/content/index.ts"],"sourcesContent":["import type { Root } from \"hast\";\nimport { fromHtml } from \"hast-util-from-html\";\nimport { defaultSchema, sanitize } from \"hast-util-sanitize\";\nimport { toHtml } from \"hast-util-to-html\";\nimport { visit } from \"unist-util-visit\";\n\nconst schema = {\n ...defaultSchema,\n strip: [\"script\", \"style\", \"iframe\", \"object\", \"embed\", \"template\"],\n protocols: {\n ...defaultSchema.protocols,\n href: [...(defaultSchema.protocols?.href ?? []), \"source\"],\n },\n attributes: {\n ...defaultSchema.attributes,\n \"*\":\n defaultSchema.attributes?.[\"*\"]?.filter(\n (attribute) =>\n typeof attribute !== \"string\" ||\n ![\n \"color\",\n \"bgColor\",\n \"align\",\n \"border\",\n \"cellPadding\",\n \"cellSpacing\",\n ].includes(attribute),\n ) ?? [],\n },\n};\n\n/** Sanitize raw Markdown HTML while preserving separate inline opening/closing tags. */\nexport async function sanitizeMarkup(\n html: string,\n rewrite: (url: string, kind: \"link\" | \"image\") => Promise<string>,\n): Promise<string> {\n const closing = /^<\\/([a-z][a-z\\d-]*)\\s*>$/i.exec(html.trim());\n if (closing) {\n const tag = closing[1]?.toLowerCase() ?? \"\";\n return schema.tagNames?.includes(tag) ? `</${tag}>` : \"\";\n }\n const tree = sanitize(fromHtml(html, { fragment: true }), schema) as Root;\n const tasks: Promise<void>[] = [];\n visit(tree, \"element\", (element) => {\n for (const [property, kind] of [\n [\"href\", \"link\"],\n [\"src\", \"image\"],\n ] as const) {\n const value = element.properties[property];\n if (typeof value !== \"string\") continue;\n tasks.push(\n rewrite(value, kind).then((resolved) => {\n element.properties[property] = resolved;\n }),\n );\n }\n });\n await Promise.all(tasks);\n let result = toHtml(tree);\n // mdast represents inline <strong>text</strong> as three distinct nodes.\n const opening =\n /^<([a-z][a-z\\d-]*)(?:\\s+(?:[^<>\"']|\"[^\"]*\"|'[^']*')*)?\\s*>$/i.exec(\n html.trim(),\n );\n const first = tree.children[0];\n if (\n opening &&\n tree.children.length === 1 &&\n first?.type === \"element\" &&\n first.tagName === opening[1]?.toLowerCase() &&\n first.children.length === 0\n ) {\n result = result.replace(new RegExp(`</${first.tagName}>$`), \"\");\n }\n return result;\n}\n","import { parse as parseYaml } from \"yaml\";\n\nexport interface OpenApiPage {\n route: string;\n sourcePath: string;\n title: string;\n description?: string;\n body: string;\n}\n\ntype Data = Record<string, unknown>;\n\nconst METHODS = [\n \"get\",\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n \"head\",\n \"options\",\n \"trace\",\n];\n\n/** Turn a local OpenAPI 3 document into static, searchable Markdown pages. */\nexport function openApiPages(\n source: string,\n routeBase: string,\n text: string,\n): OpenApiPage[] {\n let document: unknown;\n try {\n document = source.endsWith(\".json\")\n ? JSON.parse(text)\n : parseYaml(text, { uniqueKeys: true });\n } catch (error) {\n throw new Error(`Invalid OpenAPI document ${source}: ${String(error)}`);\n }\n if (\n !record(document) ||\n typeof document.openapi !== \"string\" ||\n !document.openapi.startsWith(\"3.\")\n ) {\n throw new Error(`OpenAPI source ${source} must use OpenAPI 3.x.`);\n }\n if (\n !record(document.info) ||\n typeof document.info.title !== \"string\" ||\n !record(document.paths)\n ) {\n throw new Error(`OpenAPI source ${source} needs info.title and paths.`);\n }\n assertLocalReferences(document, document, source);\n\n const title = document.info.title;\n const description = string(document.info.description);\n const operations: Array<{\n method: string;\n path: string;\n operation: Data;\n route: string;\n title: string;\n }> = [];\n const routes = new Set<string>([routeBase]);\n for (const [path, rawItem] of Object.entries(document.paths)) {\n const item = resolveReference(rawItem, document);\n if (!path.startsWith(\"/\") || !record(item))\n throw new Error(`Invalid OpenAPI path ${path} in ${source}.`);\n for (const method of METHODS) {\n const operation = item[method];\n if (operation === undefined) continue;\n if (!record(operation))\n throw new Error(\n `Invalid ${method.toUpperCase()} ${path} in ${source}.`,\n );\n const name = string(operation.operationId) ?? `${method}-${path}`;\n const slug = slugify(name);\n if (!slug)\n throw new Error(\n `Cannot generate a route for ${method.toUpperCase()} ${path} in ${source}.`,\n );\n const route = `${routeBase === \"/\" ? \"\" : routeBase}/${slug}`;\n if (routes.has(route))\n throw new Error(\n `Duplicate OpenAPI operation route ${route} in ${source}. Give operations distinct operationId values.`,\n );\n routes.add(route);\n operations.push({\n method,\n path,\n operation,\n route,\n title: string(operation.summary) ?? `${method.toUpperCase()} ${path}`,\n });\n }\n }\n\n const overview: string[] = [`# ${escapeText(title)}`, \"\"];\n if (description) overview.push(description, \"\");\n if (typeof document.info.version === \"string\")\n overview.push(`**API version:** ${escapeText(document.info.version)}`, \"\");\n if (Array.isArray(document.servers) && document.servers.length) {\n overview.push(\"## Servers\", \"\");\n for (const server of document.servers) {\n if (record(server) && typeof server.url === \"string\")\n overview.push(\n `- \\`${escapeCode(server.url)}\\`${string(server.description) ? ` — ${escapeText(server.description as string)}` : \"\"}`,\n );\n }\n overview.push(\"\");\n }\n overview.push(\"## Operations\", \"\");\n for (const operation of operations)\n overview.push(\n `- [${escapeText(operation.method.toUpperCase())} ${escapeText(operation.path)} — ${escapeText(operation.title)}](${operation.route})`,\n );\n if (!operations.length) overview.push(\"No operations are defined.\");\n overview.push(\"\");\n\n const schemas =\n record(document.components) && record(document.components.schemas)\n ? document.components.schemas\n : undefined;\n if (schemas && Object.keys(schemas).length) {\n overview.push(\"## Schemas\", \"\");\n for (const [name, schema] of Object.entries(schemas)) {\n overview.push(`### ${escapeText(name)}`, \"\", jsonBlock(schema), \"\");\n }\n }\n const pages: OpenApiPage[] = [\n {\n route: routeBase,\n sourcePath: `${source}#overview.md`,\n title,\n ...(description ? { description } : {}),\n body: overview.join(\"\\n\"),\n },\n ];\n for (const {\n method,\n path,\n operation,\n route,\n title: operationTitle,\n } of operations) {\n const body: string[] = [\n `# ${escapeText(operationTitle)}`,\n \"\",\n `**${method.toUpperCase()}** \\`${escapeCode(path)}\\``,\n \"\",\n `[All operations](${routeBase})`,\n \"\",\n ];\n if (string(operation.description))\n body.push(operation.description as string, \"\");\n if (Array.isArray(operation.tags) && operation.tags.length)\n body.push(\n `**Tags:** ${operation.tags\n .filter((tag): tag is string => typeof tag === \"string\")\n .map(escapeText)\n .join(\", \")}`,\n \"\",\n );\n const pathItem = resolveReference(document.paths[path], document) as Data;\n const parameters = [\n ...(Array.isArray(pathItem.parameters) ? pathItem.parameters : []),\n ...(Array.isArray(operation.parameters) ? operation.parameters : []),\n ];\n if (parameters.length) {\n body.push(\n \"## Parameters\",\n \"\",\n \"| Name | In | Required | Description |\",\n \"| --- | --- | --- | --- |\",\n );\n for (const parameter of parameters) {\n const item = resolveReference(parameter, document);\n if (!record(item)) continue;\n const schema = record(item.schema)\n ? ` (${schemaLabel(item.schema)})`\n : \"\";\n body.push(\n `| ${tableCell(string(item.name) ?? \"—\")} | ${tableCell(string(item.in) ?? \"—\")} | ${item.required === true ? \"Yes\" : \"No\"} | ${tableCell(`${string(item.description) ?? \"\"}${schema}`)} |`,\n );\n }\n body.push(\"\");\n }\n if (operation.requestBody !== undefined) {\n const request = resolveReference(operation.requestBody, document);\n if (record(request)) {\n body.push(\"## Request body\", \"\");\n if (string(request.description))\n body.push(request.description as string, \"\");\n body.push(\n `**Required:** ${request.required === true ? \"Yes\" : \"No\"}`,\n \"\",\n );\n renderContent(body, request.content);\n }\n }\n if (record(operation.responses)) {\n body.push(\"## Responses\", \"\");\n for (const [status, value] of Object.entries(operation.responses)) {\n const response = resolveReference(value, document);\n if (!record(response)) continue;\n body.push(\n `### ${escapeText(status)}${string(response.description) ? ` — ${escapeText(response.description as string)}` : \"\"}`,\n \"\",\n );\n renderContent(body, response.content);\n }\n }\n pages.push({\n route,\n sourcePath: `${source}#${route.slice(routeBase.length + 1)}.md`,\n title: operationTitle,\n ...(string(operation.description)\n ? { description: operation.description as string }\n : {}),\n body: body.join(\"\\n\"),\n });\n }\n return pages;\n}\n\nfunction renderContent(lines: string[], content: unknown): void {\n if (!record(content)) return;\n for (const [mediaType, media] of Object.entries(content)) {\n lines.push(`#### ${escapeText(mediaType)}`, \"\");\n if (record(media) && media.schema !== undefined)\n lines.push(jsonBlock(media.schema), \"\");\n if (record(media) && record(media.examples)) {\n for (const [name, example] of Object.entries(media.examples)) {\n const value =\n record(example) && \"value\" in example ? example.value : example;\n lines.push(\n `**Example: ${escapeText(name)}**`,\n \"\",\n jsonBlock(value),\n \"\",\n );\n }\n }\n }\n}\n\nfunction assertLocalReferences(\n value: unknown,\n document: Data,\n source: string,\n seen = new Set<object>(),\n): void {\n if (typeof value !== \"object\" || value === null || seen.has(value)) return;\n seen.add(value);\n if (Array.isArray(value)) {\n for (const item of value)\n assertLocalReferences(item, document, source, seen);\n } else {\n for (const [key, item] of Object.entries(value)) {\n if (\n key === \"$ref\" &&\n (typeof item !== \"string\" || !item.startsWith(\"#/\"))\n )\n throw new Error(\n `OpenAPI source ${source} has an external or invalid $ref; bundle references into the document first.`,\n );\n if (\n key === \"$ref\" &&\n typeof item === \"string\" &&\n lookupReference(item, document) === undefined\n )\n throw new Error(\n `OpenAPI source ${source} has an unresolved reference: ${item}.`,\n );\n assertLocalReferences(item, document, source, seen);\n }\n }\n}\n\nfunction resolveReference(value: unknown, document: Data): unknown {\n const visited = new Set<string>();\n while (record(value) && typeof value.$ref === \"string\") {\n const ref = value.$ref;\n if (visited.has(ref))\n throw new Error(`Circular OpenAPI reference: ${ref}.`);\n visited.add(ref);\n value = lookupReference(ref, document);\n if (value === undefined)\n throw new Error(`Unresolved OpenAPI reference: ${ref}.`);\n }\n return value;\n}\n\nfunction lookupReference(ref: string, document: Data): unknown {\n return ref\n .slice(2)\n .split(\"/\")\n .reduce<unknown>(\n (current, part) =>\n record(current)\n ? current[part.replace(/~1/g, \"/\").replace(/~0/g, \"~\")]\n : undefined,\n document,\n );\n}\n\nfunction record(value: unknown): value is Data {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction string(value: unknown): string | undefined {\n return typeof value === \"string\" && value.length ? value : undefined;\n}\n\nfunction slugify(value: string): string {\n return value\n .normalize(\"NFKD\")\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\");\n}\n\nfunction escapeText(value: string): string {\n return value.replace(/[\\\\`*_\\[\\]<>|]/g, \"\\\\$&\").replace(/\\r?\\n/g, \" \");\n}\n\nfunction escapeCode(value: string): string {\n return value.replace(/`/g, \"\\\\`\").replace(/\\r?\\n/g, \" \");\n}\n\nfunction tableCell(value: string): string {\n return escapeText(value);\n}\n\nfunction schemaLabel(schema: Data): string {\n return typeof schema.$ref === \"string\"\n ? (schema.$ref.split(\"/\").at(-1) ?? \"schema\")\n : (string(schema.type) ?? \"schema\");\n}\n\nfunction jsonBlock(value: unknown): string {\n const body = JSON.stringify(value, null, 2);\n let longest = 0;\n for (const [run] of body.matchAll(/`+/g))\n longest = Math.max(longest, run.length);\n const fence = \"`\".repeat(Math.max(3, longest + 1));\n return `${fence}json\\n${body}\\n${fence}`;\n}\n","import { createHash } from \"node:crypto\";\nimport { homedir } from \"node:os\";\nimport {\n lstat,\n mkdir,\n mkdtemp,\n readFile,\n readdir,\n rename,\n rm,\n stat,\n writeFile,\n} from \"node:fs/promises\";\nimport { dirname, isAbsolute, join, relative, resolve, sep } from \"node:path\";\nimport npa from \"npm-package-arg\";\nimport pacote from \"pacote\";\nimport { glob } from \"tinyglobby\";\nimport type {\n NormalizedDocsConfig,\n PackageDiscovery,\n PackageLockSource,\n PackageManifest,\n CookbookLock,\n DocsConfig,\n} from \"../types.js\";\n\nconst DEFAULT_REGISTRY = \"https://registry.npmjs.org/\";\nconst LOCK_FILE = \"cookbook.lock.json\";\n\nexport interface ResolvePackageOptions {\n registry?: string;\n cacheDir?: string;\n}\n\nexport async function resolvePackageLock(\n requested: string,\n options: ResolvePackageOptions = {},\n): Promise<PackageLockSource> {\n const parsed = npa(requested);\n if (![\"tag\", \"version\", \"range\"].includes(parsed.type)) {\n throw new Error(\n `Only npm registry package specifiers are supported (received ${parsed.type}).`,\n );\n }\n const registry = options.registry ?? DEFAULT_REGISTRY;\n const manifest = (await pacote.manifest(requested, {\n registry,\n ...(options.cacheDir ? { cache: options.cacheDir } : {}),\n fullMetadata: true,\n })) as PackageManifest;\n if (!manifest.name || !manifest.version || !manifest._integrity) {\n throw new Error(\n `Registry metadata for ${requested} did not include version and integrity.`,\n );\n }\n return {\n requested,\n resolved: `${manifest.name}@${manifest.version}`,\n registry,\n integrity: manifest._integrity,\n };\n}\n\nexport async function readDocsLock(\n root: string,\n): Promise<CookbookLock | undefined> {\n try {\n const value = JSON.parse(\n await readFile(join(root, LOCK_FILE), \"utf8\"),\n ) as CookbookLock;\n validateLock(value);\n return value;\n } catch (error) {\n if (isMissing(error)) return undefined;\n throw error;\n }\n}\n\nexport async function writeDocsLock(\n root: string,\n lock: CookbookLock,\n): Promise<void> {\n validateLock(lock);\n const temporary = await mkdtemp(join(root, \".cookbook-lock-\"));\n try {\n await writeFile(\n join(temporary, LOCK_FILE),\n `${JSON.stringify(lock, null, 2)}\\n`,\n \"utf8\",\n );\n await rename(join(temporary, LOCK_FILE), join(root, LOCK_FILE));\n } finally {\n await rm(temporary, { recursive: true, force: true });\n }\n}\n\n/** Reconcile declarations, including the first lock and removed sources. */\nexport async function reconcileDocsLock(\n config: DocsConfig,\n existing: CookbookLock | undefined,\n options: {\n packages?: string[];\n resolve?: typeof resolvePackageLock;\n } = {},\n): Promise<CookbookLock> {\n const configured = (config.content?.sources ?? []).filter(\n (source) => \"package\" in source,\n );\n const unique = new Map<string, (typeof configured)[number]>();\n for (const declaration of configured) {\n const previous = unique.get(declaration.package);\n if (\n previous?.registry &&\n declaration.registry &&\n previous.registry !== declaration.registry\n )\n throw new Error(\n `Package source ${declaration.package} declares conflicting registries.`,\n );\n unique.set(declaration.package, {\n ...declaration,\n ...(previous?.registry ? { registry: previous.registry } : {}),\n });\n }\n const declarations = [...unique.values()];\n const selectors = options.packages ?? [];\n for (const selector of selectors) {\n if (\n !declarations.some(\n (source) =>\n source.package === selector ||\n packageNameFromSpecifier(source.package) === selector,\n )\n ) {\n throw new Error(`No configured package source matches \"${selector}\".`);\n }\n }\n const sources: PackageLockSource[] = [];\n for (const declaration of declarations) {\n const current = existing?.sources.find(\n (source) => source.requested === declaration.package,\n );\n const selected =\n selectors.length === 0 ||\n selectors.some(\n (selector) =>\n selector === declaration.package ||\n selector === packageNameFromSpecifier(declaration.package),\n );\n if (\n !selected &&\n current &&\n (!declaration.registry || declaration.registry === current.registry)\n ) {\n sources.push(current);\n continue;\n }\n if (!selected)\n throw new Error(\n `Package source ${declaration.package} is not locked. Run \"cookbook update\" without a package selector.`,\n );\n const previous =\n current ??\n existing?.sources.find(\n (source) =>\n packageNameFromSpecifier(source.requested) ===\n packageNameFromSpecifier(declaration.package),\n );\n const registry = declaration.registry ?? previous?.registry;\n const next = await (options.resolve ?? resolvePackageLock)(\n declaration.package,\n registry ? { registry } : {},\n );\n if (previous?.vendored) {\n next.vendored =\n next.integrity === previous.integrity\n ? previous.vendored\n : `.cookbook/vendor/${createHash(\"sha256\").update(next.integrity).digest(\"hex\")}`;\n }\n sources.push(next);\n }\n return defaultLock(sources);\n}\n\nexport function validateLock(lock: CookbookLock): void {\n if (lock.schemaVersion !== 1 || !Array.isArray(lock.sources)) {\n throw new Error(\"Unsupported or invalid cookbook.lock.json.\");\n }\n for (const source of lock.sources) {\n if (\n !source.requested ||\n !source.resolved ||\n !source.registry ||\n !source.integrity\n ) {\n throw new Error(\n \"Every lock source requires requested, resolved, registry, and integrity.\",\n );\n }\n const parsed = npa(source.resolved);\n if (parsed.type !== \"version\") {\n throw new Error(\n `Locked source must use an exact version: ${source.resolved}.`,\n );\n }\n if (\n source.vendored &&\n (source.vendored.startsWith(\"/\") ||\n source.vendored.split(/[\\\\/]/).includes(\"..\"))\n ) {\n throw new Error(\n `Vendored package path must stay within the project: ${source.vendored}.`,\n );\n }\n }\n}\n\nexport async function materializePackage(\n source: PackageLockSource,\n config: NormalizedDocsConfig[\"build\"],\n projectRoot?: string,\n): Promise<string> {\n if (source.vendored) {\n if (!projectRoot) {\n throw new Error(\n `Vendored source ${source.resolved} requires a project root.`,\n );\n }\n const vendored = resolve(projectRoot, source.vendored);\n if (!inside(projectRoot, vendored)) {\n throw new Error(\n `Vendored package path escapes the project root: ${source.vendored}.`,\n );\n }\n const marker = (\n await readFile(join(vendored, \".cookbook-integrity\"), \"utf8\")\n ).trim();\n if (marker !== source.integrity) {\n throw new Error(\n `Vendored package integrity marker does not match ${source.resolved}.`,\n );\n }\n await validateExtractedTree(vendored, config);\n return vendored;\n }\n const cacheRoot = resolve(\n config.cacheDir || join(homedir(), \".cache\", \"cookbook\"),\n \"artifacts\",\n );\n const key = createHash(\"sha256\").update(source.integrity).digest(\"hex\");\n const destination = join(cacheRoot, key);\n const marker = join(destination, \".cookbook-integrity\");\n try {\n if ((await readFile(marker, \"utf8\")).trim() === source.integrity) {\n await validateExtractedTree(destination, config);\n return destination;\n }\n } catch (error) {\n if (!isMissing(error)) throw error;\n }\n\n await mkdir(cacheRoot, { recursive: true });\n const temporary = await mkdtemp(join(cacheRoot, \".extract-\"));\n try {\n const tarball = await pacote.tarball(source.resolved, {\n registry: source.registry,\n integrity: source.integrity,\n cache: join(cacheRoot, \"_cacache\"),\n });\n if (tarball.byteLength > config.maxArtifactBytes) {\n throw new Error(\n `Package artifact is ${tarball.byteLength} bytes; limit is ${config.maxArtifactBytes}.`,\n );\n }\n await pacote.extract(source.resolved, temporary, {\n registry: source.registry,\n integrity: source.integrity,\n cache: join(cacheRoot, \"_cacache\"),\n });\n await validateExtractedTree(temporary, config);\n await writeFile(\n join(temporary, \".cookbook-integrity\"),\n `${source.integrity}\\n`,\n );\n await rm(destination, { recursive: true, force: true });\n await rename(temporary, destination);\n return destination;\n } catch (error) {\n await rm(temporary, { recursive: true, force: true });\n throw error;\n }\n}\n\nasync function validateExtractedTree(\n root: string,\n config: NormalizedDocsConfig[\"build\"],\n): Promise<void> {\n let files = 0;\n let bytes = 0;\n const pending = [root];\n while (pending.length > 0) {\n const directory = pending.pop();\n if (!directory) break;\n for (const name of await readdir(directory)) {\n if (name === \".cookbook-integrity\") continue;\n const path = join(directory, name);\n const info = await lstat(path);\n const rel = relative(root, path);\n if (rel.startsWith(`..${sep}`) || rel === \"..\") {\n throw new Error(`Package path escapes artifact root: ${rel}.`);\n }\n if (rel.split(sep).length > config.maxPathDepth) {\n throw new Error(`Package path exceeds maximum depth: ${rel}.`);\n }\n if (info.isSymbolicLink()) {\n throw new Error(`Package symlinks are not allowed: ${rel}.`);\n }\n if (info.isDirectory()) {\n pending.push(path);\n } else if (info.isFile()) {\n files += 1;\n bytes += info.size;\n if (info.size > config.maxAssetBytes) {\n throw new Error(`Package file exceeds maximum size: ${rel}.`);\n }\n if (files > config.maxFiles || bytes > config.maxUnpackedBytes) {\n throw new Error(\n \"Package exceeds configured file-count or unpacked-size limit.\",\n );\n }\n } else {\n throw new Error(`Unsupported package entry type: ${rel}.`);\n }\n }\n }\n}\n\nexport async function discoverPackage(root: string): Promise<PackageDiscovery> {\n const manifest = JSON.parse(\n await readFile(join(root, \"package.json\"), \"utf8\"),\n ) as PackageManifest;\n const hints = manifest.cookbook;\n const homeCandidates = [hints?.index, \"README.md\", \"readme.md\"].filter(\n (candidate): candidate is string => Boolean(candidate),\n );\n let home: string | undefined;\n for (const candidate of homeCandidates) {\n assertSafePackagePath(candidate, \"cookbook.index\");\n try {\n const path = resolve(root, candidate);\n if (!inside(root, path)) {\n throw new Error(\n `cookbook.index escapes the package root: ${candidate}.`,\n );\n }\n if ((await stat(path)).isFile()) {\n home = candidate;\n break;\n }\n } catch (error) {\n if (!isMissing(error)) throw error;\n }\n }\n\n const patterns = hints?.include?.length\n ? hints.include\n : [\n \"docs/**/*.{md,mdx}\",\n \"docs/**/*.{png,jpg,jpeg,gif,webp,avif,svg,pdf,txt,zip}\",\n ];\n for (const pattern of patterns) {\n assertSafePackagePath(pattern, \"cookbook.include\");\n }\n for (const pattern of hints?.exclude ?? []) {\n assertSafePackagePath(pattern, \"cookbook.exclude\");\n }\n const discovered = await glob(patterns, {\n cwd: root,\n onlyFiles: true,\n dot: false,\n ignore: hints?.exclude ?? [],\n });\n for (const path of discovered) {\n assertSafePackagePath(path, \"discovered package path\");\n if (!inside(root, resolve(root, path))) {\n throw new Error(`Discovered path escapes the package root: ${path}.`);\n }\n }\n const pages = discovered.filter((path) => /\\.mdx?$/i.test(path));\n if (home && !pages.includes(home)) pages.unshift(home);\n const assets = discovered.filter((path) => !/\\.mdx?$/i.test(path));\n return { root, manifest, ...(home ? { home } : {}), pages, assets };\n}\n\nexport function packageNameFromSpecifier(specifier: string): string {\n const parsed = npa(specifier);\n if (!parsed.name)\n throw new Error(`Invalid npm package specifier: ${specifier}.`);\n return parsed.name;\n}\n\nexport function lockForSource(\n lock: CookbookLock | undefined,\n requested: string,\n): PackageLockSource {\n const exact = lock?.sources.find((source) => source.requested === requested);\n if (exact) return exact;\n throw new Error(\n `Package source ${requested} is not locked. Run \"cookbook update\" to reconcile ${LOCK_FILE} with docs.config.ts.`,\n );\n}\n\n/** Reject paths and glob patterns that could address files outside a package. */\nexport function assertSafePackagePath(path: string, field: string): void {\n const normalized = path.replaceAll(\"\\\\\", \"/\");\n if (\n path.trim() === \"\" ||\n path.includes(\"\\0\") ||\n isAbsolute(path) ||\n normalized.startsWith(\"/\") ||\n /^[a-z]:\\//i.test(normalized) ||\n normalized.includes(\"..\")\n ) {\n throw new Error(`${field} must stay within the package root: ${path}.`);\n }\n}\n\nexport function defaultLock(sources: PackageLockSource[]): CookbookLock {\n return { schemaVersion: 1, sources };\n}\n\nfunction isMissing(error: unknown): boolean {\n return (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n );\n}\n\nfunction inside(root: string, path: string): boolean {\n const rel = relative(resolve(root), resolve(path));\n return (\n rel === \"\" ||\n (!rel.startsWith(`..${sep}`) && rel !== \"..\" && !isAbsolute(rel))\n );\n}\n","import { createHash } from \"node:crypto\";\nimport { execFile } from \"node:child_process\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport {\n basename,\n dirname,\n extname,\n isAbsolute,\n relative,\n resolve,\n sep,\n} from \"node:path\";\nimport { promisify } from \"node:util\";\nimport type { Definition, Image, Link, Root } from \"mdast\";\nimport { glob } from \"tinyglobby\";\nimport { visit } from \"unist-util-visit\";\nimport { parse as parseYaml } from \"yaml\";\nimport { sanitizeMarkup } from \"../html/index.js\";\nimport { openApiPages } from \"./openapi.js\";\nimport { normalizeDocsConfig } from \"../config/index.js\";\nimport {\n cloneAst,\n parseMarkdown,\n removeRenderedTitle,\n serializeMarkdown,\n stripLeadingBadgeBlock,\n} from \"../markdown/index.js\";\nimport {\n assertSafePackagePath,\n discoverPackage,\n lockForSource,\n materializePackage,\n readDocsLock,\n} from \"../npm/index.js\";\nimport type {\n CreateDocsGraphOptions,\n DocsAsset,\n DocsDiagnostic,\n DocsEntry,\n DocsFrontmatter,\n DocsGraph,\n DocsRoute,\n DocsSource,\n NavigationItem,\n NormalizedDocsConfig,\n NavigationPlacement,\n PackageLockSource,\n} from \"../types.js\";\n\ninterface RepositoryMetadata {\n url: string;\n directory?: string;\n}\n\ninterface CollectedSource {\n sourceId: string;\n routeBase?: string;\n absolutePath: string;\n sourcePath: string;\n sourceRoot: string;\n generatedBody?: string;\n editPath?: string;\n route?: string;\n title?: string;\n description?: string;\n navigation?: false | NavigationPlacement;\n trust: \"markdown\" | \"mdx\";\n packageLock?: PackageLockSource;\n repository?: RepositoryMetadata;\n}\n\nconst MARKDOWN_EXTENSIONS = [\".md\", \".mdx\"];\nconst execFileAsync = promisify(execFile);\nconst FRONTMATTER_KEYS = new Set([\n \"aliases\",\n \"title\",\n \"description\",\n \"slug\",\n \"draft\",\n \"sidebar\",\n \"tableOfContents\",\n \"editUrl\",\n \"template\",\n \"hero\",\n \"lastUpdated\",\n \"prev\",\n \"next\",\n \"banner\",\n \"pagefind\",\n \"head\",\n]);\n\nexport async function createDocsGraph(\n options: CreateDocsGraphOptions = {},\n): Promise<DocsGraph> {\n const root = resolve(options.root ?? process.cwd());\n const normalized = normalizeDocsConfig(options.config);\n const config: NormalizedDocsConfig = options.base\n ? { ...normalized, build: { ...normalized.build, base: options.base } }\n : normalized;\n const diagnostics: DocsDiagnostic[] = [];\n const lock = options.lock ?? (await readDocsLock(root));\n const collected = await collectSources(root, config, lock, diagnostics);\n const entries: DocsEntry[] = [];\n const routeMap = new Map<string, DocsEntry>();\n const absoluteMap = new Map<string, DocsEntry[]>();\n const sourceMap = new Map<string, DocsEntry[]>();\n const repositoryMap = new Map<string, RepositoryMetadata>();\n\n for (const source of collected) {\n const entry = await readEntry(source, config, diagnostics);\n if (!entry) continue;\n const existing = routeMap.get(entry.route);\n if (existing) {\n diagnostics.push({\n code: \"DOCS_DUPLICATE_ROUTE\",\n severity: \"error\",\n message: `Route ${entry.route} is owned by both ${existing.sourcePath} and ${entry.sourcePath}.`,\n file: entry.sourcePath,\n related: [{ file: existing.sourcePath, message: \"First route owner.\" }],\n });\n continue;\n }\n routeMap.set(entry.route, entry);\n if (source.generatedBody === undefined) {\n const absolute = normalizeFs(entry.absolutePath);\n absoluteMap.set(absolute, [...(absoluteMap.get(absolute) ?? []), entry]);\n }\n sourceMap.set(entry.sourcePath, [\n ...(sourceMap.get(entry.sourcePath) ?? []),\n entry,\n ]);\n sourceMap.set(entry.id, [entry]);\n if (source.repository) repositoryMap.set(entry.id, source.repository);\n entries.push(entry);\n }\n\n if (entries.length === 0) {\n diagnostics.push({\n code: \"DOCS_NO_PAGES\",\n severity: \"error\",\n message:\n \"No documentation pages were found. Add README.md, docs/**/*.md, or configure content.sources.\",\n });\n }\n\n const redirects = resolveRedirects(\n config.redirects,\n entries,\n routeMap,\n diagnostics,\n );\n for (const [alias, target] of Object.entries(redirects)) {\n const entry = routeMap.get(target);\n if (entry) routeMap.set(alias, entry);\n }\n for (const entry of entries) {\n await transformEntry(\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n );\n }\n validateNavigation(config.navigation.items ?? [], routeMap, diagnostics);\n for (const tab of config.navigation.tabs ?? []) {\n validateNavigation(\n [{ label: tab.label, link: tab.link }],\n routeMap,\n diagnostics,\n );\n validateNavigation(tab.items ?? [], routeMap, diagnostics);\n }\n for (const version of config.site.versions ?? []) {\n if (!routeMap.has(version.routeBase)) {\n diagnostics.push({\n code: \"DOCS_VERSION_ROOT_MISSING\",\n severity: \"error\",\n message: `Version ${version.label} needs a page at ${version.routeBase}.`,\n });\n }\n }\n\n entries.sort((left, right) => left.route.localeCompare(right.route));\n const routes: DocsRoute[] = entries.map((entry) => ({\n route: entry.route,\n entryId: entry.id,\n sourcePath: entry.sourcePath,\n title: entry.title,\n ...(entry.frontmatter.sidebar !== undefined\n ? { sidebar: entry.frontmatter.sidebar }\n : {}),\n }));\n const assets = Array.from(\n new Map(\n entries\n .flatMap((entry) => entry.assets)\n .map((asset) => [\n asset.publicPath ?? `${asset.original}:${asset.line ?? \"\"}`,\n asset,\n ]),\n ).values(),\n );\n return {\n redirects,\n root,\n config,\n entries,\n routes,\n assets,\n diagnostics,\n entryByRoute(route) {\n return routeMap.get(normalizeRoute(route));\n },\n entryBySource(sourcePath, sourceId) {\n const matches = sourceMap.get(sourcePath) ?? [];\n return sourceId\n ? matches.find((entry) => entry.sourceId === sourceId)\n : matches.length === 1\n ? matches[0]\n : undefined;\n },\n };\n}\n\nfunction resolveRedirects(\n configured: Record<string, string>,\n entries: DocsEntry[],\n routes: Map<string, DocsEntry>,\n diagnostics: DocsDiagnostic[],\n): Record<string, string> {\n const requested = new Map<string, string>();\n const error = (message: string) =>\n diagnostics.push({\n code: \"DOCS_REDIRECT_INVALID\",\n severity: \"error\",\n message,\n });\n const add = (from: string, to: string) => {\n try {\n const alias = normalizeRoute(from);\n const target = normalizeRoute(to);\n if (routes.has(alias) || requested.has(alias))\n error(`Redirect ${alias} conflicts with an existing page or redirect.`);\n else requested.set(alias, target);\n } catch (cause) {\n error(errorMessage(cause));\n }\n };\n for (const [from, to] of Object.entries(configured)) add(from, to);\n for (const entry of entries) {\n for (const alias of entry.frontmatter.aliases ?? [])\n add(`${entry.routeBase}/${alias}`, entry.route);\n }\n const result: Record<string, string> = {};\n for (const [alias, target] of requested) {\n const seen = new Set([alias]);\n let current = target;\n while (requested.has(current) && !seen.has(current)) {\n seen.add(current);\n current = requested.get(current)!;\n }\n if (seen.has(current)) error(`Redirect cycle includes ${alias}.`);\n else if (!routes.has(current))\n error(`Redirect ${alias} points to missing document ${current}.`);\n else result[alias] = current;\n }\n return result;\n}\n\nasync function collectSources(\n root: string,\n config: NormalizedDocsConfig,\n lock: CreateDocsGraphOptions[\"lock\"],\n diagnostics: DocsDiagnostic[],\n): Promise<CollectedSource[]> {\n const declarations =\n config.content.sources ?? (await conventionSources(root));\n const results: CollectedSource[] = [];\n const identities = new Set<string>();\n\n const sourceIds = new Set<string>();\n for (const [index, declaration] of declarations.entries()) {\n const sourceId = declaration.id ?? `source-${index + 1}`;\n if (sourceIds.has(sourceId)) {\n diagnostics.push({\n code: \"DOCS_DUPLICATE_SOURCE\",\n severity: \"error\",\n message: `Source id ${sourceId} is declared more than once.`,\n });\n continue;\n }\n sourceIds.add(sourceId);\n try {\n const found = await collectDeclaration(\n root,\n declaration,\n config,\n lock,\n sourceId,\n );\n if (found.length === 0) {\n diagnostics.push({\n code: \"DOCS_SOURCE_NOT_FOUND\",\n severity: \"error\",\n message: `Source did not match any files: ${sourceLabel(declaration)}.`,\n });\n }\n for (const source of found) {\n const identity = `${sourceId}:${normalizeFs(source.absolutePath)}:${source.generatedBody === undefined ? \"\" : source.route}`;\n if (identities.has(identity)) continue;\n identities.add(identity);\n results.push(source);\n }\n } catch (error) {\n diagnostics.push({\n code:\n error instanceof OutsideRootError\n ? \"DOCS_SOURCE_OUTSIDE_ROOT\"\n : \"openapi\" in declaration\n ? \"DOCS_OPENAPI_INVALID\"\n : \"DOCS_SOURCE_NOT_FOUND\",\n severity: \"error\",\n message: errorMessage(error),\n });\n }\n }\n return results;\n}\n\nasync function conventionSources(root: string): Promise<DocsSource[]> {\n const sources: DocsSource[] = [];\n if (await isFile(resolve(root, \"README.md\")))\n sources.push({ file: \"README.md\", route: \"/\" });\n const docs = resolve(root, \"docs\");\n if (await isDirectory(docs)) {\n sources.push({ glob: \"docs/**/*.{md,mdx}\", base: \"docs\" });\n }\n return sources;\n}\n\nasync function collectDeclaration(\n root: string,\n declaration: DocsSource,\n config: NormalizedDocsConfig,\n lock: CreateDocsGraphOptions[\"lock\"],\n sourceId: string,\n): Promise<CollectedSource[]> {\n if (\"openapi\" in declaration) {\n const sourceRoot = resolve(root, declaration.root ?? \".\");\n const absolutePath = resolveSourcePath(\n sourceRoot,\n declaration.openapi,\n config.content.allowOutsideRoot,\n );\n if (!(await isFile(absolutePath))) return [];\n const info = await stat(absolutePath);\n if (info.size > config.build.maxAssetBytes)\n throw new Error(\n `OpenAPI source ${declaration.openapi} exceeds ${config.build.maxAssetBytes} bytes.`,\n );\n const routeBase = normalizeRoute(declaration.routeBase ?? \"/api\");\n const sourcePath = toPosix(relative(sourceRoot, absolutePath));\n const pages = openApiPages(\n sourcePath,\n routeBase,\n await readFile(absolutePath, \"utf8\"),\n );\n return pages.map((page) => ({\n sourceId,\n routeBase,\n absolutePath,\n sourcePath: page.sourcePath,\n sourceRoot,\n editPath: toPosix(\n relative(inside(root, absolutePath) ? root : sourceRoot, absolutePath),\n ),\n route: page.route,\n title: page.title,\n ...(page.description ? { description: page.description } : {}),\n generatedBody: page.body,\n trust: \"markdown\" as const,\n }));\n }\n if (\"package\" in declaration) {\n const packageLock = lockForSource(lock, declaration.package);\n if (declaration.registry && packageLock.registry !== declaration.registry) {\n throw new Error(\n `Registry changed for ${declaration.package}. Run \"cookbook update\".`,\n );\n }\n const sourceRoot = await materializePackage(\n packageLock,\n config.build,\n root,\n );\n const discovery = await discoverPackage(sourceRoot);\n const repository = config.content.localizeRepositoryLinks\n ? repositoryMetadata(discovery.manifest.repository)\n : undefined;\n const patterns = declaration.include?.length\n ? declaration.include\n : discovery.pages;\n for (const pattern of patterns) {\n assertSafePackagePath(pattern, \"Package source include\");\n }\n for (const pattern of declaration.exclude ?? []) {\n assertSafePackagePath(pattern, \"Package source exclude\");\n }\n if (declaration.index) {\n assertSafePackagePath(declaration.index, \"Package source index\");\n }\n const files = await glob(patterns, {\n cwd: sourceRoot,\n onlyFiles: true,\n ignore: declaration.exclude ?? [],\n });\n const index = declaration.index ?? discovery.home;\n return files\n .filter((path) =>\n MARKDOWN_EXTENSIONS.includes(extname(path).toLowerCase()),\n )\n .map((path) => {\n assertSafePackagePath(path, \"Discovered package source\");\n const absolutePath = resolve(sourceRoot, path);\n if (!inside(sourceRoot, absolutePath)) throw new OutsideRootError(path);\n return {\n sourceId,\n ...(declaration.routeBase\n ? { routeBase: declaration.routeBase }\n : {}),\n absolutePath,\n sourcePath: path,\n sourceRoot,\n route:\n path === index\n ? normalizeRoute(declaration.routeBase ?? \"/\")\n : routeForPath(path, \"docs\", declaration.routeBase),\n trust: declaration.trust ?? \"markdown\",\n packageLock,\n ...(repository ? { repository } : {}),\n };\n });\n }\n\n const sourceRoot = resolve(root, declaration.root ?? \".\");\n const repository = config.content.localizeRepositoryLinks\n ? repositoryMetadata(config.site.repository)\n : undefined;\n\n if (\"file\" in declaration) {\n const absolutePath = resolveSourcePath(\n sourceRoot,\n declaration.file,\n config.content.allowOutsideRoot,\n );\n if (!(await isFile(absolutePath))) return [];\n return [\n {\n sourceId,\n ...(declaration.routeBase ? { routeBase: declaration.routeBase } : {}),\n absolutePath,\n sourcePath: toPosix(relative(sourceRoot, absolutePath)),\n editPath: toPosix(\n relative(\n inside(root, absolutePath) ? root : sourceRoot,\n absolutePath,\n ),\n ),\n sourceRoot,\n route: declaration.route\n ? normalizeRoute(\n `${declaration.routeBase ?? \"\"}/${declaration.route}`,\n )\n : routeForPath(declaration.file, undefined, declaration.routeBase),\n ...(declaration.title ? { title: declaration.title } : {}),\n ...(declaration.description\n ? { description: declaration.description }\n : {}),\n ...(declaration.navigation !== undefined\n ? { navigation: declaration.navigation }\n : {}),\n trust: \"mdx\",\n ...(repository ? { repository } : {}),\n },\n ];\n }\n\n const patterns = Array.isArray(declaration.glob)\n ? declaration.glob\n : [declaration.glob];\n const paths = await glob(patterns, {\n cwd: sourceRoot,\n onlyFiles: true,\n dot: false,\n ignore: [\"**/_*/**\", \"**/_*\", ...(declaration.exclude ?? [])],\n });\n return paths.map((path) => {\n const absolutePath = resolveSourcePath(\n sourceRoot,\n path,\n config.content.allowOutsideRoot,\n );\n return {\n sourceId,\n ...(declaration.routeBase ? { routeBase: declaration.routeBase } : {}),\n absolutePath,\n sourcePath: toPosix(relative(sourceRoot, absolutePath)),\n editPath: toPosix(\n relative(inside(root, absolutePath) ? root : sourceRoot, absolutePath),\n ),\n sourceRoot,\n route: routeForPath(path, declaration.base, declaration.routeBase),\n ...(declaration.navigation === false ? { navigation: false } : {}),\n trust: \"mdx\",\n ...(repository ? { repository } : {}),\n };\n });\n}\n\nasync function readEntry(\n source: CollectedSource,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<DocsEntry | undefined> {\n if (\n extname(source.sourcePath).toLowerCase() === \".mdx\" &&\n source.trust !== \"mdx\"\n ) {\n diagnostics.push({\n code: \"DOCS_UNTRUSTED_MDX\",\n severity: \"error\",\n message: `Package MDX requires trust: 'mdx': ${source.sourcePath}.`,\n file: source.sourcePath,\n hint: \"Keep package sources in Markdown-safe mode or explicitly trust this locked artifact.\",\n });\n return undefined;\n }\n const original =\n source.generatedBody ?? (await readFile(source.absolutePath, \"utf8\"));\n let parsedMatter: ReturnType<typeof parseFrontmatter>;\n try {\n parsedMatter = parseFrontmatter(original);\n } catch (error) {\n diagnostics.push({\n code: \"DOCS_FRONTMATTER_INVALID\",\n severity: \"error\",\n message: `Could not parse frontmatter: ${errorMessage(error)}.`,\n file: source.sourcePath,\n });\n return undefined;\n }\n const frontmatter = parsedMatter.data;\n if (frontmatter.sidebar === undefined && source.navigation !== undefined) {\n frontmatter.sidebar = source.navigation;\n }\n const diagnosticCount = diagnostics.length;\n const metadata: Record<string, unknown> = {};\n for (const key of Object.keys(frontmatter)) {\n if (!FRONTMATTER_KEYS.has(key)) {\n if (config.content.frontmatter !== \"reject\") {\n metadata[key] = (frontmatter as Record<string, unknown>)[key];\n delete (frontmatter as Record<string, unknown>)[key];\n continue;\n }\n diagnostics.push({\n code: \"DOCS_FRONTMATTER_INVALID\",\n severity: \"error\",\n message: `Unknown frontmatter key \"${key}\".`,\n file: source.sourcePath,\n });\n }\n }\n validateFrontmatter(frontmatter, source.sourcePath, diagnostics);\n if (diagnostics.length > diagnosticCount) return undefined;\n const mdx = extname(source.sourcePath).toLowerCase() === \".mdx\";\n const parsed = parseMarkdown(parsedMatter.content, { mdx });\n const route = normalizeRoute(\n frontmatter.slug !== undefined\n ? `${source.routeBase ?? \"\"}/${frontmatter.slug}`\n : (source.route ?? routeForPath(source.sourcePath)),\n );\n const title =\n frontmatter.title ??\n source.title ??\n parsed.firstHeading ??\n titleFromFile(source.sourcePath);\n const description =\n frontmatter.description ?? source.description ?? parsed.description;\n await resolvePageMetadata(frontmatter, source, config);\n const duplicateTitles = new Map<string, number>();\n for (const heading of parsed.headings) {\n const count = (duplicateTitles.get(heading.text) ?? 0) + 1;\n duplicateTitles.set(heading.text, count);\n if (count > 1) {\n diagnostics.push({\n code: \"DOCS_HEADING_DUPLICATE\",\n severity: \"warning\",\n message: `Repeated heading \"${heading.text}\" receives the generated ID \"${heading.slug}\".`,\n file: source.sourcePath,\n ...(heading.line ? { line: heading.line } : {}),\n });\n }\n }\n return {\n id: `${source.sourceId}:${source.sourcePath}`,\n sourceId: source.sourceId,\n routeBase: source.routeBase ?? \"/\",\n metadata,\n sourcePath: source.sourcePath,\n absolutePath: source.absolutePath,\n sourceRoot: source.sourceRoot,\n route,\n title,\n ...(description ? { description } : {}),\n frontmatter,\n headings: parsed.headings,\n body: parsedMatter.content,\n transformedBody: parsedMatter.content,\n ast: parsed.ast,\n links: [],\n assets: [],\n trust: source.trust,\n ...(source.packageLock\n ? {\n package: {\n requested: source.packageLock.requested,\n resolved: source.packageLock.resolved,\n },\n }\n : {}),\n };\n}\n\nasync function resolvePageMetadata(\n frontmatter: DocsFrontmatter,\n source: CollectedSource,\n config: NormalizedDocsConfig,\n): Promise<void> {\n if (frontmatter.editUrl === undefined && config.editLink) {\n const baseUrl = config.editLink.baseUrl.endsWith(\"/\")\n ? config.editLink.baseUrl\n : `${config.editLink.baseUrl}/`;\n frontmatter.editUrl = `${baseUrl}${(source.editPath ?? source.sourcePath).replace(/^\\/+/, \"\")}`;\n }\n\n if (frontmatter.lastUpdated === false) return;\n if (frontmatter.lastUpdated === undefined && config.lastUpdated === false) {\n return;\n }\n if (frontmatter.lastUpdated instanceof Date) return;\n\n try {\n const { stdout } = await execFileAsync(\n \"git\",\n [\"log\", \"-1\", \"--format=%ct\", \"--\", source.absolutePath],\n { cwd: source.sourceRoot },\n );\n const timestamp = Number(stdout.trim());\n if (Number.isFinite(timestamp) && timestamp > 0) {\n frontmatter.lastUpdated = new Date(timestamp * 1000);\n }\n } catch {\n // Sources can come from npm caches or directories without Git history.\n }\n}\n\nasync function transformEntry(\n entry: DocsEntry,\n absoluteMap: Map<string, DocsEntry[]>,\n routeMap: Map<string, DocsEntry>,\n repositoryMap: Map<string, RepositoryMetadata>,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<void> {\n sanitizeUntrustedFrontmatter(entry, config, diagnostics);\n const ast = cloneAst(entry.ast);\n if (config.markdown.stripLeadingBadges) stripLeadingBadgeBlock(ast);\n removeRenderedTitle(ast, entry.title);\n\n const htmlTasks: Promise<void>[] = [];\n visit(ast, \"html\", (node) => {\n const policy = rawHtmlPolicy(entry, config);\n if (policy === \"allow\") return;\n if (policy === \"sanitize\") {\n htmlTasks.push(\n sanitizeMarkup(node.value, async (url, kind) => {\n const reference: Link = {\n type: \"link\",\n url,\n children: [],\n ...(node.position ? { position: node.position } : {}),\n };\n if (kind === \"link\") {\n await rewriteLink(\n reference,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n );\n } else {\n const image: Image = {\n type: \"image\",\n url,\n alt: \"\",\n ...(node.position ? { position: node.position } : {}),\n };\n await rewriteAsset(image, entry, config, diagnostics);\n reference.url = image.url;\n }\n return reference.url;\n }).then((html) => {\n node.value = html;\n }),\n );\n return;\n }\n diagnostics.push({\n code:\n policy === \"reject\"\n ? \"DOCS_RAW_HTML_REJECTED\"\n : \"DOCS_RAW_HTML_STRIPPED\",\n severity: policy === \"reject\" ? \"error\" : \"warning\",\n message: `Raw HTML was ${policy === \"reject\" ? \"rejected\" : \"removed\"}: ${entry.sourcePath}.`,\n file: entry.sourcePath,\n ...lineData(node),\n });\n node.value = \"\";\n });\n await Promise.all(htmlTasks);\n\n const referenceKinds = new Map<string, \"link\" | \"image\" | \"mixed\">();\n visit(ast, (node) => {\n if (node.type !== \"linkReference\" && node.type !== \"imageReference\") {\n return;\n }\n const key = node.identifier.toLowerCase();\n const kind = node.type === \"imageReference\" ? \"image\" : \"link\";\n const previous = referenceKinds.get(key);\n referenceKinds.set(key, previous && previous !== kind ? \"mixed\" : kind);\n });\n\n const linkTasks: Promise<void>[] = [];\n visit(ast, (node) => {\n if (node.type === \"link\") {\n linkTasks.push(\n rewriteLink(\n node,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n ),\n );\n } else if (node.type === \"image\") {\n linkTasks.push(rewriteAsset(node, entry, config, diagnostics));\n } else if (node.type === \"definition\") {\n const kind = referenceKinds.get(node.identifier.toLowerCase());\n if (kind === \"image\") {\n linkTasks.push(rewriteAsset(node, entry, config, diagnostics));\n } else if (kind === \"link\") {\n linkTasks.push(\n rewriteLink(\n node,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n ),\n );\n } else if (kind === \"mixed\") {\n linkTasks.push(\n rewriteDefinition(\n node,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n ),\n );\n }\n }\n });\n await Promise.all(linkTasks);\n await rewriteFrontmatterReferences(\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n );\n entry.ast = ast;\n entry.transformedBody = serializeMarkdown(ast, {\n mdx: extname(entry.sourcePath).toLowerCase() === \".mdx\",\n });\n}\n\nfunction sanitizeUntrustedFrontmatter(\n entry: DocsEntry,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): void {\n if (entry.trust !== \"markdown\") return;\n let removed = false;\n const plainText = (value: string): string => {\n const sanitized = value.replace(/<!--[\\s\\S]*?-->|<[^>]*>/g, \"\");\n if (sanitized !== value) removed = true;\n return sanitized;\n };\n\n entry.title = plainText(entry.title);\n if (entry.frontmatter.title !== undefined) {\n entry.frontmatter.title = plainText(entry.frontmatter.title);\n }\n const hero = entry.frontmatter.hero;\n if (hero?.title !== undefined) hero.title = plainText(hero.title);\n if (hero?.tagline !== undefined) hero.tagline = plainText(hero.tagline);\n if (hero?.image && \"html\" in hero.image) {\n delete hero.image;\n removed = true;\n }\n if (entry.frontmatter.banner) {\n entry.frontmatter.banner.content = plainText(\n entry.frontmatter.banner.content,\n );\n }\n if (entry.frontmatter.head) {\n delete entry.frontmatter.head;\n removed = true;\n }\n\n if (removed) {\n diagnostics.push({\n code:\n config.markdown.rawHtml === \"reject\"\n ? \"DOCS_RAW_HTML_REJECTED\"\n : \"DOCS_UNTRUSTED_HTML\",\n severity: config.markdown.rawHtml === \"reject\" ? \"error\" : \"warning\",\n message:\n config.markdown.rawHtml === \"reject\"\n ? `HTML-capable frontmatter is not allowed by markdown.rawHtml: ${entry.sourcePath}.`\n : \"HTML-capable frontmatter was sanitized in package Markdown. Use trust: 'mdx' only for packages you trust.\",\n file: entry.sourcePath,\n });\n }\n}\n\nfunction rawHtmlPolicy(\n entry: DocsEntry,\n config: NormalizedDocsConfig,\n): NormalizedDocsConfig[\"markdown\"][\"rawHtml\"] {\n if (config.markdown.rawHtml === \"reject\") return \"reject\";\n if (config.markdown.rawHtml === \"strip\") return \"strip\";\n return entry.trust === \"markdown\" ? \"sanitize\" : config.markdown.rawHtml;\n}\n\nasync function rewriteFrontmatterReferences(\n entry: DocsEntry,\n absoluteMap: Map<string, DocsEntry[]>,\n routeMap: Map<string, DocsEntry>,\n repositoryMap: Map<string, RepositoryMetadata>,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<void> {\n for (const action of entry.frontmatter.hero?.actions ?? []) {\n const node: Link = { type: \"link\", url: action.link, children: [] };\n await rewriteLink(\n node,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n );\n action.link = node.url;\n }\n\n const image = entry.frontmatter.hero?.image;\n if (!image || \"html\" in image) return;\n if (\"file\" in image) {\n image.file = await rewriteFrontmatterAsset(\n image.file,\n entry,\n config,\n diagnostics,\n );\n return;\n }\n const [dark, light] = await Promise.all([\n rewriteFrontmatterAsset(image.dark, entry, config, diagnostics),\n rewriteFrontmatterAsset(image.light, entry, config, diagnostics),\n ]);\n image.dark = dark;\n image.light = light;\n}\n\nasync function rewriteFrontmatterAsset(\n url: string,\n entry: DocsEntry,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<string> {\n const asset = await materializeAsset(url, entry, config, diagnostics, {});\n entry.assets.push(asset);\n return asset.resolved ?? url;\n}\n\nasync function rewriteLink(\n node: Link | Definition,\n entry: DocsEntry,\n absoluteMap: Map<string, DocsEntry[]>,\n routeMap: Map<string, DocsEntry>,\n repositoryMap: Map<string, RepositoryMetadata>,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<void> {\n const reference: import(\"../types.js\").DocsReference = {\n original: node.url,\n ...lineData(node),\n };\n entry.links.push(reference);\n if (node.url.startsWith(\"source:\")) {\n const { pathname, query, fragment } = splitReference(node.url.slice(7));\n const slash = pathname.indexOf(\"/\");\n const sourceId = slash < 0 ? pathname : pathname.slice(0, slash);\n const sourcePath = safeDecode(pathname.slice(slash + 1));\n const target = [...absoluteMap.values()]\n .flat()\n .find(\n (candidate) =>\n candidate.sourceId === sourceId &&\n candidate.sourcePath === sourcePath,\n );\n if (!target || slash < 0)\n missingLink(diagnostics, entry, node, node.url, config);\n else {\n node.url = `${withBase(target.route, config.build.base)}${query}${fragment ? `#${fragment}` : \"\"}`;\n reference.resolved = node.url;\n reference.targetSource = target.sourcePath;\n validateFragment(fragment, target, entry, node, diagnostics, config);\n }\n return;\n }\n if (unsafeProtocol(node.url)) {\n diagnostic(\n diagnostics,\n \"DOCS_LINK_UNSAFE\",\n `Unsafe URL protocol: ${node.url}.`,\n entry,\n node,\n );\n return;\n }\n if (isExternal(node.url)) {\n const target = config.content.localizeRepositoryLinks\n ? localizedRepositoryTarget(\n node.url,\n entry,\n absoluteMap,\n repositoryMap.get(entry.id),\n )\n : undefined;\n if (!target) return;\n const { query, fragment } = splitReference(node.url);\n node.url = `${withBase(target.route, config.build.base)}${query}${fragment ? `#${fragment}` : \"\"}`;\n reference.resolved = node.url;\n reference.targetSource = target.sourcePath;\n if (fragment) reference.fragment = fragment;\n validateFragment(fragment, target, entry, node, diagnostics, config);\n return;\n }\n if (node.url.startsWith(\"#\")) return;\n const { pathname, query, fragment } = splitReference(node.url);\n if (pathname.startsWith(\"/\")) {\n const target = routeMap.get(normalizeRoute(pathname));\n if (!target) missingLink(diagnostics, entry, node, node.url, config);\n else {\n node.url = `${withBase(target.route, config.build.base)}${query}${fragment ? `#${fragment}` : \"\"}`;\n reference.resolved = node.url;\n reference.targetSource = target.sourcePath;\n if (fragment) reference.fragment = fragment;\n validateFragment(fragment, target, entry, node, diagnostics, config);\n }\n return;\n }\n const decoded = safeDecode(pathname);\n const targetPath = resolve(dirname(entry.absolutePath), decoded);\n if (!inside(entry.sourceRoot, targetPath)) {\n diagnostic(\n diagnostics,\n \"DOCS_SOURCE_OUTSIDE_ROOT\",\n `Link escapes its allowed source root: ${node.url}.`,\n entry,\n node,\n );\n return;\n }\n const target = findDocument(targetPath, absoluteMap, entry.sourceId);\n if (!target) {\n if (documentMatches(targetPath, absoluteMap).length > 1) {\n diagnostic(\n diagnostics,\n \"DOCS_AMBIGUOUS_LINK\",\n `Link matches multiple source mounts: ${node.url}. Use source:<id>/<path> to choose a source.`,\n entry,\n node,\n );\n return;\n }\n if (await isFile(targetPath)) {\n const asset = await materializeAsset(\n node.url,\n entry,\n config,\n diagnostics,\n node,\n );\n if (asset.resolved) {\n node.url = asset.resolved;\n reference.resolved = asset.resolved;\n }\n entry.assets.push(asset);\n return;\n }\n missingLink(diagnostics, entry, node, node.url, config);\n return;\n }\n node.url = `${withBase(target.route, config.build.base)}${query}${fragment ? `#${fragment}` : \"\"}`;\n reference.resolved = node.url;\n reference.targetSource = target.sourcePath;\n if (fragment) reference.fragment = fragment;\n validateFragment(fragment, target, entry, node, diagnostics, config);\n}\n\nasync function rewriteAsset(\n node: Image | Definition,\n entry: DocsEntry,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<void> {\n const asset = await materializeAsset(\n node.url,\n entry,\n config,\n diagnostics,\n node,\n );\n entry.assets.push(asset);\n if (asset.resolved) node.url = asset.resolved;\n}\n\nasync function materializeAsset(\n url: string,\n entry: DocsEntry,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n node: PositionedNode,\n): Promise<DocsAsset> {\n const asset: DocsAsset = { original: url, ...lineData(node) };\n if (unsafeProtocol(url)) {\n diagnostic(\n diagnostics,\n \"DOCS_ASSET_UNSAFE\",\n `Unsafe asset URL: ${url}.`,\n entry,\n node,\n );\n return asset;\n }\n if (isExternal(url) || url.startsWith(\"#\")) return asset;\n const { pathname, query, fragment } = splitReference(url);\n const absolute = resolve(dirname(entry.absolutePath), safeDecode(pathname));\n if (!inside(entry.sourceRoot, absolute)) {\n diagnostic(\n diagnostics,\n \"DOCS_SOURCE_OUTSIDE_ROOT\",\n `Asset escapes its allowed source root: ${url}.`,\n entry,\n node,\n );\n return asset;\n }\n try {\n const info = await stat(absolute);\n if (!info.isFile()) throw new Error(\"not a file\");\n if (info.size > config.build.maxAssetBytes) {\n throw new Error(`asset exceeds ${config.build.maxAssetBytes} bytes`);\n }\n const hash = createHash(\"sha256\")\n .update(await readFile(absolute))\n .digest(\"hex\")\n .slice(0, 12);\n const publicPath = withBase(\n `/_tasty-assets/${hash}-${basename(absolute)}`,\n config.build.base,\n );\n const resolved = `${publicPath}${query}${fragment ? `#${fragment}` : \"\"}`;\n Object.assign(asset, {\n resolved,\n sourcePath: absolute,\n publicPath,\n hash,\n bytes: info.size,\n });\n } catch (error) {\n diagnostic(\n diagnostics,\n \"DOCS_ASSET_NOT_FOUND\",\n `Asset not found or invalid: ${url} (${errorMessage(error)}).`,\n entry,\n node,\n );\n }\n return asset;\n}\n\nasync function rewriteDefinition(\n node: Definition,\n entry: DocsEntry,\n absoluteMap: Map<string, DocsEntry[]>,\n routeMap: Map<string, DocsEntry>,\n repositoryMap: Map<string, RepositoryMetadata>,\n config: NormalizedDocsConfig,\n diagnostics: DocsDiagnostic[],\n): Promise<void> {\n const { pathname } = splitReference(node.url);\n const targetPath = resolve(dirname(entry.absolutePath), safeDecode(pathname));\n if (\n documentMatches(targetPath, absoluteMap).length > 0 ||\n node.url.startsWith(\"source:\") ||\n pathname.startsWith(\"/\")\n ) {\n await rewriteLink(\n node,\n entry,\n absoluteMap,\n routeMap,\n repositoryMap,\n config,\n diagnostics,\n );\n } else {\n await rewriteAsset(node, entry, config, diagnostics);\n }\n}\n\nfunction findDocument(\n path: string,\n absoluteMap: Map<string, DocsEntry[]>,\n sourceId?: string,\n): DocsEntry | undefined {\n const matches = documentMatches(path, absoluteMap);\n return (\n matches.find((item) => item.sourceId === sourceId) ??\n (matches.length === 1 ? matches[0] : undefined)\n );\n}\n\nfunction documentMatches(\n path: string,\n absoluteMap: Map<string, DocsEntry[]>,\n): DocsEntry[] {\n const candidates = [\n path,\n ...MARKDOWN_EXTENSIONS.map((extension) => `${path}${extension}`),\n ...MARKDOWN_EXTENSIONS.map((extension) =>\n resolve(path, `README${extension}`),\n ),\n ...MARKDOWN_EXTENSIONS.map((extension) =>\n resolve(path, `index${extension}`),\n ),\n ];\n for (const candidate of candidates) {\n const matches = absoluteMap.get(normalizeFs(candidate)) ?? [];\n if (matches.length) return matches;\n }\n return [];\n}\n\nfunction validateFragment(\n fragment: string,\n target: DocsEntry,\n source: DocsEntry,\n node: Link | Definition,\n diagnostics: DocsDiagnostic[],\n config: NormalizedDocsConfig,\n): void {\n if (!fragment) return;\n const decoded = safeDecode(fragment);\n if (!target.headings.some((heading) => heading.slug === decoded)) {\n diagnostics.push({\n code: \"DOCS_FRAGMENT_NOT_FOUND\",\n severity: config.build.ci ? \"error\" : \"warning\",\n message: `Heading fragment #${fragment} does not exist on ${target.route}.`,\n file: source.sourcePath,\n ...lineData(node),\n hint: `Known headings: ${target.headings.map((heading) => `#${heading.slug}`).join(\", \") || \"(none)\"}.`,\n });\n }\n}\n\nfunction missingLink(\n diagnostics: DocsDiagnostic[],\n entry: DocsEntry,\n node: Link | Definition,\n url: string,\n config: NormalizedDocsConfig,\n): void {\n diagnostics.push({\n code: \"DOCS_LINK_NOT_FOUND\",\n severity: config.build.strict ? \"error\" : \"warning\",\n message: `Internal link target not found: ${url}.`,\n file: entry.sourcePath,\n ...lineData(node),\n });\n}\n\nfunction validateNavigation(\n items: NavigationItem[],\n routes: Map<string, DocsEntry>,\n diagnostics: DocsDiagnostic[],\n): void {\n for (const item of items) {\n if (typeof item === \"string\") {\n if (!routes.has(normalizeRoute(item))) {\n diagnostics.push({\n code: \"DOCS_NAV_TARGET_NOT_FOUND\",\n severity: \"error\",\n message: `Navigation target does not exist: ${item}.`,\n });\n }\n } else if (\n item.link?.startsWith(\"/\") &&\n !routes.has(normalizeRoute(item.link))\n ) {\n diagnostics.push({\n code: \"DOCS_NAV_TARGET_NOT_FOUND\",\n severity: \"error\",\n message: `Navigation target does not exist: ${item.link}.`,\n });\n }\n if (typeof item !== \"string\" && \"items\" in item) {\n validateNavigation(item.items, routes, diagnostics);\n }\n }\n}\n\nexport function normalizeRoute(route: string): string {\n const clean =\n route\n .split(/[?#]/, 1)[0]\n ?.replace(/\\\\/g, \"/\")\n .replace(/\\/{2,}/g, \"/\") ?? \"/\";\n const segments = clean.split(\"/\").filter(Boolean);\n if (segments.some((segment) => segment === \"..\"))\n throw new Error(`Route may not contain \"..\": ${route}.`);\n const normalized = `/${segments.join(\"/\")}`;\n return normalized === \"/\" ? \"/\" : normalized.replace(/\\/$/, \"\");\n}\n\nexport function routeForPath(\n path: string,\n base?: string,\n routeBase?: string,\n): string {\n let relativePath = toPosix(path);\n if (base) {\n const normalizedBase = toPosix(base)\n .replace(/^\\.\\//, \"\")\n .replace(/\\/$/, \"\");\n if (relativePath === normalizedBase) relativePath = \"\";\n else if (relativePath.startsWith(`${normalizedBase}/`))\n relativePath = relativePath.slice(normalizedBase.length + 1);\n }\n relativePath = relativePath.replace(/\\.(md|mdx)$/i, \"\");\n relativePath = relativePath\n .replace(/(^|\\/)README$/i, \"$1\")\n .replace(/(^|\\/)index$/i, \"$1\");\n return normalizeRoute(`${routeBase ?? \"\"}/${relativePath}`);\n}\n\nfunction resolveSourcePath(\n root: string,\n path: string,\n allowOutsideRoot: boolean,\n): string {\n const absolute = isAbsolute(path) ? resolve(path) : resolve(root, path);\n if (!allowOutsideRoot && !inside(root, absolute))\n throw new OutsideRootError(path);\n return absolute;\n}\n\nfunction inside(root: string, path: string): boolean {\n const rel = relative(resolve(root), resolve(path));\n return (\n rel === \"\" ||\n (!rel.startsWith(`..${sep}`) && rel !== \"..\" && !isAbsolute(rel))\n );\n}\n\nfunction splitReference(url: string): {\n pathname: string;\n query: string;\n fragment: string;\n} {\n const hashIndex = url.indexOf(\"#\");\n const fragment = hashIndex >= 0 ? url.slice(hashIndex + 1) : \"\";\n const withoutHash = hashIndex >= 0 ? url.slice(0, hashIndex) : url;\n const queryIndex = withoutHash.indexOf(\"?\");\n return {\n pathname: queryIndex >= 0 ? withoutHash.slice(0, queryIndex) : withoutHash,\n query: queryIndex >= 0 ? withoutHash.slice(queryIndex) : \"\",\n fragment,\n };\n}\n\nfunction isExternal(url: string): boolean {\n return /^(?:[a-z][a-z\\d+.-]*:|\\/\\/)/i.test(url);\n}\n\nfunction localizedRepositoryTarget(\n value: string,\n entry: DocsEntry,\n entries: Map<string, DocsEntry[]>,\n metadata: RepositoryMetadata | undefined,\n): DocsEntry | undefined {\n if (!metadata) return undefined;\n let link: URL;\n let repository: URL;\n try {\n link = new URL(value);\n repository = new URL(metadata.url);\n } catch {\n return undefined;\n }\n const repositoryPath = repository.pathname.replace(/\\/+$/, \"\");\n if (\n link.origin !== repository.origin ||\n !link.pathname.startsWith(`${repositoryPath}/`)\n ) {\n return undefined;\n }\n const repositoryRelative = safeDecode(\n link.pathname.slice(repositoryPath.length + 1),\n );\n if (\n !/^(?:-\\/(?:blob|tree|raw)|blob|tree|raw|src)\\//.test(repositoryRelative)\n ) {\n return undefined;\n }\n\n const directory = metadata.directory?.replace(/^\\/+|\\/+$/g, \"\");\n const matches = [...entries.values()]\n .flat()\n .filter((candidate) => candidate.sourceRoot === entry.sourceRoot)\n .flatMap((candidate) => {\n const sourcePath = candidate.sourcePath.replace(/^\\/+/, \"\");\n const paths = [sourcePath];\n if (/(?:^|\\/)(?:README|index)\\.mdx?$/i.test(sourcePath)) {\n paths.push(sourcePath.replace(/(?:^|\\/)(?:README|index)\\.mdx?$/i, \"\"));\n }\n const repositoryPaths = paths\n .flatMap((path) => [\n path,\n ...(directory ? [`${directory}/${path}`] : []),\n ])\n .map((path) => path.replace(/\\/+$/, \"\"))\n .filter(Boolean);\n const matched = repositoryPaths.find(\n (path) =>\n repositoryRelative === path ||\n repositoryRelative.endsWith(`/${path}`),\n );\n return matched ? [{ candidate, length: matched.length }] : [];\n })\n .sort(\n (left, right) =>\n Number(right.candidate.sourceId === entry.sourceId) -\n Number(left.candidate.sourceId === entry.sourceId) ||\n right.length - left.length,\n );\n return matches[0]?.candidate;\n}\n\nfunction repositoryMetadata(\n repository:\n string | { type?: string; url?: string; directory?: string } | undefined,\n): RepositoryMetadata | undefined {\n let raw = typeof repository === \"string\" ? repository : repository?.url;\n if (!raw) return undefined;\n raw = raw.replace(/^git\\+/, \"\");\n const scp = /^git@([^:]+):(.+)$/.exec(raw);\n if (scp) raw = `https://${scp[1]}/${scp[2]}`;\n try {\n let url = new URL(raw);\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n if (!url.hostname || ![\"git:\", \"ssh:\"].includes(url.protocol)) {\n return undefined;\n }\n url = new URL(`https://${url.hostname}${url.pathname}`);\n }\n url.search = \"\";\n url.hash = \"\";\n url.pathname = url.pathname.replace(/\\.git\\/?$/, \"\").replace(/\\/+$/, \"\");\n const directory =\n typeof repository === \"object\"\n ? repository.directory?.replaceAll(\"\\\\\", \"/\").replace(/^\\/+|\\/+$/g, \"\")\n : undefined;\n return {\n url: url.href.replace(/\\/$/, \"\"),\n ...(directory ? { directory } : {}),\n };\n } catch {\n return undefined;\n }\n}\n\nfunction unsafeProtocol(url: string): boolean {\n return /^(?:javascript|vbscript|data):/i.test(url.trim());\n}\n\nfunction withBase(route: string, base: string): string {\n const normalizedBase =\n base === \"/\" ? \"\" : `/${base.replace(/^\\/+|\\/+$/g, \"\")}`;\n return `${normalizedBase}${normalizeRoute(route)}` || \"/\";\n}\n\nfunction titleFromFile(path: string): string {\n const raw = basename(path, extname(path)).replace(\n /^README$/i,\n basename(dirname(path)) || \"Documentation\",\n );\n return raw\n .replace(/[-_]+/g, \" \")\n .replace(/\\b\\w/g, (letter) => letter.toUpperCase());\n}\n\nfunction diagnostic(\n diagnostics: DocsDiagnostic[],\n code: string,\n message: string,\n entry: DocsEntry,\n node: PositionedNode,\n): void {\n diagnostics.push({\n code,\n severity: \"error\",\n message,\n file: entry.sourcePath,\n ...lineData(node),\n });\n}\n\ntype PositionedNode = { position?: { start: { line: number } } | undefined };\n\nfunction lineOf(node: PositionedNode): number | undefined {\n return node.position?.start.line;\n}\n\nfunction lineData(\n node: PositionedNode,\n): { line: number } | Record<string, never> {\n const line = lineOf(node);\n return line === undefined ? {} : { line };\n}\n\nfunction safeDecode(value: string): string {\n try {\n return decodeURIComponent(value);\n } catch {\n return value;\n }\n}\n\nfunction sourceLabel(source: DocsSource): string {\n if (\"file\" in source) return source.file;\n if (\"glob\" in source)\n return Array.isArray(source.glob) ? source.glob.join(\", \") : source.glob;\n if (\"openapi\" in source) return source.openapi;\n return source.package;\n}\n\nfunction normalizeFs(path: string): string {\n return resolve(path);\n}\n\nfunction toPosix(path: string): string {\n return path.split(sep).join(\"/\");\n}\n\nasync function isFile(path: string): Promise<boolean> {\n try {\n return (await stat(path)).isFile();\n } catch {\n return false;\n }\n}\n\nasync function isDirectory(path: string): Promise<boolean> {\n try {\n return (await stat(path)).isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nclass OutsideRootError extends Error {\n constructor(path: string) {\n super(`Source path is outside the repository root: ${path}.`);\n this.name = \"OutsideRootError\";\n }\n}\n\nfunction parseFrontmatter(source: string): {\n data: DocsFrontmatter;\n content: string;\n} {\n const match =\n /^(?:\\uFEFF)?---[\\t ]*\\r?\\n([\\s\\S]*?)\\r?\\n(?:---|\\.\\.\\.)[\\t ]*(?:\\r?\\n|$)/.exec(\n source,\n );\n if (!match) return { data: {}, content: source };\n const value = parseYaml(match[1] ?? \"\");\n if (value !== null && !isPlainRecord(value)) {\n throw new Error(\"Markdown frontmatter must be a YAML object.\");\n }\n const data = (value ?? {}) as DocsFrontmatter;\n if (\n typeof data.lastUpdated === \"string\" &&\n !Number.isNaN(Date.parse(data.lastUpdated))\n ) {\n data.lastUpdated = new Date(data.lastUpdated);\n }\n return { data, content: source.slice(match[0].length) };\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction validateFrontmatter(\n value: DocsFrontmatter,\n file: string,\n diagnostics: DocsDiagnostic[],\n): void {\n const record = value as Record<string, unknown>;\n const error = (message: string) =>\n diagnostics.push({\n code: \"DOCS_FRONTMATTER_INVALID\",\n severity: \"error\",\n message,\n file,\n });\n if (\n value.aliases !== undefined &&\n (!Array.isArray(value.aliases) ||\n value.aliases.some((alias) => typeof alias !== \"string\"))\n )\n error(\"aliases must be an array of route strings.\");\n for (const key of [\"title\", \"description\", \"slug\"] as const) {\n if (record[key] !== undefined && typeof record[key] !== \"string\") {\n error(`${key} must be a string.`);\n }\n }\n for (const key of [\"draft\", \"pagefind\"] as const) {\n if (record[key] !== undefined && typeof record[key] !== \"boolean\") {\n error(`${key} must be a boolean.`);\n }\n }\n if (\n record.template !== undefined &&\n record.template !== \"doc\" &&\n record.template !== \"splash\"\n ) {\n error('template must be \"doc\" or \"splash\".');\n }\n for (const key of [\"sidebar\", \"tableOfContents\"] as const) {\n const entry = record[key];\n if (entry !== undefined && entry !== false && !isPlainRecord(entry)) {\n error(`${key} must be false or an object.`);\n }\n }\n if (isPlainRecord(record.sidebar)) {\n validateOptionalStrings(\n record.sidebar,\n [\"label\", \"group\"],\n \"sidebar\",\n error,\n );\n if (\n record.sidebar.order !== undefined &&\n typeof record.sidebar.order !== \"number\"\n ) {\n error(\"sidebar.order must be a number.\");\n }\n }\n if (isPlainRecord(record.tableOfContents)) {\n for (const key of [\"minHeadingLevel\", \"maxHeadingLevel\"] as const) {\n const level = record.tableOfContents[key];\n if (\n level !== undefined &&\n (!Number.isInteger(level) || Number(level) < 1 || Number(level) > 6)\n ) {\n error(`tableOfContents.${key} must be an integer from 1 to 6.`);\n }\n }\n }\n if (\n record.editUrl !== undefined &&\n record.editUrl !== false &&\n typeof record.editUrl !== \"string\"\n ) {\n error(\"editUrl must be false or a string.\");\n }\n if (\n record.lastUpdated !== undefined &&\n typeof record.lastUpdated !== \"boolean\" &&\n !(record.lastUpdated instanceof Date)\n ) {\n error(\"lastUpdated must be a date or boolean.\");\n }\n if (record.hero !== undefined) {\n if (!isPlainRecord(record.hero)) {\n error(\"hero must be an object.\");\n } else {\n validateHero(record.hero, error);\n }\n }\n if (record.banner !== undefined) {\n if (!isPlainRecord(record.banner)) {\n error(\"banner must be an object.\");\n } else if (typeof record.banner.content !== \"string\") {\n error(\"banner.content must be a string.\");\n }\n }\n for (const key of [\"prev\", \"next\"] as const) {\n const adjacent = record[key];\n if (\n adjacent !== undefined &&\n adjacent !== false &&\n typeof adjacent !== \"string\" &&\n !isPlainRecord(adjacent)\n ) {\n error(`${key} must be false, a string, or an object.`);\n } else if (isPlainRecord(adjacent)) {\n validateOptionalStrings(adjacent, [\"link\", \"label\"], key, error);\n }\n }\n if (\n record.head !== undefined &&\n (!Array.isArray(record.head) || !record.head.every(isPlainRecord))\n ) {\n error(\"head must be an array of objects.\");\n }\n}\n\nfunction validateHero(\n hero: Record<string, unknown>,\n error: (message: string) => void,\n): void {\n validateOptionalStrings(hero, [\"title\", \"tagline\"], \"hero\", error);\n if (hero.image !== undefined) {\n if (!isPlainRecord(hero.image)) {\n error(\"hero.image must be an object.\");\n } else {\n const image = hero.image;\n const shapes = [\"html\", \"file\", \"dark\"].filter(\n (key) => image[key] !== undefined,\n );\n if (shapes.length !== 1) {\n error(\n \"hero.image must define exactly one of html, file, or dark/light.\",\n );\n }\n for (const key of [\"html\", \"file\", \"dark\", \"light\", \"alt\"] as const) {\n if (image[key] !== undefined && typeof image[key] !== \"string\") {\n error(`hero.image.${key} must be a string.`);\n }\n }\n if (image.dark !== undefined && typeof image.light !== \"string\") {\n error(\"hero.image.light must accompany hero.image.dark.\");\n }\n if (image.light !== undefined && typeof image.dark !== \"string\") {\n error(\"hero.image.dark must accompany hero.image.light.\");\n }\n }\n }\n if (hero.actions !== undefined) {\n if (!Array.isArray(hero.actions)) {\n error(\"hero.actions must be an array.\");\n } else {\n for (const [index, action] of hero.actions.entries()) {\n if (!isPlainRecord(action)) {\n error(`hero.actions[${index}] must be an object.`);\n continue;\n }\n for (const key of [\"text\", \"link\"] as const) {\n if (typeof action[key] !== \"string\") {\n error(`hero.actions[${index}].${key} must be a string.`);\n }\n }\n if (\n action.variant !== undefined &&\n ![\"primary\", \"secondary\", \"minimal\"].includes(String(action.variant))\n ) {\n error(\n `hero.actions[${index}].variant must be primary, secondary, or minimal.`,\n );\n }\n }\n }\n }\n}\n\nfunction validateOptionalStrings(\n record: Record<string, unknown>,\n keys: readonly string[],\n prefix: string,\n error: (message: string) => void,\n): void {\n for (const key of keys) {\n if (record[key] !== undefined && typeof record[key] !== \"string\") {\n error(`${prefix}.${key} must be a string.`);\n }\n }\n}\n","import type { DocsDiagnostic, DocsGraph } from \"../types.js\";\n\nexport class DocsValidationError extends Error {\n readonly diagnostics: DocsDiagnostic[];\n\n constructor(diagnostics: DocsDiagnostic[]) {\n super(formatDiagnostics(diagnostics));\n this.name = \"DocsValidationError\";\n this.diagnostics = diagnostics;\n }\n}\n\nexport function validateDocs(graph: DocsGraph): DocsDiagnostic[] {\n return [...graph.diagnostics];\n}\n\nexport function assertValidDocs(graph: DocsGraph): void {\n const errors = graph.diagnostics.filter(\n (diagnostic) => diagnostic.severity === \"error\",\n );\n if (errors.length > 0) throw new DocsValidationError(errors);\n}\n\nexport function formatDiagnostics(\n diagnostics: DocsDiagnostic[],\n json = false,\n): string {\n if (json) return JSON.stringify(diagnostics, null, 2);\n return diagnostics\n .map((diagnostic) => {\n const location = diagnostic.file\n ? `${diagnostic.file}${diagnostic.line ? `:${diagnostic.line}` : \"\"}: `\n : \"\";\n const hint = diagnostic.hint ? `\\n hint: ${diagnostic.hint}` : \"\";\n return `${diagnostic.severity.toUpperCase()} ${diagnostic.code} ${location}${diagnostic.message}${hint}`;\n })\n .join(\"\\n\");\n}\n","import { extname, join, relative, sep } from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { createDocsGraph } from \"../graph/index.js\";\nimport { assertValidDocs } from \"../validation/index.js\";\nimport type {\n CreateDocsGraphOptions,\n DocsConfig,\n DocsEntry,\n} from \"../types.js\";\n\nexport interface DocsLoaderContext {\n store: {\n clear(): void;\n set(entry: {\n id: string;\n data: Record<string, unknown>;\n body: string;\n filePath?: string;\n digest?: string;\n rendered?: RenderedContent;\n assetImports?: string[];\n }): void;\n };\n logger?: { info(message: string): void };\n config?: { root: URL | string; srcDir: URL | string };\n parseData?: (input: {\n id: string;\n data: Record<string, unknown>;\n filePath?: string;\n }) => Promise<Record<string, unknown>>;\n renderMarkdown?: (\n content: string,\n options?: { fileURL?: URL },\n ) => Promise<RenderedContent>;\n generateDigest?: (data: Record<string, unknown> | string) => string;\n}\n\ninterface RenderedContent {\n html: string;\n metadata?: {\n imagePaths?: string[];\n headings?: Array<{ depth: number; slug: string; text: string }>;\n frontmatter?: Record<string, unknown>;\n [key: string]: unknown;\n };\n}\n\nexport function createDocsLoader(\n config?: DocsConfig,\n options: Omit<CreateDocsGraphOptions, \"config\"> = {},\n) {\n return {\n name: \"@tenphi/docs\",\n async load(context: DocsLoaderContext): Promise<void> {\n const graph = await createDocsGraph({\n ...options,\n ...(config ? { config } : {}),\n });\n assertValidDocs(graph);\n context.store.clear();\n for (const entry of graph.entries) {\n const loaderEntry = toLoaderEntry(entry);\n const filePath = starlightFilePath(entry, context.config);\n const data = context.parseData\n ? await context.parseData({\n id: loaderEntry.id,\n data: loaderEntry.data,\n filePath,\n })\n : loaderEntry.data;\n const rendered = await context.renderMarkdown?.(entry.transformedBody, {\n fileURL: pathToFileURL(entry.absolutePath),\n });\n context.store.set({\n ...loaderEntry,\n data,\n filePath,\n ...(context.generateDigest\n ? { digest: context.generateDigest(entry.transformedBody) }\n : {}),\n ...(rendered\n ? {\n rendered,\n assetImports: rendered.metadata?.imagePaths ?? [],\n }\n : {}),\n });\n }\n context.logger?.info(`Loaded ${graph.entries.length} Cookbook pages.`);\n },\n };\n}\n\nfunction starlightFilePath(\n entry: DocsEntry,\n config?: DocsLoaderContext[\"config\"],\n): string {\n const id = entry.route === \"/\" ? \"index\" : entry.route.slice(1);\n const extension =\n extname(entry.sourcePath).toLowerCase() === \".mdx\" ? \".mdx\" : \".md\";\n if (!config) return `src/content/docs/${id}${extension}`;\n\n const root = toPath(config.root);\n const srcDir = toPath(config.srcDir);\n return relative(root, join(srcDir, \"content\", \"docs\", `${id}${extension}`))\n .split(sep)\n .join(\"/\");\n}\n\nfunction toPath(value: URL | string): string {\n return typeof value === \"string\" ? value : fileURLToPath(value);\n}\n\nfunction toLoaderEntry(entry: DocsEntry): {\n id: string;\n data: Record<string, unknown>;\n body: string;\n} {\n return {\n id: entry.route === \"/\" ? \"index\" : entry.route.slice(1),\n data: {\n title: entry.title,\n draft: entry.frontmatter.draft ?? false,\n ...(entry.description ? { description: entry.description } : {}),\n ...entry.frontmatter,\n cookbook: {\n sourcePath: entry.sourcePath,\n route: entry.route,\n headings: entry.headings,\n },\n },\n body: entry.transformedBody,\n };\n}\n\nexport type { DocsEntry, DocsGraph, DocsRoute, DocsAsset } from \"../types.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAMA,MAAM,SAAS;CACb,GAAG;CACH,OAAO;EAAC;EAAU;EAAS;EAAU;EAAU;EAAS;CAAU;CAClE,WAAW;EACT,GAAG,cAAc;EACjB,MAAM,CAAC,GAAI,cAAc,WAAW,QAAQ,CAAC,GAAI,QAAQ;CAC3D;CACA,YAAY;EACV,GAAG,cAAc;EACjB,KACE,cAAc,aAAa,IAAI,EAAE,QAC9B,cACC,OAAO,cAAc,YACrB,CAAC;GACC;GACA;GACA;GACA;GACA;GACA;EACF,CAAC,CAAC,SAAS,SAAS,CACxB,KAAK,CAAC;CACV;AACF;;AAGA,eAAsB,eACpB,MACA,SACiB;CACjB,MAAM,UAAU,6BAA6B,KAAK,KAAK,KAAK,CAAC;CAC7D,IAAI,SAAS;EACX,MAAM,MAAM,QAAQ,EAAE,EAAE,YAAY,KAAK;EACzC,OAAO,OAAO,UAAU,SAAS,GAAG,IAAI,KAAK,IAAI,KAAK;CACxD;CACA,MAAM,OAAO,SAAS,SAAS,MAAM,EAAE,UAAU,KAAK,CAAC,GAAG,MAAM;CAChE,MAAM,QAAyB,CAAC;CAChC,MAAM,MAAM,YAAY,YAAY;EAClC,KAAK,MAAM,CAAC,UAAU,SAAS,CAC7B,CAAC,QAAQ,MAAM,GACf,CAAC,OAAO,OAAO,CACjB,GAAY;GACV,MAAM,QAAQ,QAAQ,WAAW;GACjC,IAAI,OAAO,UAAU,UAAU;GAC/B,MAAM,KACJ,QAAQ,OAAO,IAAI,CAAC,CAAC,MAAM,aAAa;IACtC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, D as EditLinkConfig, E as DocsSource, F as NavigationTab, G as ThemeFont, H as SiteIconConfig, I as NormalizedDocsConfig, J as ThemePaletteColor, K as ThemeFontFile, L as PackageDiscovery, M as NavigationConfig, N as NavigationItem, O as HeadConfig, P as NavigationPlacement, Q as TypographyPreset, R as PackageLockSource, S as DocsGraph, T as DocsRoute, U as SiteVersion, V as SiteConfig, W as ThemeConfig, X as ThemeTokenValue, Y as ThemePaletteConfig, Z as ThemeTokens, _ as DocsAsset, a as COOKBOOK_COMPONENT_SUB_ELEMENTS, b as DocsEntry, c as ComponentStylesConfig, d as CookbookComponentName, f as CookbookComponentStyles, g as DiagnosticSeverity, h as CreateDocsGraphOptions, i as COOKBOOK_COMPONENT_NAMES, j as MarkdownConfig, k as HeaderLink, l as ComponentsConfig, m as CookbookLock, n as BrandDeclaration, o as ComponentStyleConfig, p as CookbookComponentSubElementName, q as ThemeFonts, r as BuildConfig, s as ComponentStyles, t as BrandConfig, u as ContentConfig, v as DocsConfig, w as DocsReference, x as DocsFrontmatter, y as DocsDiagnostic, z as PackageManifest } from "./types-C-AgUcAb.js";
|
|
2
2
|
import { DocsConfigError, defineDocsConfig, mergeDocsConfig, normalizeDocsConfig, validateConfig } from "./config/index.js";
|
|
3
3
|
import { createDocsLoader } from "./content/index.js";
|
|
4
4
|
//#region src/project/index.d.ts
|
|
@@ -54,5 +54,5 @@ declare function validateDocs(graph: DocsGraph): DocsDiagnostic[];
|
|
|
54
54
|
declare function assertValidDocs(graph: DocsGraph): void;
|
|
55
55
|
declare function formatDiagnostics(diagnostics: DocsDiagnostic[], json?: boolean): string;
|
|
56
56
|
//#endregion
|
|
57
|
-
export { type BrandConfig, type BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, type ComponentStyleConfig, type ComponentStyles, type ComponentStylesConfig, type ComponentsConfig, type ContentConfig, type CookbookComponentName, type CookbookComponentStyles, type CookbookComponentSubElementName, type CookbookLock, type CreateDocsGraphOptions, type DiagnosticSeverity, type DocsAsset, type DocsConfig, DocsConfigError, type DocsDiagnostic, type DocsEntry, type DocsFrontmatter, type DocsGraph, type DocsHeading, type DocsProject, type DocsProjectOptions, type DocsReference, type DocsRoute, type DocsSource, DocsValidationError, type EditLinkConfig, type HeadConfig, type HeaderLink, type LocaleConfig, type MarkdownConfig, type NavigationConfig, type NavigationItem, type NavigationPlacement, type NavigationTab, type NormalizedDocsConfig, type PackageDiscovery, type PackageLockSource, type PackageManifest, type SearchConfig, type SiteConfig, type SiteIconConfig, type ThemeConfig, type ThemePaletteConfig, type ThemeTokenValue, type ThemeTokens, type TypographyPreset, type TypographyPresets, assertSafePackagePath, assertValidDocs, createDocsGraph, createDocsLoader, defaultLock, defineDocsConfig, discoverPackage, formatDiagnostics, lockForSource, materializePackage, mergeDocsConfig, normalizeDocsConfig, normalizeRoute, packageNameFromSpecifier, readDocsLock, reconcileDocsLock, resolveDocsProject, resolvePackageLock, routeForPath, validateConfig, validateDocs, validateLock, writeDocsLock };
|
|
57
|
+
export { type BrandConfig, type BrandDeclaration, type BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, type ComponentStyleConfig, type ComponentStyles, type ComponentStylesConfig, type ComponentsConfig, type ContentConfig, type CookbookComponentName, type CookbookComponentStyles, type CookbookComponentSubElementName, type CookbookLock, type CreateDocsGraphOptions, type DiagnosticSeverity, type DocsAsset, type DocsConfig, DocsConfigError, type DocsDiagnostic, type DocsEntry, type DocsFrontmatter, type DocsGraph, type DocsHeading, type DocsProject, type DocsProjectOptions, type DocsReference, type DocsRoute, type DocsSource, DocsValidationError, type EditLinkConfig, type HeadConfig, type HeaderLink, type LocaleConfig, type MarkdownConfig, type NavigationConfig, type NavigationItem, type NavigationPlacement, type NavigationTab, type NormalizedDocsConfig, type PackageDiscovery, type PackageLockSource, type PackageManifest, type SearchConfig, type SiteConfig, type SiteIconConfig, type SiteVersion, type ThemeConfig, type ThemeFont, type ThemeFontFile, type ThemeFonts, type ThemePaletteColor, type ThemePaletteConfig, type ThemeTokenValue, type ThemeTokens, type TypographyPreset, type TypographyPresets, assertSafePackagePath, assertValidDocs, createDocsGraph, createDocsLoader, defaultLock, defineDocsConfig, discoverPackage, formatDiagnostics, lockForSource, materializePackage, mergeDocsConfig, normalizeDocsConfig, normalizeRoute, packageNameFromSpecifier, readDocsLock, reconcileDocsLock, resolveDocsProject, resolvePackageLock, routeForPath, validateConfig, validateDocs, validateLock, writeDocsLock };
|
|
58
58
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/project/index.ts","../src/graph/index.ts","../src/npm/index.ts","../src/validation/index.ts"],"mappings":";;;;UAOiB;;EAEf;;EAEA;;EAEA,SAAS;;UAGM;EACf;EACA,QAAQ;EACR;;;iBAIoB,mBACpB,UAAS,qBACR,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/project/index.ts","../src/graph/index.ts","../src/npm/index.ts","../src/validation/index.ts"],"mappings":";;;;UAOiB;;EAEf;;EAEA;;EAEA,SAAS;;UAGM;EACf;EACA,QAAQ;EACR;;;iBAIoB,mBACpB,UAAS,qBACR,QAAQ;;;iBCmEW,gBACpB,UAAS,yBACR,QAAQ;iBA8oCK,eAAe;iBAaf,aACd,cACA,eACA;;;UC/tCe;EACf;EACA;;iBAGoB,mBACpB,mBACA,UAAS,wBACR,QAAQ;iBA0BW,aACpB,eACC,QAAQ;iBAaW,cACpB,cACA,MAAM,eACL;;iBAgBmB,kBACpB,QAAQ,YACR,UAAU,0BACV;EACE;EACA,iBAAiB;IAElB,QAAQ;iBAgFK,aAAa,MAAM;iBAiCb,mBACpB,QAAQ,mBACR,QAAQ,+BACR,uBACC;iBAoHmB,gBAAgB,eAAe,QAAQ;iBAyD7C,yBAAyB;iBAOzB,cACd,MAAM,0BACN,oBACC;;iBASa,sBAAsB,cAAc;iBAcpC,YAAY,SAAS,sBAAsB;;;cCza9C,4BAA4B;WAC9B,aAAa;EAEtB,YAAY,aAAa;;iBAOX,aAAa,OAAO,YAAY;iBAIhC,gBAAgB,OAAO;iBAOvB,kBACd,aAAa,kBACb"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as validateConfig, i as normalizeDocsConfig, n as defineDocsConfig, o as COOKBOOK_COMPONENT_NAMES, r as mergeDocsConfig, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, t as DocsConfigError } from "./config-
|
|
2
|
-
import { _ as resolvePackageLock, a as validateDocs, c as routeForPath, d as discoverPackage, f as lockForSource, g as reconcileDocsLock, h as readDocsLock, i as formatDiagnostics, l as assertSafePackagePath, m as packageNameFromSpecifier, n as DocsValidationError, o as createDocsGraph, p as materializePackage, r as assertValidDocs, s as normalizeRoute, t as createDocsLoader, u as defaultLock, v as validateLock, y as writeDocsLock } from "./content-
|
|
1
|
+
import { a as validateConfig, i as normalizeDocsConfig, n as defineDocsConfig, o as COOKBOOK_COMPONENT_NAMES, r as mergeDocsConfig, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, t as DocsConfigError } from "./config-Ci9Nv0wQ.js";
|
|
2
|
+
import { _ as resolvePackageLock, a as validateDocs, c as routeForPath, d as discoverPackage, f as lockForSource, g as reconcileDocsLock, h as readDocsLock, i as formatDiagnostics, l as assertSafePackagePath, m as packageNameFromSpecifier, n as DocsValidationError, o as createDocsGraph, p as materializePackage, r as assertValidDocs, s as normalizeRoute, t as createDocsLoader, u as defaultLock, v as validateLock, y as writeDocsLock } from "./content-XLQlJDnf.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as DocsHeading, at as Root, et as Content, it as PhrasingContent, nt as Link, rt as Paragraph, tt as Heading } from "../types-C-AgUcAb.js";
|
|
2
2
|
//#region src/markdown/index.d.ts
|
|
3
3
|
interface ParsedMarkdown {
|
|
4
4
|
ast: Root;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlazeColorValue } from "@tenphi/glaze";
|
|
1
|
+
import { GlazeColorInput, GlazeColorValue, RegularColorDef } from "@tenphi/glaze";
|
|
2
2
|
import { Styles, StylesWithoutSelectors } from "@tenphi/tasty/core";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
|
|
4
4
|
// ## Interfaces
|
|
@@ -1059,6 +1059,8 @@ interface SiteConfig {
|
|
|
1059
1059
|
title?: string;
|
|
1060
1060
|
/** Version of the documented package, rendered beside the site title. */
|
|
1061
1061
|
version?: string;
|
|
1062
|
+
/** Selectable documentation versions and their route roots. */
|
|
1063
|
+
versions?: SiteVersion[];
|
|
1062
1064
|
description?: string;
|
|
1063
1065
|
url?: string;
|
|
1064
1066
|
repository?: string;
|
|
@@ -1067,6 +1069,10 @@ interface SiteConfig {
|
|
|
1067
1069
|
/** Source artwork used to generate browser, touch, and installable-app icons. */
|
|
1068
1070
|
favicon?: string | SiteIconConfig;
|
|
1069
1071
|
}
|
|
1072
|
+
interface SiteVersion {
|
|
1073
|
+
label: string;
|
|
1074
|
+
routeBase: string;
|
|
1075
|
+
}
|
|
1070
1076
|
interface HeaderLink {
|
|
1071
1077
|
label: string;
|
|
1072
1078
|
/** HTTP(S) URL, root-relative route (prefixed with the site base), or fragment. */
|
|
@@ -1129,6 +1135,11 @@ type DocsSource = {
|
|
|
1129
1135
|
index?: string;
|
|
1130
1136
|
routeBase?: string;
|
|
1131
1137
|
trust?: "markdown" | "mdx";
|
|
1138
|
+
} | {
|
|
1139
|
+
/** Local OpenAPI 3.x JSON or YAML document. */
|
|
1140
|
+
openapi: string;
|
|
1141
|
+
root?: string;
|
|
1142
|
+
routeBase?: string;
|
|
1132
1143
|
});
|
|
1133
1144
|
interface ContentConfig {
|
|
1134
1145
|
sources?: DocsSource[];
|
|
@@ -1163,13 +1174,21 @@ interface NavigationConfig {
|
|
|
1163
1174
|
/** Optional primary navigation rendered as a compact row below the header. */
|
|
1164
1175
|
tabs?: NavigationTab[];
|
|
1165
1176
|
}
|
|
1177
|
+
type BrandDeclaration = Pick<GlazeColorInput, "hue" | "saturation"> & {
|
|
1178
|
+
/** Single tone for the brand seed; contrast targets adapt it per mode. */
|
|
1179
|
+
tone: number;
|
|
1180
|
+
contrast?: {
|
|
1181
|
+
apca: number | [number, number];
|
|
1182
|
+
};
|
|
1183
|
+
unsafeContrast?: boolean;
|
|
1184
|
+
};
|
|
1166
1185
|
type BrandConfig = GlazeColorValue | {
|
|
1167
1186
|
from: GlazeColorValue;
|
|
1168
1187
|
contrast?: {
|
|
1169
1188
|
apca: number | [number, number];
|
|
1170
1189
|
};
|
|
1171
1190
|
unsafeContrast?: boolean;
|
|
1172
|
-
};
|
|
1191
|
+
} | BrandDeclaration;
|
|
1173
1192
|
type ThemeTokenValue = string | number;
|
|
1174
1193
|
/**
|
|
1175
1194
|
* Tasty design tokens. `$name` is emitted as `--name`; existing `--name`
|
|
@@ -1215,25 +1234,48 @@ interface TypographyPresets {
|
|
|
1215
1234
|
code?: TypographyPreset;
|
|
1216
1235
|
[name: string]: TypographyPreset | undefined;
|
|
1217
1236
|
}
|
|
1218
|
-
/**
|
|
1237
|
+
/** A font file served from the site's `public/` directory. */
|
|
1238
|
+
interface ThemeFontFile {
|
|
1239
|
+
/** Root-relative public URL, for example `/fonts/brand.woff2`. */
|
|
1240
|
+
src: string;
|
|
1241
|
+
/** A single weight or a variable-font range such as `"100 900"`. */
|
|
1242
|
+
weight?: number | `${number} ${number}`;
|
|
1243
|
+
style?: "normal" | "italic";
|
|
1244
|
+
}
|
|
1245
|
+
/** A Google Fonts family or a set of files hosted by the site. */
|
|
1246
|
+
type ThemeFont = string | {
|
|
1247
|
+
google: string;
|
|
1248
|
+
weights?: number[];
|
|
1249
|
+
} | {
|
|
1250
|
+
family: string;
|
|
1251
|
+
files: ThemeFontFile[];
|
|
1252
|
+
};
|
|
1253
|
+
interface ThemeFonts {
|
|
1254
|
+
body?: ThemeFont;
|
|
1255
|
+
heading?: ThemeFont;
|
|
1256
|
+
code?: ThemeFont;
|
|
1257
|
+
}
|
|
1258
|
+
/** A Glaze declaration, or a literal color retained as a convenient seed shorthand. */
|
|
1259
|
+
type ThemePaletteColor = GlazeColorValue | RegularColorDef;
|
|
1260
|
+
/** Semantic palette declarations resolved for every appearance mode. */
|
|
1219
1261
|
interface ThemePaletteConfig {
|
|
1220
|
-
info?:
|
|
1221
|
-
success?:
|
|
1222
|
-
warning?:
|
|
1223
|
-
danger?:
|
|
1262
|
+
info?: ThemePaletteColor;
|
|
1263
|
+
success?: ThemePaletteColor;
|
|
1264
|
+
warning?: ThemePaletteColor;
|
|
1265
|
+
danger?: ThemePaletteColor;
|
|
1224
1266
|
/** Light-scheme page surface; dark and high-contrast values adapt. */
|
|
1225
|
-
surface?:
|
|
1226
|
-
/** Translucent header surface
|
|
1227
|
-
header?:
|
|
1228
|
-
/** Fixed underlay
|
|
1229
|
-
overlay?:
|
|
1230
|
-
/** Primary reading text
|
|
1231
|
-
text?:
|
|
1232
|
-
/** Secondary text
|
|
1233
|
-
textSoft?:
|
|
1267
|
+
surface?: ThemePaletteColor;
|
|
1268
|
+
/** Translucent header surface; defaults to the page surface declaration. */
|
|
1269
|
+
header?: ThemePaletteColor;
|
|
1270
|
+
/** Fixed underlay; defaults to black at 50% opacity in every scheme. */
|
|
1271
|
+
overlay?: ThemePaletteColor;
|
|
1272
|
+
/** Primary reading text, resolved against `surface`. */
|
|
1273
|
+
text?: ThemePaletteColor;
|
|
1274
|
+
/** Secondary reading text, resolved against `surface`. */
|
|
1275
|
+
textSoft?: ThemePaletteColor;
|
|
1234
1276
|
}
|
|
1235
1277
|
/** Cookbook UI surfaces whose default Tasty styles can be customized. */
|
|
1236
|
-
declare const COOKBOOK_COMPONENT_NAMES: readonly ["Card", "Callout", "CodeGroup", "Tab", "Footer", "Hero", "PageFrame", "HeaderFrame", "HeaderLinks", "Layout", "SearchButton", "TableOfContentsLayout", "LanguageSelect", "Logo", "MarkdownCodeBlock", "MarkdownHeading", "MarkdownInlineCode", "MarkdownTable", "Mermaid", "MobileMenuFooter", "MobileMenuToggle", "MobileNavigationTabs", "MobileTableOfContents", "PackageVersion", "Preview", "Sidebar", "SocialIcons", "Steps", "Tabs", "TableOfContents", "ThemeSelect", "TopNavigation", "StarlightHeader"];
|
|
1278
|
+
declare const COOKBOOK_COMPONENT_NAMES: readonly ["Card", "Callout", "CodeGroup", "Tab", "Footer", "Hero", "PageFrame", "HeaderFrame", "HeaderLinks", "Layout", "SearchButton", "TableOfContentsLayout", "LanguageSelect", "Logo", "MarkdownCodeBlock", "MarkdownHeading", "MarkdownInlineCode", "MarkdownTable", "Mermaid", "MobileMenuFooter", "MobileMenuToggle", "MobileNavigationTabs", "MobileTableOfContents", "PackageVersion", "VersionSwitcher", "Preview", "Sidebar", "SocialIcons", "Steps", "Tabs", "TableOfContents", "ThemeSelect", "TopNavigation", "StarlightHeader"];
|
|
1237
1279
|
type CookbookComponentName = (typeof COOKBOOK_COMPONENT_NAMES)[number];
|
|
1238
1280
|
/** Named Tasty sub-elements available on each configurable Cookbook surface. */
|
|
1239
1281
|
declare const COOKBOOK_COMPONENT_SUB_ELEMENTS: {
|
|
@@ -1261,6 +1303,7 @@ declare const COOKBOOK_COMPONENT_SUB_ELEMENTS: {
|
|
|
1261
1303
|
readonly MobileNavigationTabs: readonly ["Trigger", "Marker", "Caret", "ExpandedCaret", "Label", "List", "Item", "Link", "HoverLink", "CurrentLink"];
|
|
1262
1304
|
readonly MobileTableOfContents: readonly ["Item", "Link", "LinkLabel", "HoverLink", "CurrentLink", "CurrentIndicator"];
|
|
1263
1305
|
readonly PackageVersion: readonly [];
|
|
1306
|
+
readonly VersionSwitcher: readonly ["Trigger", "Panel", "OpenPanel", "Link", "CurrentLink"];
|
|
1264
1307
|
readonly Preview: readonly ["Caption", "Stage", "Frame", "Code", "Summary", "Pre"];
|
|
1265
1308
|
readonly Sidebar: readonly ["Backdrop", "OpenBackdrop", "MobileHeading", "HomeLink", "HomeLogo", "HomeLabel", "Close", "HoverClose", "CloseIcon", "CurrentLink", "OpenPane", "Content", "Tree", "List", "Item", "TopLevelSpacing", "GroupSpacing", "NestedItem", "SectionHeading", "Control", "Summary", "GroupLabel", "GroupLabelText", "Link", "LinkLabel", "InteractiveControl", "SummaryMarker", "Caret", "ExpandedCaret", "LinkedSummary", "GroupLink", "LinkedSectionHeading", "SectionLink", "Badge", "TopLevelLink"];
|
|
1266
1309
|
readonly Steps: readonly ["Item", "Marker"];
|
|
@@ -1289,6 +1332,7 @@ type ComponentStylesConfig = { [Name in CookbookComponentName]?: CookbookCompone
|
|
|
1289
1332
|
interface ThemeConfig {
|
|
1290
1333
|
brand?: BrandConfig;
|
|
1291
1334
|
palette?: ThemePaletteConfig;
|
|
1335
|
+
fonts?: ThemeFonts;
|
|
1292
1336
|
states?: Record<string, string>;
|
|
1293
1337
|
tokens?: ThemeTokens;
|
|
1294
1338
|
presets?: TypographyPresets;
|
|
@@ -1523,5 +1567,5 @@ interface CreateDocsGraphOptions {
|
|
|
1523
1567
|
base?: string;
|
|
1524
1568
|
}
|
|
1525
1569
|
//#endregion
|
|
1526
|
-
export {
|
|
1527
|
-
//# sourceMappingURL=types-
|
|
1570
|
+
export { TypographyPresets as $, LocaleConfig as A, SearchConfig as B, DocsHeading as C, EditLinkConfig as D, DocsSource as E, NavigationTab as F, ThemeFont as G, SiteIconConfig as H, NormalizedDocsConfig as I, ThemePaletteColor as J, ThemeFontFile as K, PackageDiscovery as L, NavigationConfig as M, NavigationItem as N, HeadConfig as O, NavigationPlacement as P, TypographyPreset as Q, PackageLockSource as R, DocsGraph as S, DocsRoute as T, SiteVersion as U, SiteConfig as V, ThemeConfig as W, ThemeTokenValue as X, ThemePaletteConfig as Y, ThemeTokens as Z, DocsAsset as _, COOKBOOK_COMPONENT_SUB_ELEMENTS as a, Root as at, DocsEntry as b, ComponentStylesConfig as c, CookbookComponentName as d, Content as et, CookbookComponentStyles as f, DiagnosticSeverity as g, CreateDocsGraphOptions as h, COOKBOOK_COMPONENT_NAMES as i, PhrasingContent as it, MarkdownConfig as j, HeaderLink as k, ComponentsConfig as l, CookbookLock as m, BrandDeclaration as n, Link as nt, ComponentStyleConfig as o, CookbookComponentSubElementName as p, ThemeFonts as q, BuildConfig as r, Paragraph as rt, ComponentStyles as s, BrandConfig as t, Heading as tt, ContentConfig as u, DocsConfig as v, DocsReference as w, DocsFrontmatter as x, DocsDiagnostic as y, PackageManifest as z };
|
|
1571
|
+
//# sourceMappingURL=types-C-AgUcAb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-C-AgUcAb.d.ts","names":[],"sources":["../../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts","../../../node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/mdast/index.d.ts","../src/types.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAqBiB;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;KCjFH;;;;;;;;;;KAWA;;;;;UAOK;;;;;EAKb;;;;;;;;;;;UAYa;;;;;;;;;;;;;;EAcb;;;;;;;;;;EAWA;;;;;UAMa,kBAAkB;;;;EAI/B,eAAe;;;;;UAMF;;;;EAIb;;;;;EAKA;;;;;;;;;;;;;;;;;;;;;UAuBa,aAAa;;;;;;;;;KAWlB,eAAe,sBAAsB;;;;;;;;;;;;;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aAAa;EACb,aAAa,gBAAgB;EAC7B,cAAc,oBAAoB,oBAAoB;;UAGvC;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;IAAwB;IAAe;IAAc;;EACrD;IACE;IACA;IACA;IACA;MAAU,QAAQ;;;EAEpB;EACA;;UAGe;EACf;EACA,UAAU;EACV;EACA;EACA;;UAGe;EACf;EACA,SAAS;EACT,OAAO;;EAEP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Repository-native content and configuration engine for Cookbook",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"LICENSE"
|
|
34
34
|
],
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": ">=22.
|
|
36
|
+
"node": ">=22.19"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|