@wildo-ai/saas-technical-doc 1.1.2 → 1.1.4
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/dist/esm/build/csp-emit.d.ts.map +1 -1
- package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-administration-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts +25 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.js +28 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts +133 -0
- package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/application-domain-documentation.js +243 -0
- package/dist/esm/companion/application-documentation/application-domain-documentation.js.map +1 -0
- package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-integration-documentation.js +23 -0
- package/dist/esm/companion/application-documentation/application-integration-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts +30 -0
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.js +38 -0
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +61 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +255 -218
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +2 -0
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +1 -0
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -1
- package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
- package/dist/esm/companion/index.d.ts +2 -1
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/index.js +2 -1
- package/dist/esm/companion/index.js.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.d.ts +112 -0
- package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -0
- package/dist/esm/companion/manual-controller-route-projection.js +249 -0
- package/dist/esm/companion/manual-controller-route-projection.js.map +1 -0
- package/dist/esm/companion/openapi-generator.d.ts +16 -0
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js +493 -26
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts +44 -0
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js +37 -0
- package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
- package/dist/esm/companion/publish-result.types.d.ts +37 -4
- package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
- package/dist/esm/companion/publish-result.types.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts +7 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +34 -18
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +8 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.js +30 -13
- package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts +10 -0
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js +10 -15
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -1
- package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts +27 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts +33 -0
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -0
- package/dist/esm/companion/technical-documentation-diagram-definitions.js +54 -0
- package/dist/esm/companion/technical-documentation-diagram-definitions.js.map +1 -0
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts +10 -18
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.js +9 -39
- package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -1
- package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
- package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts +8 -4
- package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.js +8 -4
- package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +42 -64
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js +164 -925
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
- package/dist/esm/content.exports.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
- package/dist/esm/openapi/index.d.ts.map +1 -1
- package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts +16 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.js +18 -2
- package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
- package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +35 -13
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.js +28 -19
- package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
- package/dist/esm/runtime/index.d.ts +1 -0
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +1 -0
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts +21 -0
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -0
- package/dist/esm/runtime/use-docs-provider-sdks.js +49 -0
- package/dist/esm/runtime/use-docs-provider-sdks.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts +0 -9
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +0 -1
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +0 -111
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-docusaurus-renderer.js","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-docusaurus-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,EAC3C,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,GAInC,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EACL,mCAAmC,GACpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,6CAA6C,EAG7C,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;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Ac,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC7D,sBAAsB,EAAE,0BAA0B;gBAClD,SAAS,EAAE,kBAAkB;gBAC7B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;aAClE;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n TechnicalDocumentationAssetResolutionStatus,\n TechnicalDocumentationLinkKind,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationApiReferenceTargetV1,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport { escapeMarkdownForMdx } from './technical-documentation-mdx-escaping';\nimport { isImplicitLeadSection, pruneUnpublishedSiteLinks } from './technical-documentation-markdown-links';\nimport {\n technicalDocumentationAssetFileStem,\n} from '../technical-documentation-asset-path';\nimport {\n createTechnicalDocumentationRendererExecution,\n type TechnicalDocumentationRenderModel,\n type TechnicalDocumentationRendererResult,\n ENGINE_UNIT_ROUTES,\n} from './technical-documentation-render-model';\n\n/**\n * Statuses whose asset carries real bytes at a real path, and therefore renders.\n *\n * `PLACEHOLDER` belongs here with `RESOLVED`: the framework materializes a stand-in image,\n * so the page shows a picture rather than a hole. That is the whole distinction from\n * `MISSING` — both mean \"the real capture has not run\", but only one of them SHIPS\n * something. Rendering is a question about bytes; whether provisional imagery may be\n * published at all is an environment policy decided at publication, not here.\n */\nconst RENDERABLE_ASSET_STATUSES: ReadonlySet<TechnicalDocumentationAssetResolutionStatus> = new Set([\n TechnicalDocumentationAssetResolutionStatus.PLACEHOLDER,\n TechnicalDocumentationAssetResolutionStatus.RESOLVED,\n]);\n\nconst DOCUSAURUS_RENDERER_REF = 'technical-documentation:renderer/docusaurus';\n\n/**\n * Reader-facing names for the product responsibilities in the portal.\n *\n * Folder names are stable routing mechanics, not customer copy: exposing\n * `user-administration` in the sidebar leaks a URL convention. A category\n * with a landing document links to that document and excludes it from the\n * dropdown, so readers select the category for orientation and expand it for\n * focused tasks. A landing may use the category's canonical root path or the\n * conventional nested `overview` path; the former keeps a public entry route\n * concise without introducing a redirect or duplicate document.\n */\nconst DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY: Readonly<Record<string, string>> = {\n 'access-and-identity': 'Access and identity',\n 'billing-and-subscriptions': 'Billing and subscriptions',\n integrations: 'Integrations',\n 'security-and-audit': 'Security and audit',\n 'user-administration': 'User administration',\n};\n\ntype DocusaurusJourneyItem = string | {\n readonly landingPath: string;\n readonly childPaths: readonly string[];\n};\n\ntype DocusaurusSidebarItem = string | {\n readonly type: 'category';\n readonly label: string;\n readonly collapsible: true;\n readonly collapsed: true;\n readonly link?: { readonly type: 'doc'; readonly id: string };\n readonly items: readonly DocusaurusSidebarItem[];\n};\n\n/**\n * A category is a reader journey, not an alphabetized file listing. Most\n * categories need no override; user administration does, because readers first\n * choose how accounts are managed and then follow the relevant task sequence.\n *\n * A journey landing is rendered as a clickable second-level category. It is\n * deliberately absent from that category's children: selecting the label opens\n * the explanation, while expanding it reveals the concrete tasks. Plain paths\n * remain direct children for work that spans several journeys.\n */\nconst DOCUSAURUS_CATEGORY_JOURNEY_BY_DIRECTORY: Readonly<Record<string, readonly DocusaurusJourneyItem[]>> = {\n 'billing-and-subscriptions': [\n {\n landingPath: 'billing-and-subscriptions/plans-and-access',\n childPaths: ['billing-and-subscriptions/start-subscription'],\n },\n 'billing-and-subscriptions/change-or-end-subscription',\n {\n landingPath: 'billing-and-subscriptions/billing-records',\n childPaths: [\n 'billing-and-subscriptions/invoices-and-payments',\n 'billing-and-subscriptions/metered-usage',\n ],\n },\n 'billing-and-subscriptions/reconcile-access',\n 'billing-and-subscriptions/troubleshoot',\n ],\n 'security-and-audit': [\n 'security-and-audit/investigate-event',\n 'security-and-audit/review-access-changes',\n 'security-and-audit/export-audit-records',\n {\n landingPath: 'security-and-audit/configure-siem',\n childPaths: [\n 'security-and-audit/siem-splunk',\n 'security-and-audit/siem-microsoft-sentinel',\n 'security-and-audit/siem-elastic',\n 'security-and-audit/operate-siem',\n ],\n },\n 'security-and-audit/protect-evidence',\n ],\n 'access-and-identity': [\n {\n landingPath: 'access-and-identity/sign-in-and-mfa',\n childPaths: [\n 'access-and-identity/complete-sign-in',\n 'access-and-identity/mfa-enrollment-and-recovery',\n 'access-and-identity/sign-in-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/single-sign-on',\n childPaths: [\n 'access-and-identity/sso-configure',\n 'access-and-identity/sso-rollout-and-recovery',\n 'access-and-identity/sso-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/api-keys',\n childPaths: [\n 'access-and-identity/api-keys-create-and-store',\n 'access-and-identity/api-keys-lifecycle',\n 'access-and-identity/api-keys-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/oauth-provider',\n childPaths: [\n 'access-and-identity/oauth-register-client',\n 'access-and-identity/oauth-authorize-delegated-access',\n 'access-and-identity/oauth-operate-and-revoke',\n ],\n },\n ],\n 'user-administration': [\n {\n landingPath: 'user-administration/manage-users-manually',\n childPaths: [\n 'user-administration/invite-and-onboard-user',\n 'user-administration/roles-and-permissions',\n 'user-administration/change-user-access',\n 'user-administration/suspend-or-remove-user',\n ],\n },\n {\n landingPath: 'user-administration/manage-organization-units',\n childPaths: [\n 'user-administration/design-organization-unit-hierarchy',\n 'user-administration/assign-organization-unit-access',\n 'user-administration/operate-organization-units',\n ],\n },\n 'user-administration/review-users-and-access',\n 'user-administration/troubleshoot-user-access',\n {\n landingPath: 'user-administration/scim-provisioning',\n childPaths: [\n 'user-administration/scim-protocol-and-payloads',\n 'user-administration/scim-configure',\n 'user-administration/scim-microsoft-entra',\n 'user-administration/scim-okta',\n 'user-administration/scim-ldap-and-active-directory',\n 'user-administration/scim-map-profile-and-units',\n 'user-administration/scim-validate-and-roll-out',\n 'user-administration/scim-operate-and-troubleshoot',\n ],\n },\n ],\n integrations: [\n {\n landingPath: 'integrations/automation-platforms',\n childPaths: [\n 'integrations/automation/n8n',\n 'integrations/automation/zapier',\n 'integrations/automation/make',\n ],\n },\n {\n landingPath: 'integrations/ai-coding-tools',\n childPaths: [\n 'integrations/ai-tools/cursor',\n 'integrations/ai-tools/codex',\n 'integrations/ai-tools/claude-code',\n ],\n },\n {\n landingPath: 'integrations/rest-api',\n childPaths: [\n 'integrations/rest/conventions',\n 'integrations/rest/send-request',\n 'integrations/rest/read-collections',\n 'integrations/rest/write-and-reconcile',\n 'integrations/rest/troubleshoot',\n ],\n },\n {\n landingPath: 'integrations/webhooks',\n childPaths: [\n 'integrations/webhooks/configure-and-test',\n 'integrations/webhooks/verify-delivery',\n 'integrations/webhooks/operate-deliveries',\n 'integrations/webhooks/troubleshoot',\n ],\n },\n {\n landingPath: 'integrations/agents',\n childPaths: [\n 'integrations/mcp',\n 'integrations/a2a',\n ],\n },\n 'integrations/create-your-own-integration',\n ],\n};\n\nfunction renderDocusaurusCategoryItems(input: {\n readonly directory: string;\n readonly itemPaths: readonly string[];\n readonly unitTitleByPath: ReadonlyMap<string, string>;\n}): DocusaurusSidebarItem[] {\n const availablePaths = new Set(input.itemPaths);\n const claimedPaths = new Set<string>();\n const journey = DOCUSAURUS_CATEGORY_JOURNEY_BY_DIRECTORY[input.directory] ?? [];\n const renderedJourney = journey.flatMap((item): DocusaurusSidebarItem[] => {\n if (typeof item === 'string') {\n if (!availablePaths.has(item)) return [];\n claimedPaths.add(item);\n return [item];\n }\n\n const availableChildPaths = item.childPaths.filter((path) => availablePaths.has(path));\n for (const path of availableChildPaths) claimedPaths.add(path);\n if (!availablePaths.has(item.landingPath)) {\n // Applicability may omit a landing while retaining an independently\n // useful task. Never hide those tasks merely because their group cannot\n // be rendered as a linked category in this publication.\n return availableChildPaths;\n }\n\n const label = input.unitTitleByPath.get(item.landingPath);\n if (label === undefined) throw new Error(`technical-documentation Docusaurus journey landing is missing a reader title: ${item.landingPath}`);\n claimedPaths.add(item.landingPath);\n // A landing without applicable child tasks is a document, not an empty\n // disclosure control. This preserves the same no-duplicate/no-empty-arrow\n // rule used for top-level single-page responsibilities.\n if (availableChildPaths.length === 0) return [item.landingPath];\n return [{\n type: 'category',\n label,\n collapsible: true,\n collapsed: true,\n link: { type: 'doc', id: item.landingPath },\n items: availableChildPaths,\n }];\n });\n\n return [\n ...renderedJourney,\n ...input.itemPaths.filter((path) => !claimedPaths.has(path)).sort((left, right) => left.localeCompare(right)),\n ];\n}\n\n/**\n * Authors use tilde fences because this content module itself is a TypeScript\n * template literal. CommonMark accepts them, but the installed Docusaurus\n * Mermaid integration recognizes backtick fences only. Normalize just a\n * well-formed Mermaid pair at this renderer boundary: prose authors stay\n * renderer-neutral, while the renderer emits the fence syntax its MDX plugin\n * actually executes. Other fenced examples retain their authored delimiter.\n */\nfunction normalizeMermaidFencesForDocusaurus(markdown: string): string {\n let insideTildeMermaidFence = false;\n return markdown.split('\\n').map((line) => {\n if (/^\\s{0,3}~~~mermaid\\s*$/.test(line)) {\n insideTildeMermaidFence = true;\n return line.replace('~~~mermaid', '```mermaid');\n }\n if (insideTildeMermaidFence && /^\\s{0,3}~~~\\s*$/.test(line)) {\n insideTildeMermaidFence = false;\n return line.replace('~~~', '```');\n }\n return line;\n }).join('\\n');\n}\n\nfunction renderUnit(unit: TechnicalDocumentationUnitV1, model: TechnicalDocumentationRenderModel, assetPathByRef: ReadonlyMap<string, string>, resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string): string {\n const path = model.unitPathByRef.get(unit.unitRef) as string;\n // Every field below carries authored or derived PROSE into an `.mdx` file, so each one is a\n // site where a route template like `/organizations/{organizationId}/todos` would compile fine\n // and then crash the page in the reader's browser. Escaping is applied per field rather than\n // once over the assembled document on purpose: the assembly also emits `---` frontmatter and\n // Markdown punctuation this must not touch, and `title` is JSON-encoded rather than Markdown.\n const publishedPaths = new Set(model.unitPathByRef.values());\n const sections = unit.sections\n .map((section, index) => {\n const body = escapeMarkdownForMdx(pruneUnpublishedSiteLinks(normalizeMermaidFencesForDocusaurus(section.bodyMarkdown), publishedPaths, ENGINE_UNIT_ROUTES));\n // The lead section is what the author wrote between the title and the first `##`. It is\n // the page's opening, not a section called \"Overview\", so it renders without a heading.\n return isImplicitLeadSection(section, index) ? body : `## ${escapeMarkdownForMdx(section.heading)}\\n\\n${body}`;\n })\n .join('\\n\\n');\n const figures = unit.assetRequests.flatMap((request) => {\n const assetPath = assetPathByRef.get(request.assetRef);\n return assetPath === undefined ? [] : [``];\n });\n const links = unit.links.flatMap((link) => {\n const label = escapeMarkdownForMdx(link.label);\n if (link.kind === TechnicalDocumentationLinkKind.UNIT) {\n const target = model.unitPathByRef.get(link.targetUnitRef as string);\n if (target === undefined) throw new Error(`technical-documentation Docusaurus link target is absent: ${link.targetUnitRef}`);\n return [`- [${label}](/${target})`];\n }\n if (link.kind === TechnicalDocumentationLinkKind.EXTERNAL) return [`- [${label}](${link.externalUrl})`];\n if (link.kind === TechnicalDocumentationLinkKind.API_REFERENCE) {\n if (resolveApiReferenceTarget === undefined) throw new Error(`technical-documentation API-reference link was not resolved before Docusaurus rendering: ${link.linkRef}`);\n return [`- [${label}](${resolveApiReferenceTarget(link.apiReferenceTarget as TechnicalDocumentationApiReferenceTargetV1)})`];\n }\n return [];\n });\n const assetSection = figures.length === 0 ? '' : `\\n\\n## Product view\\n\\n${figures.join('\\n\\n')}`;\n const relatedSection = links.length === 0 ? '' : `\\n\\n## Related\\n\\n${links.join('\\n')}`;\n const summary = escapeMarkdownForMdx(unit.summary);\n return `---\\nid: ${path.split('/').at(-1)}\\ntitle: ${JSON.stringify(unit.title)}\\nsidebar_label: ${JSON.stringify(unit.title)}\\n---\\n\\n${summary}\\n\\n${sections}${assetSection}${relatedSection}\\n`;\n}\n\nfunction renderDocusaurusSidebars(model: TechnicalDocumentationRenderModel): string {\n const rootDocumentPaths: string[] = [];\n const rootDocumentPathSet = new Set<string>();\n const categoryItems: DocusaurusSidebarItem[] = [];\n const claimedRootLandingPaths = new Set<string>();\n const pathsByDirectory = new Map<string, string[]>();\n const unitTitleByPath = new Map<string, string>();\n for (const unit of model.units) {\n const path = model.unitPathByRef.get(unit.unitRef) as string;\n unitTitleByPath.set(path, unit.title);\n const [directory] = path.split('/');\n if (directory === undefined || !path.includes('/')) {\n rootDocumentPaths.push(path);\n rootDocumentPathSet.add(path);\n continue;\n }\n const paths = pathsByDirectory.get(directory) ?? [];\n paths.push(path);\n pathsByDirectory.set(directory, paths);\n }\n\n for (const [directory, paths] of [...pathsByDirectory.entries()].sort(([left], [right]) => left.localeCompare(right))) {\n const label = DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY[directory];\n if (label === undefined) throw new Error(`technical-documentation Docusaurus category is missing a reader label: ${directory}`);\n const overviewPath = `${directory}/overview`;\n // A root document and a child directory may deliberately share one route\n // identity (`user-administration` + `user-administration/*`). That exact\n // path relation—not mutable display copy—makes the root document the\n // category landing. Labels remain free to evolve without breaking IA.\n const rootLandingPath = rootDocumentPathSet.has(directory) ? directory : undefined;\n const landingPath = paths.includes(overviewPath) ? overviewPath : rootLandingPath;\n if (rootLandingPath !== undefined && landingPath === rootLandingPath) claimedRootLandingPaths.add(rootLandingPath);\n const itemPaths = paths.filter((path) => path !== overviewPath);\n const [onlyItemPath] = itemPaths;\n\n // A category with one identically named document is not a journey: rendering\n // both creates two adjacent controls with the same reader meaning. Flatten\n // only that exact shape. A differently named single document remains under\n // its responsibility label because the category still adds useful context.\n if (landingPath === undefined && itemPaths.length === 1 && onlyItemPath !== undefined && unitTitleByPath.get(onlyItemPath) === label) {\n categoryItems.push(onlyItemPath);\n continue;\n }\n\n const orderedItems = renderDocusaurusCategoryItems({ directory, itemPaths, unitTitleByPath });\n categoryItems.push({\n type: 'category',\n label,\n collapsible: true,\n // Docusaurus expands the category containing the active document. Keeping\n // other journeys collapsed makes the sidebar scale with the catalogue.\n collapsed: true,\n ...(landingPath === undefined ? {} : { link: { type: 'doc', id: landingPath } }),\n items: orderedItems,\n });\n }\n\n const rootItems = [\n ...rootDocumentPaths.filter((path) => !claimedRootLandingPaths.has(path)),\n ...categoryItems,\n ];\n return `${JSON.stringify({ docs: rootItems }, null, 2)}\\n`;\n}\n\nexport function renderTechnicalDocumentationDocusaurus(input: {\n readonly model: TechnicalDocumentationRenderModel;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly assetBytesByPath: ReadonlyMap<string, Uint8Array>;\n readonly resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string;\n}): TechnicalDocumentationRendererResult {\n const assetPathByRef = new Map(input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) =>\n RENDERABLE_ASSET_STATUSES.has(asset.status) ? [[asset.assetRef, asset.normalizedRelativePath as string]] : []));\n const sourceUnitRefsByAssetRef = new Map<string, string[]>();\n for (const unit of input.model.units) {\n for (const request of unit.assetRequests) {\n const owners = sourceUnitRefsByAssetRef.get(request.assetRef) ?? [];\n owners.push(unit.unitRef);\n sourceUnitRefsByAssetRef.set(request.assetRef, owners);\n }\n }\n const pageFiles = input.model.units.map((unit) => {\n const path = input.model.unitPathByRef.get(unit.unitRef) as string;\n return {\n // The full route identity is part of the output identity. Two valid pages\n // may share their final slug (`integrations/todos` and\n // `user-administration/users`) without sharing a file or a manifest row.\n outputRef: `technical-documentation:output/docusaurus/${path.split('/').join(':')}`,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT,\n sourceUnitRefs: [unit.unitRef],\n normalizedRelativePath: `docusaurus/docs/${path}.mdx`,\n mediaType: 'text/mdx',\n bytes: Buffer.from(renderUnit(unit, input.model, assetPathByRef, input.resolveApiReferenceTarget), 'utf8'),\n } as const;\n });\n const assetFiles = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => {\n if (!RENDERABLE_ASSET_STATUSES.has(asset.status)) return [];\n const path = asset.normalizedRelativePath as string;\n const bytes = input.assetBytesByPath.get(path);\n if (bytes === undefined) throw new Error(`technical-documentation Docusaurus asset bytes are absent: ${path}`);\n const sourceUnitRefs = [...(sourceUnitRefsByAssetRef.get(asset.assetRef) ?? [])].sort();\n if (sourceUnitRefs.length === 0) throw new Error(`technical-documentation resolved asset has no authorized unit owner: ${asset.assetRef}`);\n return [{\n outputRef: `technical-documentation:output/asset/${technicalDocumentationAssetFileStem(asset.assetRef)}`,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.ASSET,\n sourceUnitRefs,\n normalizedRelativePath: `docusaurus/static/${path}`,\n mediaType: asset.mediaType,\n bytes,\n }];\n });\n return {\n execution: createTechnicalDocumentationRendererExecution({\n rendererKind: TechnicalDocumentationRendererKind.DOCUSAURUS,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n rendererVersion: 1,\n configurationRef: 'technical-documentation:renderer-configuration/docusaurus-v1',\n }),\n files: [\n ...pageFiles,\n ...assetFiles,\n {\n outputRef: 'technical-documentation:output/docusaurus-sidebars',\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.NAVIGATION_INDEX,\n sourceUnitRefs: input.model.units.map((unit) => unit.unitRef),\n normalizedRelativePath: 'docusaurus/sidebars.json',\n mediaType: 'application/json',\n bytes: Buffer.from(renderDocusaurusSidebars(input.model), 'utf8'),\n },\n ],\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-docusaurus-renderer.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-docusaurus-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,EAC3C,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,GAInC,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCA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AAgB,EAAE,8DAA8D;SACjF,CAAC;QACF,KAAK,EAAE;YACL,GAAG,SAAS;YACZ,GAAG,UAAU;YACb;gBACE,SAAS,EAAE,oDAAoD;gBAC/D,WAAW,EAAE,uBAAuB;gBACpC,UAAU,EAAE,gCAAgC,CAAC,gBAAgB;gBAC7D,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC7D,sBAAsB,EAAE,0BAA0B;gBAClD,SAAS,EAAE,kBAAkB;gBAC7B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;aAClE;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n TechnicalDocumentationAssetResolutionStatus,\n TechnicalDocumentationLinkKind,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationApiReferenceTargetV1,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport { escapeMarkdownForMdx } from './technical-documentation-mdx-escaping';\nimport { isImplicitLeadSection, pruneUnpublishedSiteLinks } from './technical-documentation-markdown-links';\nimport {\n technicalDocumentationAssetFileStem,\n} from '../technical-documentation-asset-path';\nimport {\n createTechnicalDocumentationRendererExecution,\n type TechnicalDocumentationRenderModel,\n type TechnicalDocumentationRendererResult,\n ENGINE_UNIT_ROUTES,\n} from './technical-documentation-render-model';\n\n/**\n * Statuses whose asset carries real bytes at a real path, and therefore renders.\n *\n * `PLACEHOLDER` belongs here with `RESOLVED`: the framework materializes a stand-in image,\n * so the page shows a picture rather than a hole. That is the whole distinction from\n * `MISSING` — both mean \"the real capture has not run\", but only one of them SHIPS\n * something. Rendering is a question about bytes; whether provisional imagery may be\n * published at all is an environment policy decided at publication, not here.\n */\nconst RENDERABLE_ASSET_STATUSES: ReadonlySet<TechnicalDocumentationAssetResolutionStatus> = new Set([\n TechnicalDocumentationAssetResolutionStatus.PLACEHOLDER,\n TechnicalDocumentationAssetResolutionStatus.RESOLVED,\n]);\n\nconst DOCUSAURUS_RENDERER_REF = 'technical-documentation:renderer/docusaurus';\n\n/**\n * Reader-facing names for the product responsibilities in the portal.\n *\n * Folder names are stable routing mechanics, not customer copy: exposing\n * `user-administration` in the sidebar leaks a URL convention. A category\n * with a landing document links to that document and excludes it from the\n * dropdown, so readers select the category for orientation and expand it for\n * focused tasks. A landing may use the category's canonical root path or the\n * conventional nested `overview` path; the former keeps a public entry route\n * concise without introducing a redirect or duplicate document.\n */\nconst DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY: Readonly<Record<string, string>> = {\n 'access-and-identity': 'Access and identity',\n /*\n * The per-resource pages nest under the page that lists them, which makes this a category the\n * moment an application publishes a resource of its own. It has a LANDING document at the\n * category's canonical root path — the overview — so a reader selects it for orientation and\n * expands it for one resource.\n *\n * The label is generic where the pages beneath it are not, and deliberately: an application's\n * own name for this part of its product is a fact only the application has, and it already\n * states it inside the page. Putting a projected value here would make the sidebar the one\n * surface whose words come from somewhere the renderer cannot see.\n */\n 'what-this-application-manages': 'What this application manages',\n integrations: 'Integrations',\n 'security-and-audit': 'Security and audit',\n 'user-administration': 'User administration',\n};\n\ntype DocusaurusJourneyItem = string | {\n readonly landingPath: string;\n readonly childPaths: readonly string[];\n};\n\ntype DocusaurusSidebarItem = string | {\n readonly type: 'category';\n readonly label: string;\n readonly collapsible: true;\n readonly collapsed: true;\n readonly link?: { readonly type: 'doc'; readonly id: string };\n readonly items: readonly DocusaurusSidebarItem[];\n};\n\n/**\n * A category is a reader journey, not an alphabetized file listing. Most\n * categories need no override; user administration does, because readers first\n * choose how accounts are managed and then follow the relevant task sequence.\n *\n * A journey landing is rendered as a clickable second-level category. It is\n * deliberately absent from that category's children: selecting the label opens\n * the explanation, while expanding it reveals the concrete tasks. Plain paths\n * remain direct children for work that spans several journeys.\n */\nconst DOCUSAURUS_CATEGORY_JOURNEY_BY_DIRECTORY: Readonly<Record<string, readonly DocusaurusJourneyItem[]>> = {\n 'security-and-audit': [\n // First in the section on purpose: somebody reaching this during an incident has no time to\n // browse, and every other page here is a capability rather than a response.\n 'security-and-audit/respond-to-leaked-credential',\n 'security-and-audit/investigate-event',\n 'security-and-audit/review-access-changes',\n 'security-and-audit/export-audit-records',\n {\n landingPath: 'security-and-audit/configure-siem',\n childPaths: [\n 'security-and-audit/siem-splunk',\n 'security-and-audit/siem-microsoft-sentinel',\n 'security-and-audit/siem-elastic',\n 'security-and-audit/operate-siem',\n ],\n },\n 'security-and-audit/protect-evidence',\n ],\n 'access-and-identity': [\n {\n landingPath: 'access-and-identity/sign-in-and-mfa',\n childPaths: [\n 'access-and-identity/complete-sign-in',\n 'access-and-identity/mfa-enrollment-and-recovery',\n 'access-and-identity/sign-in-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/single-sign-on',\n childPaths: [\n 'access-and-identity/sso-configure',\n 'access-and-identity/sso-rollout-and-recovery',\n 'access-and-identity/sso-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/api-keys',\n childPaths: [\n 'access-and-identity/api-keys-create-and-store',\n 'access-and-identity/api-keys-lifecycle',\n 'access-and-identity/api-keys-troubleshoot',\n ],\n },\n {\n landingPath: 'access-and-identity/oauth-provider',\n childPaths: [\n 'access-and-identity/oauth-register-client',\n 'access-and-identity/oauth-authorize-delegated-access',\n 'access-and-identity/oauth-operate-and-revoke',\n ],\n },\n ],\n 'user-administration': [\n {\n landingPath: 'user-administration/manage-users-manually',\n childPaths: [\n 'user-administration/invite-and-onboard-user',\n 'user-administration/roles-and-permissions',\n 'user-administration/change-user-access',\n 'user-administration/suspend-or-remove-user',\n ],\n },\n {\n landingPath: 'user-administration/manage-organization-units',\n childPaths: [\n 'user-administration/design-organization-unit-hierarchy',\n 'user-administration/assign-organization-unit-access',\n 'user-administration/operate-organization-units',\n ],\n },\n 'user-administration/review-users-and-access',\n 'user-administration/troubleshoot-user-access',\n {\n landingPath: 'user-administration/scim-provisioning',\n childPaths: [\n 'user-administration/scim-protocol-and-payloads',\n 'user-administration/scim-configure',\n 'user-administration/scim-microsoft-entra',\n 'user-administration/scim-okta',\n 'user-administration/scim-ldap-and-active-directory',\n 'user-administration/scim-map-profile-and-units',\n 'user-administration/scim-validate-and-roll-out',\n 'user-administration/scim-operate-and-troubleshoot',\n ],\n },\n ],\n integrations: [\n {\n landingPath: 'integrations/automation-platforms',\n childPaths: [\n 'integrations/automation/n8n',\n 'integrations/automation/zapier',\n 'integrations/automation/make',\n ],\n },\n {\n landingPath: 'integrations/ai-coding-tools',\n childPaths: [\n 'integrations/ai-tools/cursor',\n 'integrations/ai-tools/codex',\n 'integrations/ai-tools/claude-code',\n ],\n },\n {\n landingPath: 'integrations/rest-api',\n childPaths: [\n 'integrations/rest/conventions',\n 'integrations/rest/send-request',\n 'integrations/rest/read-collections',\n 'integrations/rest/write-and-reconcile',\n 'integrations/rest/troubleshoot',\n ],\n },\n {\n landingPath: 'integrations/webhooks',\n childPaths: [\n 'integrations/webhooks/configure-and-test',\n 'integrations/webhooks/verify-delivery',\n 'integrations/webhooks/operate-deliveries',\n 'integrations/webhooks/troubleshoot',\n ],\n },\n {\n landingPath: 'integrations/agents',\n childPaths: [\n 'integrations/mcp',\n 'integrations/a2a',\n ],\n },\n 'integrations/create-your-own-integration',\n ],\n};\n\nfunction renderDocusaurusCategoryItems(input: {\n readonly directory: string;\n readonly itemPaths: readonly string[];\n readonly unitTitleByPath: ReadonlyMap<string, string>;\n}): DocusaurusSidebarItem[] {\n const availablePaths = new Set(input.itemPaths);\n const claimedPaths = new Set<string>();\n const journey = DOCUSAURUS_CATEGORY_JOURNEY_BY_DIRECTORY[input.directory] ?? [];\n const renderedJourney = journey.flatMap((item): DocusaurusSidebarItem[] => {\n if (typeof item === 'string') {\n if (!availablePaths.has(item)) return [];\n claimedPaths.add(item);\n return [item];\n }\n\n const availableChildPaths = item.childPaths.filter((path) => availablePaths.has(path));\n for (const path of availableChildPaths) claimedPaths.add(path);\n if (!availablePaths.has(item.landingPath)) {\n // Applicability may omit a landing while retaining an independently\n // useful task. Never hide those tasks merely because their group cannot\n // be rendered as a linked category in this publication.\n return availableChildPaths;\n }\n\n const label = input.unitTitleByPath.get(item.landingPath);\n if (label === undefined) throw new Error(`technical-documentation Docusaurus journey landing is missing a reader title: ${item.landingPath}`);\n claimedPaths.add(item.landingPath);\n // A landing without applicable child tasks is a document, not an empty\n // disclosure control. This preserves the same no-duplicate/no-empty-arrow\n // rule used for top-level single-page responsibilities.\n if (availableChildPaths.length === 0) return [item.landingPath];\n return [{\n type: 'category',\n label,\n collapsible: true,\n collapsed: true,\n link: { type: 'doc', id: item.landingPath },\n items: availableChildPaths,\n }];\n });\n\n return [\n ...renderedJourney,\n ...input.itemPaths.filter((path) => !claimedPaths.has(path)).sort((left, right) => left.localeCompare(right)),\n ];\n}\n\n/**\n * Authors use tilde fences because this content module itself is a TypeScript\n * template literal. CommonMark accepts them, but the installed Docusaurus\n * Mermaid integration recognizes backtick fences only. Normalize just a\n * well-formed Mermaid pair at this renderer boundary: prose authors stay\n * renderer-neutral, while the renderer emits the fence syntax its MDX plugin\n * actually executes. Other fenced examples retain their authored delimiter.\n */\nfunction normalizeMermaidFencesForDocusaurus(markdown: string): string {\n let insideTildeMermaidFence = false;\n return markdown.split('\\n').map((line) => {\n if (/^\\s{0,3}~~~mermaid\\s*$/.test(line)) {\n insideTildeMermaidFence = true;\n return line.replace('~~~mermaid', '```mermaid');\n }\n if (insideTildeMermaidFence && /^\\s{0,3}~~~\\s*$/.test(line)) {\n insideTildeMermaidFence = false;\n return line.replace('~~~', '```');\n }\n return line;\n }).join('\\n');\n}\n\nfunction renderUnit(unit: TechnicalDocumentationUnitV1, model: TechnicalDocumentationRenderModel, assetPathByRef: ReadonlyMap<string, string>, resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string | null): string {\n const path = model.unitPathByRef.get(unit.unitRef) as string;\n // Every field below carries authored or derived PROSE into an `.mdx` file, so each one is a\n // site where a route template like `/organizations/{organizationId}/todos` would compile fine\n // and then crash the page in the reader's browser. Escaping is applied per field rather than\n // once over the assembled document on purpose: the assembly also emits `---` frontmatter and\n // Markdown punctuation this must not touch, and `title` is JSON-encoded rather than Markdown.\n const publishedPaths = new Set(model.unitPathByRef.values());\n const sections = unit.sections\n .map((section, index) => {\n const body = escapeMarkdownForMdx(pruneUnpublishedSiteLinks(normalizeMermaidFencesForDocusaurus(section.bodyMarkdown), publishedPaths, ENGINE_UNIT_ROUTES));\n // The lead section is what the author wrote between the title and the first `##`. It is\n // the page's opening, not a section called \"Overview\", so it renders without a heading.\n return isImplicitLeadSection(section, index) ? body : `## ${escapeMarkdownForMdx(section.heading)}\\n\\n${body}`;\n })\n .join('\\n\\n');\n const figures = unit.assetRequests.flatMap((request) => {\n const assetPath = assetPathByRef.get(request.assetRef);\n return assetPath === undefined ? [] : [``];\n });\n const links = unit.links.flatMap((link) => {\n const label = escapeMarkdownForMdx(link.label);\n if (link.kind === TechnicalDocumentationLinkKind.UNIT) {\n const target = model.unitPathByRef.get(link.targetUnitRef as string);\n if (target === undefined) throw new Error(`technical-documentation Docusaurus link target is absent: ${link.targetUnitRef}`);\n return [`- [${label}](/${target})`];\n }\n if (link.kind === TechnicalDocumentationLinkKind.EXTERNAL) return [`- [${label}](${link.externalUrl})`];\n if (link.kind === TechnicalDocumentationLinkKind.API_REFERENCE) {\n if (resolveApiReferenceTarget === undefined) throw new Error(`technical-documentation API-reference link was not resolved before Docusaurus rendering: ${link.linkRef}`);\n /*\n * A `null` resolution means the target is not published by THIS application — a guide links to\n * a resource the application has feature-gated off. It degrades to plain text; the rest of the\n * portal publishes (#472, decided 2026-09-08).\n *\n * This used to throw, from inside `renderUnit`, which runs BEFORE the generated tree is\n * synchronized — so one missing target wrote NOTHING AT ALL. Not a broken link: no portal.\n * With 43 hardcoded engine `apiReferenceTargets` naming resources an application may switch\n * off, any application not enabling all 43 could not publish documentation.\n *\n * The `undefined` guard above is a DIFFERENT failure and still throws: it means the caller\n * wired no resolver, so nothing was even asked. Degrading there would hide a wiring mistake.\n *\n * Reporting the degradation is the CALLER's job — see the resolver the companion supplies. A\n * portal that quietly drops links would be worse than one that failed loudly, which is why\n * this half is not the whole fix.\n */\n const href = resolveApiReferenceTarget(link.apiReferenceTarget as TechnicalDocumentationApiReferenceTargetV1);\n return href === null ? [`- ${label}`] : [`- [${label}](${href})`];\n }\n return [];\n });\n const assetSection = figures.length === 0 ? '' : `\\n\\n## Product view\\n\\n${figures.join('\\n\\n')}`;\n const relatedSection = links.length === 0 ? '' : `\\n\\n## Related\\n\\n${links.join('\\n')}`;\n const summary = escapeMarkdownForMdx(unit.summary);\n return `---\\nid: ${path.split('/').at(-1)}\\ntitle: ${JSON.stringify(unit.title)}\\nsidebar_label: ${JSON.stringify(unit.title)}\\n---\\n\\n${summary}\\n\\n${sections}${assetSection}${relatedSection}\\n`;\n}\n\nfunction renderDocusaurusSidebars(model: TechnicalDocumentationRenderModel): string {\n const rootDocumentPaths: string[] = [];\n const rootDocumentPathSet = new Set<string>();\n const categoryItems: DocusaurusSidebarItem[] = [];\n const claimedRootLandingPaths = new Set<string>();\n const pathsByDirectory = new Map<string, string[]>();\n const unitTitleByPath = new Map<string, string>();\n for (const unit of model.units) {\n const path = model.unitPathByRef.get(unit.unitRef) as string;\n unitTitleByPath.set(path, unit.title);\n const [directory] = path.split('/');\n if (directory === undefined || !path.includes('/')) {\n rootDocumentPaths.push(path);\n rootDocumentPathSet.add(path);\n continue;\n }\n const paths = pathsByDirectory.get(directory) ?? [];\n paths.push(path);\n pathsByDirectory.set(directory, paths);\n }\n\n for (const [directory, paths] of [...pathsByDirectory.entries()].sort(([left], [right]) => left.localeCompare(right))) {\n const label = DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY[directory];\n if (label === undefined) throw new Error(`technical-documentation Docusaurus category is missing a reader label: ${directory}`);\n const overviewPath = `${directory}/overview`;\n // A root document and a child directory may deliberately share one route\n // identity (`user-administration` + `user-administration/*`). That exact\n // path relation—not mutable display copy—makes the root document the\n // category landing. Labels remain free to evolve without breaking IA.\n const rootLandingPath = rootDocumentPathSet.has(directory) ? directory : undefined;\n const landingPath = paths.includes(overviewPath) ? overviewPath : rootLandingPath;\n if (rootLandingPath !== undefined && landingPath === rootLandingPath) claimedRootLandingPaths.add(rootLandingPath);\n const itemPaths = paths.filter((path) => path !== overviewPath);\n const [onlyItemPath] = itemPaths;\n\n // A category with one identically named document is not a journey: rendering\n // both creates two adjacent controls with the same reader meaning. Flatten\n // only that exact shape. A differently named single document remains under\n // its responsibility label because the category still adds useful context.\n if (landingPath === undefined && itemPaths.length === 1 && onlyItemPath !== undefined && unitTitleByPath.get(onlyItemPath) === label) {\n categoryItems.push(onlyItemPath);\n continue;\n }\n\n const orderedItems = renderDocusaurusCategoryItems({ directory, itemPaths, unitTitleByPath });\n categoryItems.push({\n type: 'category',\n label,\n collapsible: true,\n // Docusaurus expands the category containing the active document. Keeping\n // other journeys collapsed makes the sidebar scale with the catalogue.\n collapsed: true,\n ...(landingPath === undefined ? {} : { link: { type: 'doc', id: landingPath } }),\n items: orderedItems,\n });\n }\n\n const rootItems = [\n ...rootDocumentPaths.filter((path) => !claimedRootLandingPaths.has(path)),\n ...categoryItems,\n ];\n return `${JSON.stringify({ docs: rootItems }, null, 2)}\\n`;\n}\n\nexport function renderTechnicalDocumentationDocusaurus(input: {\n readonly model: TechnicalDocumentationRenderModel;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly assetBytesByPath: ReadonlyMap<string, Uint8Array>;\n /**\n * Resolves a guide's API-reference target to a public href, or returns `null` when this\n * application does not publish it — a link to a feature-gated resource. `null` degrades the link\n * to plain text rather than failing the render (#472). Reporting the degradation belongs to\n * whoever supplies this function; the renderer only renders.\n */\n readonly resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string | null;\n}): TechnicalDocumentationRendererResult {\n const assetPathByRef = new Map(input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) =>\n RENDERABLE_ASSET_STATUSES.has(asset.status) ? [[asset.assetRef, asset.normalizedRelativePath as string]] : []));\n const sourceUnitRefsByAssetRef = new Map<string, string[]>();\n for (const unit of input.model.units) {\n for (const request of unit.assetRequests) {\n const owners = sourceUnitRefsByAssetRef.get(request.assetRef) ?? [];\n owners.push(unit.unitRef);\n sourceUnitRefsByAssetRef.set(request.assetRef, owners);\n }\n }\n const pageFiles = input.model.units.map((unit) => {\n const path = input.model.unitPathByRef.get(unit.unitRef) as string;\n return {\n // The full route identity is part of the output identity. Two valid pages\n // may share their final slug (`integrations/todos` and\n // `user-administration/users`) without sharing a file or a manifest row.\n outputRef: `technical-documentation:output/docusaurus/${path.split('/').join(':')}`,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT,\n sourceUnitRefs: [unit.unitRef],\n normalizedRelativePath: `docusaurus/docs/${path}.mdx`,\n mediaType: 'text/mdx',\n bytes: Buffer.from(renderUnit(unit, input.model, assetPathByRef, input.resolveApiReferenceTarget), 'utf8'),\n } as const;\n });\n const assetFiles = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => {\n if (!RENDERABLE_ASSET_STATUSES.has(asset.status)) return [];\n const path = asset.normalizedRelativePath as string;\n const bytes = input.assetBytesByPath.get(path);\n if (bytes === undefined) throw new Error(`technical-documentation Docusaurus asset bytes are absent: ${path}`);\n const sourceUnitRefs = [...(sourceUnitRefsByAssetRef.get(asset.assetRef) ?? [])].sort();\n if (sourceUnitRefs.length === 0) throw new Error(`technical-documentation resolved asset has no authorized unit owner: ${asset.assetRef}`);\n return [{\n outputRef: `technical-documentation:output/asset/${technicalDocumentationAssetFileStem(asset.assetRef)}`,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.ASSET,\n sourceUnitRefs,\n normalizedRelativePath: `docusaurus/static/${path}`,\n mediaType: asset.mediaType,\n bytes,\n }];\n });\n return {\n execution: createTechnicalDocumentationRendererExecution({\n rendererKind: TechnicalDocumentationRendererKind.DOCUSAURUS,\n rendererRef: DOCUSAURUS_RENDERER_REF,\n rendererVersion: 1,\n configurationRef: 'technical-documentation:renderer-configuration/docusaurus-v1',\n }),\n files: [\n ...pageFiles,\n ...assetFiles,\n {\n outputRef: 'technical-documentation:output/docusaurus-sidebars',\n rendererRef: DOCUSAURUS_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.NAVIGATION_INDEX,\n sourceUnitRefs: input.model.units.map((unit) => unit.unitRef),\n normalizedRelativePath: 'docusaurus/sidebars.json',\n mediaType: 'application/json',\n bytes: Buffer.from(renderDocusaurusSidebars(input.model), 'utf8'),\n },\n ],\n };\n}\n"]}
|
package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-managed-tree-validator.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-managed-tree-validator.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-managed-tree-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gDAAgD,EAErD,KAAK,mDAAmD,EACzD,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,wCAAwC,CAAC;AAMhD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8CAA8C,EAAE,mCAI3D,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kDAAkD,EAAE,SAAS,MAAM,EAK9E,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACxD,QAAQ,CAAC,EAAE,OAAO,CAAC,mCAAmC,CAAC,GACtD,mCAAmC,CAErC;AAED;;;;;;;GAOG;AACH,wBAAgB,qDAAqD,CACnE,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAC3B,SAAS,MAAM,EAAE,CASnB;AAED,MAAM,WAAW,iDAAiD;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AA4CD,wBAAgB,yCAAyC,CAAC,KAAK,EAAE;IAC/D,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,kCAAkC,EAAE,CAAC;IAC9D,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,CAAC;IAC5E,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,mCAAmC,CAAC;CACvD,GAAG,iDAAiD,CA0FpD"}
|
|
@@ -185,7 +185,14 @@ export function validateTechnicalDocumentationManagedTree(input) {
|
|
|
185
185
|
if (manifest.rendererExecutions.some((execution) => execution.rendererKind === TechnicalDocumentationRendererKind.DOCUSAURUS)) {
|
|
186
186
|
const resolvedAssetPaths = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => asset.normalizedRelativePath === null ? [] : [asset.normalizedRelativePath]);
|
|
187
187
|
for (const path of resolvedAssetPaths) {
|
|
188
|
-
|
|
188
|
+
/*
|
|
189
|
+
* `docusaurus/static/<path>` is where the asset SHIPS — the directory the site serves. This
|
|
190
|
+
* looked for the bare `<path>`, and passed only because a second renderer family published
|
|
191
|
+
* every asset there as well. That family was read by nothing and was removed (#274), which
|
|
192
|
+
* left the check looking for a file no renderer writes any more: the rule is "a resolved asset
|
|
193
|
+
* reaches the reader", and the reader reaches it through the site.
|
|
194
|
+
*/
|
|
195
|
+
const output = declaredByPath.get(`docusaurus/static/${path}`);
|
|
189
196
|
if (output?.outputKind !== TechnicalDocumentationOutputKind.ASSET) {
|
|
190
197
|
throw new Error(`technical-documentation resolved asset is absent from the managed output tree: ${path}`);
|
|
191
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-managed-tree-validator.js","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-managed-tree-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,kDAAkD,GAInD,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAQ7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC/G,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IACpC,uBAAuB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CAC1C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kDAAkD,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjG,qCAAqC;IACrC,uCAAuC;IACvC,6BAA6B;IAC7B,iCAAiC;CAClC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,0CAA0C,CACxD,QAAuD;IAEvD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,8CAA8C,EAAE,GAAG,CAAC,QAAQ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AC;AACD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC","sourcesContent":["import {\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n TechnicalDocumentationRenderOutputManifestV1Schema,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n technicalDocumentationSha256Bytes,\n type TechnicalDocumentationRenderedFile,\n} from './technical-documentation-render-model';\nimport {\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n} from '../../openapi/api-reference-targets';\n\nexport interface TechnicalDocumentationOutputBudgets {\n readonly maximumPageCount: number;\n readonly maximumTotalBytes: number;\n readonly maximumSearchIndexBytes: number;\n}\n\n/**\n * Ceilings applied when an application declares none.\n *\n * The point is that ABSENCE is bounded, not that these numbers are precisely right. An\n * application which never thought about output size still gets a documentation tree that\n * cannot silently grow until a build host runs out of memory; one that genuinely outgrows\n * a ceiling raises it explicitly, and that edit is visible in review.\n *\n * Generous on purpose. A default tight enough to be \"safe\" for a small application would\n * fire on ordinary growth, and a limit that routinely fires is a limit people learn to\n * raise without reading — which is worse than no limit at all.\n */\nexport const TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS: TechnicalDocumentationOutputBudgets = Object.freeze({\n maximumPageCount: 2_000,\n maximumTotalBytes: 512 * 1024 * 1024,\n maximumSearchIndexBytes: 64 * 1024 * 1024,\n});\n\n/**\n * Sentinels every application inherits, which an application can EXTEND but never remove.\n *\n * ## Why this set is so small\n *\n * A sentinel is matched with `String.includes` against every public file, so a generic\n * marker — `secret`, `token`, `password`, `Bearer` — would fire on the very guides that\n * teach authentication, error handling and webhook signature verification. Those documents\n * legitimately contain those words. A canary that cries on correct content gets removed,\n * and then it protects nothing.\n *\n * So the mandatory set is restricted to byte sequences that **cannot legitimately appear in\n * published product documentation** under any authoring style. A PEM private-key header\n * qualifies: documentation teaches readers to *use* a public key, never to read a private\n * one, so its presence in a public tree is a leak by construction rather than by judgement.\n *\n * Application-specific canaries — a restricted-content marker, a fixture value that must\n * stay internal — belong in the application's own declared list, which is UNIONED with this\n * one. The union direction is the safety property: an application must be able to add\n * canaries and must not be able to switch these off.\n */\nexport const TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS: readonly string[] = Object.freeze([\n '-----BEGIN OPENSSH PRIVATE KEY-----',\n '-----BEGIN PGP PRIVATE KEY BLOCK-----',\n '-----BEGIN PRIVATE KEY-----',\n '-----BEGIN RSA PRIVATE KEY-----',\n]);\n\n/**\n * Resolves the effective budgets from an application's partial declaration.\n *\n * Per-field rather than all-or-nothing: an application that only needs a larger page\n * count should not have to restate — and thereby freeze a copy of — every other ceiling.\n */\nexport function resolveTechnicalDocumentationOutputBudgets(\n declared?: Partial<TechnicalDocumentationOutputBudgets>,\n): TechnicalDocumentationOutputBudgets {\n return Object.freeze({ ...TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS, ...(declared ?? {}) });\n}\n\n/**\n * Unions the mandatory sentinels with an application's declared ones.\n *\n * A union, never a replacement — see\n * {@link TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS}. Deduplicated and sorted so\n * the resolved set is a stable value: it is compared and reported, and an order that\n * varied with authoring order would make two identical policies look different.\n */\nexport function resolveTechnicalDocumentationForbiddenPublicSentinels(\n declared?: readonly string[],\n): readonly string[] {\n const sentinels = new Set<string>(TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS);\n for (const sentinel of declared ?? []) {\n const trimmed = sentinel.trim();\n // An empty sentinel is skipped by the validator anyway; dropping it here keeps the\n // resolved set honest about how many canaries are actually armed.\n if (trimmed.length > 0) sentinels.add(trimmed);\n }\n return Object.freeze([...sentinels].sort());\n}\n\nexport interface TechnicalDocumentationManagedTreeValidationReport {\n readonly pageCount: number;\n readonly totalBytes: number;\n readonly searchIndexBytes: number;\n}\n\nconst GENERATED_MARKDOWN_LINK_PATTERN = /!?\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+[\"'][^)]*)?\\)/g;\n\n/**\n * Routes published by the API-reference pipeline rather than the guide renderer.\n *\n * API-reference links enter a guide only through the semantic OpenAPI link index,\n * which proves the requested resource, operation, request, response or schema is\n * present before the renderer receives its public URL. The managed-tree validator\n * must therefore recognize the independently published route root while continuing\n * to require every ordinary guide and static-asset target to exist in this exact\n * render manifest.\n */\nconst INDEPENDENT_API_REFERENCE_ROUTES: ReadonlySet<string> = new Set([\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.API_REFERENCE),\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE),\n]);\n\nfunction validateGeneratedMarkdownLinkClosure(input: {\n readonly sourcePath: string;\n readonly text: string;\n readonly declaredByPath: ReadonlyMap<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>;\n readonly docusaurusRoutes: ReadonlySet<string>;\n}): void {\n for (const match of input.text.matchAll(GENERATED_MARKDOWN_LINK_PATTERN)) {\n const destination = match[1];\n if (destination === undefined || destination.startsWith('#') || /^(?:https?:|mailto:)/i.test(destination)) continue;\n const pathOnly = destination.split(/[?#]/, 1)[0];\n if (pathOnly === undefined || pathOnly.length === 0) continue;\n if (pathOnly.startsWith('/')) {\n const rootRelativePath = pathOnly.slice(1);\n const docusaurusStaticPath = `docusaurus/static/${rootRelativePath}`;\n if (input.docusaurusRoutes.has(pathOnly)\n || (input.sourcePath.startsWith('docusaurus/docs/') ? input.declaredByPath.has(docusaurusStaticPath) : input.declaredByPath.has(rootRelativePath))) continue;\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n const resolvedPath = posixPath.normalize(posixPath.join(posixPath.dirname(input.sourcePath), pathOnly));\n if (resolvedPath.startsWith('../') || posixPath.isAbsolute(resolvedPath) || !input.declaredByPath.has(resolvedPath)) {\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n }\n}\n\nexport function validateTechnicalDocumentationManagedTree(input: {\n readonly manifest: unknown;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly forbiddenPublicSentinels: readonly string[];\n readonly budgets: TechnicalDocumentationOutputBudgets;\n}): TechnicalDocumentationManagedTreeValidationReport {\n const manifest: TechnicalDocumentationRenderOutputManifestV1 = TechnicalDocumentationRenderOutputManifestV1Schema.parse(input.manifest);\n /*\n * Binding is an identity comparison between two independently produced manifests, which is a\n * check with two real sides. The `renderOutputDigest` recomputation that used to follow was not:\n * it hashed this manifest and compared the result against the copy stored inside it.\n */\n const boundBundle = manifest.authorizedBundleIdentity;\n if (boundBundle.ref !== input.authorizedBundle.bundleRef || boundBundle.version !== input.authorizedBundle.bundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the authorized bundle');\n }\n const boundAssets = manifest.resolvedAssetBundleIdentity;\n if (boundAssets.ref !== input.resolvedAssetBundle.assetBundleRef || boundAssets.version !== input.resolvedAssetBundle.assetBundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the resolved asset bundle');\n }\n\n const declaredByPath = new Map(manifest.outputs.map((output) => [output.normalizedRelativePath, output]));\n const docusaurusRoutes = new Set(manifest.outputs.flatMap((output) => {\n const path = output.normalizedRelativePath as string;\n return path.startsWith('docusaurus/docs/') && path.endsWith('.mdx')\n ? [`/${path.slice('docusaurus/docs/'.length, -'.mdx'.length)}`]\n : [];\n }));\n for (const apiReferenceRoute of INDEPENDENT_API_REFERENCE_ROUTES) docusaurusRoutes.add(apiReferenceRoute);\n const filesByPath = new Map<string, TechnicalDocumentationRenderedFile>();\n for (const file of input.files) {\n if (filesByPath.has(file.normalizedRelativePath)) throw new Error(`technical-documentation managed tree duplicates path: ${file.normalizedRelativePath}`);\n filesByPath.set(file.normalizedRelativePath, file);\n }\n if (filesByPath.size !== declaredByPath.size) throw new Error('technical-documentation managed tree inventory does not match its manifest');\n\n const authorizedUnitRefs = new Set(input.authorizedBundle.units.map((unit) => unit.unitRef));\n let totalBytes = 0;\n let pageCount = 0;\n let searchIndexBytes = 0;\n for (const [path, output] of declaredByPath) {\n const file = filesByPath.get(path);\n if (file === undefined) throw new Error(`technical-documentation managed output is missing: ${path}`);\n if (file.outputRef !== output.outputRef || file.rendererRef !== output.rendererRef || file.outputKind !== output.outputKind\n || file.mediaType !== output.mediaType || [...file.sourceUnitRefs].sort().join('\\0') !== output.sourceUnitRefs.join('\\0')) {\n throw new Error(`technical-documentation managed output metadata mismatch: ${path}`);\n }\n if (file.bytes.byteLength !== output.byteLength || technicalDocumentationSha256Bytes(file.bytes) !== output.byteDigest) {\n throw new Error(`technical-documentation managed output byte identity mismatch: ${path}`);\n }\n for (const sourceUnitRef of output.sourceUnitRefs) {\n if (!authorizedUnitRefs.has(sourceUnitRef)) throw new Error(`technical-documentation output cites an unauthorized unit: ${sourceUnitRef}`);\n }\n const text = Buffer.from(file.bytes).toString('utf8');\n for (const sentinel of input.forbiddenPublicSentinels) {\n if (sentinel.length > 0 && text.includes(sentinel)) throw new Error(`technical-documentation managed public tree contains forbidden sentinel in ${path}`);\n }\n if (output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) {\n validateGeneratedMarkdownLinkClosure({ sourcePath: path, text, declaredByPath, docusaurusRoutes });\n }\n totalBytes += file.bytes.byteLength;\n if (output.outputKind === TechnicalDocumentationOutputKind.HTML_PAGE || output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) pageCount += 1;\n if (path === 'indexes/search.json') searchIndexBytes = file.bytes.byteLength;\n }\n\n /**\n * Captures are source material, not unconditional public output. An API-only\n * publication deliberately has no page renderer that can reference a\n * screenshot, so it must not publish unused product imagery. Once the\n * Docusaurus content renderer participates, every resolved asset remains a\n * required managed output as before.\n */\n if (manifest.rendererExecutions.some((execution) => execution.rendererKind === TechnicalDocumentationRendererKind.DOCUSAURUS)) {\n const resolvedAssetPaths = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => asset.normalizedRelativePath === null ? [] : [asset.normalizedRelativePath]);\n for (const path of resolvedAssetPaths) {\n const output = declaredByPath.get(path);\n if (output?.outputKind !== TechnicalDocumentationOutputKind.ASSET) {\n throw new Error(`technical-documentation resolved asset is absent from the managed output tree: ${path}`);\n }\n }\n }\n const report = { pageCount, totalBytes, searchIndexBytes };\n if (pageCount > input.budgets.maximumPageCount) throw new Error(`technical-documentation page budget exceeded: ${pageCount}`);\n if (totalBytes > input.budgets.maximumTotalBytes) throw new Error(`technical-documentation total-byte budget exceeded: ${totalBytes}`);\n if (searchIndexBytes > input.budgets.maximumSearchIndexBytes) throw new Error(`technical-documentation search-index budget exceeded: ${searchIndexBytes}`);\n return Object.freeze(report);\n}\nimport { posix as posixPath } from 'node:path';\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-managed-tree-validator.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-managed-tree-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,kDAAkD,GAInD,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAQ7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC/G,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IACpC,uBAAuB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CAC1C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAo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AC;IAC9H,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB;QAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,UAAU,EAAE,CAAC,CAAC;IACvI,IAAI,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,uBAAuB;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,gBAAgB,EAAE,CAAC,CAAC;IAC3J,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AACD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC","sourcesContent":["import {\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n TechnicalDocumentationRenderOutputManifestV1Schema,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n technicalDocumentationSha256Bytes,\n type TechnicalDocumentationRenderedFile,\n} from './technical-documentation-render-model';\nimport {\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n} from '../../openapi/api-reference-targets';\n\nexport interface TechnicalDocumentationOutputBudgets {\n readonly maximumPageCount: number;\n readonly maximumTotalBytes: number;\n readonly maximumSearchIndexBytes: number;\n}\n\n/**\n * Ceilings applied when an application declares none.\n *\n * The point is that ABSENCE is bounded, not that these numbers are precisely right. An\n * application which never thought about output size still gets a documentation tree that\n * cannot silently grow until a build host runs out of memory; one that genuinely outgrows\n * a ceiling raises it explicitly, and that edit is visible in review.\n *\n * Generous on purpose. A default tight enough to be \"safe\" for a small application would\n * fire on ordinary growth, and a limit that routinely fires is a limit people learn to\n * raise without reading — which is worse than no limit at all.\n */\nexport const TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS: TechnicalDocumentationOutputBudgets = Object.freeze({\n maximumPageCount: 2_000,\n maximumTotalBytes: 512 * 1024 * 1024,\n maximumSearchIndexBytes: 64 * 1024 * 1024,\n});\n\n/**\n * Sentinels every application inherits, which an application can EXTEND but never remove.\n *\n * ## Why this set is so small\n *\n * A sentinel is matched with `String.includes` against every public file, so a generic\n * marker — `secret`, `token`, `password`, `Bearer` — would fire on the very guides that\n * teach authentication, error handling and webhook signature verification. Those documents\n * legitimately contain those words. A canary that cries on correct content gets removed,\n * and then it protects nothing.\n *\n * So the mandatory set is restricted to byte sequences that **cannot legitimately appear in\n * published product documentation** under any authoring style. A PEM private-key header\n * qualifies: documentation teaches readers to *use* a public key, never to read a private\n * one, so its presence in a public tree is a leak by construction rather than by judgement.\n *\n * Application-specific canaries — a restricted-content marker, a fixture value that must\n * stay internal — belong in the application's own declared list, which is UNIONED with this\n * one. The union direction is the safety property: an application must be able to add\n * canaries and must not be able to switch these off.\n */\nexport const TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS: readonly string[] = Object.freeze([\n '-----BEGIN OPENSSH PRIVATE KEY-----',\n '-----BEGIN PGP PRIVATE KEY BLOCK-----',\n '-----BEGIN PRIVATE KEY-----',\n '-----BEGIN RSA PRIVATE KEY-----',\n]);\n\n/**\n * Resolves the effective budgets from an application's partial declaration.\n *\n * Per-field rather than all-or-nothing: an application that only needs a larger page\n * count should not have to restate — and thereby freeze a copy of — every other ceiling.\n */\nexport function resolveTechnicalDocumentationOutputBudgets(\n declared?: Partial<TechnicalDocumentationOutputBudgets>,\n): TechnicalDocumentationOutputBudgets {\n return Object.freeze({ ...TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS, ...(declared ?? {}) });\n}\n\n/**\n * Unions the mandatory sentinels with an application's declared ones.\n *\n * A union, never a replacement — see\n * {@link TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS}. Deduplicated and sorted so\n * the resolved set is a stable value: it is compared and reported, and an order that\n * varied with authoring order would make two identical policies look different.\n */\nexport function resolveTechnicalDocumentationForbiddenPublicSentinels(\n declared?: readonly string[],\n): readonly string[] {\n const sentinels = new Set<string>(TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS);\n for (const sentinel of declared ?? []) {\n const trimmed = sentinel.trim();\n // An empty sentinel is skipped by the validator anyway; dropping it here keeps the\n // resolved set honest about how many canaries are actually armed.\n if (trimmed.length > 0) sentinels.add(trimmed);\n }\n return Object.freeze([...sentinels].sort());\n}\n\nexport interface TechnicalDocumentationManagedTreeValidationReport {\n readonly pageCount: number;\n readonly totalBytes: number;\n readonly searchIndexBytes: number;\n}\n\nconst GENERATED_MARKDOWN_LINK_PATTERN = /!?\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+[\"'][^)]*)?\\)/g;\n\n/**\n * Routes published by the API-reference pipeline rather than the guide renderer.\n *\n * API-reference links enter a guide only through the semantic OpenAPI link index,\n * which proves the requested resource, operation, request, response or schema is\n * present before the renderer receives its public URL. The managed-tree validator\n * must therefore recognize the independently published route root while continuing\n * to require every ordinary guide and static-asset target to exist in this exact\n * render manifest.\n */\nconst INDEPENDENT_API_REFERENCE_ROUTES: ReadonlySet<string> = new Set([\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.API_REFERENCE),\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE),\n]);\n\nfunction validateGeneratedMarkdownLinkClosure(input: {\n readonly sourcePath: string;\n readonly text: string;\n readonly declaredByPath: ReadonlyMap<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>;\n readonly docusaurusRoutes: ReadonlySet<string>;\n}): void {\n for (const match of input.text.matchAll(GENERATED_MARKDOWN_LINK_PATTERN)) {\n const destination = match[1];\n if (destination === undefined || destination.startsWith('#') || /^(?:https?:|mailto:)/i.test(destination)) continue;\n const pathOnly = destination.split(/[?#]/, 1)[0];\n if (pathOnly === undefined || pathOnly.length === 0) continue;\n if (pathOnly.startsWith('/')) {\n const rootRelativePath = pathOnly.slice(1);\n const docusaurusStaticPath = `docusaurus/static/${rootRelativePath}`;\n if (input.docusaurusRoutes.has(pathOnly)\n || (input.sourcePath.startsWith('docusaurus/docs/') ? input.declaredByPath.has(docusaurusStaticPath) : input.declaredByPath.has(rootRelativePath))) continue;\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n const resolvedPath = posixPath.normalize(posixPath.join(posixPath.dirname(input.sourcePath), pathOnly));\n if (resolvedPath.startsWith('../') || posixPath.isAbsolute(resolvedPath) || !input.declaredByPath.has(resolvedPath)) {\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n }\n}\n\nexport function validateTechnicalDocumentationManagedTree(input: {\n readonly manifest: unknown;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly forbiddenPublicSentinels: readonly string[];\n readonly budgets: TechnicalDocumentationOutputBudgets;\n}): TechnicalDocumentationManagedTreeValidationReport {\n const manifest: TechnicalDocumentationRenderOutputManifestV1 = TechnicalDocumentationRenderOutputManifestV1Schema.parse(input.manifest);\n /*\n * Binding is an identity comparison between two independently produced manifests, which is a\n * check with two real sides. The `renderOutputDigest` recomputation that used to follow was not:\n * it hashed this manifest and compared the result against the copy stored inside it.\n */\n const boundBundle = manifest.authorizedBundleIdentity;\n if (boundBundle.ref !== input.authorizedBundle.bundleRef || boundBundle.version !== input.authorizedBundle.bundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the authorized bundle');\n }\n const boundAssets = manifest.resolvedAssetBundleIdentity;\n if (boundAssets.ref !== input.resolvedAssetBundle.assetBundleRef || boundAssets.version !== input.resolvedAssetBundle.assetBundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the resolved asset bundle');\n }\n\n const declaredByPath = new Map<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>(\n manifest.outputs.map((output) => [output.normalizedRelativePath, output]),\n );\n const docusaurusRoutes = new Set(manifest.outputs.flatMap((output) => {\n const path = output.normalizedRelativePath as string;\n return path.startsWith('docusaurus/docs/') && path.endsWith('.mdx')\n ? [`/${path.slice('docusaurus/docs/'.length, -'.mdx'.length)}`]\n : [];\n }));\n for (const apiReferenceRoute of INDEPENDENT_API_REFERENCE_ROUTES) docusaurusRoutes.add(apiReferenceRoute);\n const filesByPath = new Map<string, TechnicalDocumentationRenderedFile>();\n for (const file of input.files) {\n if (filesByPath.has(file.normalizedRelativePath)) throw new Error(`technical-documentation managed tree duplicates path: ${file.normalizedRelativePath}`);\n filesByPath.set(file.normalizedRelativePath, file);\n }\n if (filesByPath.size !== declaredByPath.size) throw new Error('technical-documentation managed tree inventory does not match its manifest');\n\n const authorizedUnitRefs = new Set(input.authorizedBundle.units.map((unit) => unit.unitRef));\n let totalBytes = 0;\n let pageCount = 0;\n let searchIndexBytes = 0;\n for (const [path, output] of declaredByPath) {\n const file = filesByPath.get(path);\n if (file === undefined) throw new Error(`technical-documentation managed output is missing: ${path}`);\n if (file.outputRef !== output.outputRef || file.rendererRef !== output.rendererRef || file.outputKind !== output.outputKind\n || file.mediaType !== output.mediaType || [...file.sourceUnitRefs].sort().join('\\0') !== output.sourceUnitRefs.join('\\0')) {\n throw new Error(`technical-documentation managed output metadata mismatch: ${path}`);\n }\n if (file.bytes.byteLength !== output.byteLength || technicalDocumentationSha256Bytes(file.bytes) !== output.byteDigest) {\n throw new Error(`technical-documentation managed output byte identity mismatch: ${path}`);\n }\n for (const sourceUnitRef of output.sourceUnitRefs) {\n if (!authorizedUnitRefs.has(sourceUnitRef)) throw new Error(`technical-documentation output cites an unauthorized unit: ${sourceUnitRef}`);\n }\n const text = Buffer.from(file.bytes).toString('utf8');\n for (const sentinel of input.forbiddenPublicSentinels) {\n if (sentinel.length > 0 && text.includes(sentinel)) throw new Error(`technical-documentation managed public tree contains forbidden sentinel in ${path}`);\n }\n if (output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) {\n validateGeneratedMarkdownLinkClosure({ sourcePath: path, text, declaredByPath, docusaurusRoutes });\n }\n totalBytes += file.bytes.byteLength;\n if (output.outputKind === TechnicalDocumentationOutputKind.HTML_PAGE || output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) pageCount += 1;\n if (path === 'indexes/search.json') searchIndexBytes = file.bytes.byteLength;\n }\n\n /**\n * Captures are source material, not unconditional public output. An API-only\n * publication deliberately has no page renderer that can reference a\n * screenshot, so it must not publish unused product imagery. Once the\n * Docusaurus content renderer participates, every resolved asset remains a\n * required managed output as before.\n */\n if (manifest.rendererExecutions.some((execution) => execution.rendererKind === TechnicalDocumentationRendererKind.DOCUSAURUS)) {\n const resolvedAssetPaths = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => asset.normalizedRelativePath === null ? [] : [asset.normalizedRelativePath]);\n for (const path of resolvedAssetPaths) {\n /*\n * `docusaurus/static/<path>` is where the asset SHIPS — the directory the site serves. This\n * looked for the bare `<path>`, and passed only because a second renderer family published\n * every asset there as well. That family was read by nothing and was removed (#274), which\n * left the check looking for a file no renderer writes any more: the rule is \"a resolved asset\n * reaches the reader\", and the reader reaches it through the site.\n */\n const output = declaredByPath.get(`docusaurus/static/${path}`);\n if (output?.outputKind !== TechnicalDocumentationOutputKind.ASSET) {\n throw new Error(`technical-documentation resolved asset is absent from the managed output tree: ${path}`);\n }\n }\n }\n const report = { pageCount, totalBytes, searchIndexBytes };\n if (pageCount > input.budgets.maximumPageCount) throw new Error(`technical-documentation page budget exceeded: ${pageCount}`);\n if (totalBytes > input.budgets.maximumTotalBytes) throw new Error(`technical-documentation total-byte budget exceeded: ${totalBytes}`);\n if (searchIndexBytes > input.budgets.maximumSearchIndexBytes) throw new Error(`technical-documentation search-index budget exceeded: ${searchIndexBytes}`);\n return Object.freeze(report);\n}\nimport { posix as posixPath } from 'node:path';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-openapi-renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-openapi-renderer.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-openapi-renderer.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,wCAAwC,CAAC;AAIhD,wBAAgB,2CAA2C,CAAC,KAAK,EAAE;IACjE,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C,GAAG,oCAAoC,CA2CvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-render-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-render-model.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-render-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,gCAAgC,EAEhC,kCAAkC,EAClC,KAAK,gDAAgD,EACrD,KAAK,4CAA4C,EACjD,KAAK,yCAAyC,EAC9C,KAAK,yCAAyC,EAC9C,KAAK,mDAAmD,EACxD,KAAK,yCAAyC,EAC9C,KAAK,4BAA4B,EAClC,MAAM,uDAAuD,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE3E;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,wBAAwB,EAAE,yCAAyC,CAAC;IAC7E,QAAQ,CAAC,OAAO,EAAE,gDAAgD,CAAC,SAAS,CAAC,CAAC;IAC9E,QAAQ,CAAC,KAAK,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD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MAAM,CAAC;CAChC,GAAG,4CAA4C,CAsB/C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
+
import { APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX } from '../application-documentation/technical-documentation-engine-content-bundle.js';
|
|
2
3
|
import { createTechnicalDocumentationRenderOutputManifestV1, TechnicalDocumentationNormalizedRelativePathSchema, } from '@wildo-ai/saas-specifications/technical-documentation';
|
|
3
4
|
/**
|
|
4
5
|
* Names opaque emitted bytes, and detects their corruption when a reader compares this against the
|
|
@@ -37,6 +38,7 @@ function slugForUnit(unit) {
|
|
|
37
38
|
*/
|
|
38
39
|
const ENGINE_UNIT_PATH_BY_SLUG = {
|
|
39
40
|
'application-orientation': 'get-started',
|
|
41
|
+
'what-this-application-manages': 'what-this-application-manages',
|
|
40
42
|
authentication: 'access-and-identity/overview',
|
|
41
43
|
'sign-in-and-mfa': 'access-and-identity/sign-in-and-mfa',
|
|
42
44
|
'complete-sign-in': 'access-and-identity/complete-sign-in',
|
|
@@ -84,16 +86,8 @@ const ENGINE_UNIT_PATH_BY_SLUG = {
|
|
|
84
86
|
'siem-microsoft-sentinel': 'security-and-audit/siem-microsoft-sentinel',
|
|
85
87
|
'siem-elastic': 'security-and-audit/siem-elastic',
|
|
86
88
|
'operate-and-troubleshoot-siem-delivery': 'security-and-audit/operate-siem',
|
|
89
|
+
'respond-to-leaked-credential': 'security-and-audit/respond-to-leaked-credential',
|
|
87
90
|
'protect-and-retain-audit-evidence': 'security-and-audit/protect-evidence',
|
|
88
|
-
billing: 'billing-and-subscriptions',
|
|
89
|
-
'understand-billing-plans-and-access': 'billing-and-subscriptions/plans-and-access',
|
|
90
|
-
'start-billing-subscription': 'billing-and-subscriptions/start-subscription',
|
|
91
|
-
'change-or-end-billing-subscription': 'billing-and-subscriptions/change-or-end-subscription',
|
|
92
|
-
'billing-records-and-usage': 'billing-and-subscriptions/billing-records',
|
|
93
|
-
'manage-invoices-and-payments': 'billing-and-subscriptions/invoices-and-payments',
|
|
94
|
-
'understand-metered-usage': 'billing-and-subscriptions/metered-usage',
|
|
95
|
-
'reconcile-billing-and-access': 'billing-and-subscriptions/reconcile-access',
|
|
96
|
-
'troubleshoot-billing-change': 'billing-and-subscriptions/troubleshoot',
|
|
97
91
|
integrations: 'integrations',
|
|
98
92
|
'automation-platforms': 'integrations/automation-platforms',
|
|
99
93
|
'connect-n8n': 'integrations/automation/n8n',
|
|
@@ -127,13 +121,36 @@ export const ENGINE_UNIT_ROUTES = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG
|
|
|
127
121
|
* names: the semantic unit is the stable composition input, while a renderer
|
|
128
122
|
* owns audience-facing URLs. The route table is deliberately organized by a
|
|
129
123
|
* customer's product responsibility—not the internal framework that implements
|
|
130
|
-
* it—so readers can find access, organization, security
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
124
|
+
* it—so readers can find access, organization, security and integration
|
|
125
|
+
* material without learning Wildo vocabulary.
|
|
126
|
+
*
|
|
127
|
+
* One namespace is DERIVED rather than listed — `unit/manages/<resource>`, the page per
|
|
128
|
+
* application resource — because those units cannot be enumerated when this file is written. An
|
|
129
|
+
* application-OWNED unit still fails closed instead of acquiring an implicit route; that refusal
|
|
130
|
+
* is what this table is for, and it is untouched.
|
|
134
131
|
*/
|
|
135
132
|
function pathForUnit(unit) {
|
|
136
133
|
const slug = slugForUnit(unit);
|
|
134
|
+
/*
|
|
135
|
+
* ONE derived branch, and it is deliberately narrow.
|
|
136
|
+
*
|
|
137
|
+
* Every other route in this table is a constant, because a renderer owns audience-facing URLs
|
|
138
|
+
* and an authored page's URL is a decision somebody made. A page per application resource cannot
|
|
139
|
+
* work that way — the resources are not known when this file is written — so its route is
|
|
140
|
+
* DERIVED from the reserved `unit/manages/` namespace the projector emits.
|
|
141
|
+
*
|
|
142
|
+
* What has NOT changed is the refusal below. A unit an application named still fails closed; the
|
|
143
|
+
* generated pages are engine units carrying an application subject, which is why they can be
|
|
144
|
+
* routed at all. Anything outside both the fixed table and this one namespace is still a
|
|
145
|
+
* missing decision rather than an implicit URL.
|
|
146
|
+
*/
|
|
147
|
+
if (unit.unitRef.startsWith(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX)) {
|
|
148
|
+
const resourceIdentifier = unit.unitRef.slice(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX.length);
|
|
149
|
+
if (resourceIdentifier.length === 0 || resourceIdentifier.includes('/')) {
|
|
150
|
+
throw new Error(`technical-documentation generated resource unit ${unit.unitRef} has no single-segment resource identifier`);
|
|
151
|
+
}
|
|
152
|
+
return `${ENGINE_UNIT_PATH_BY_SLUG['what-this-application-manages']}/${resourceIdentifier}`;
|
|
153
|
+
}
|
|
137
154
|
if (unit.unitRef.startsWith('technical-documentation:unit/')) {
|
|
138
155
|
const path = ENGINE_UNIT_PATH_BY_SLUG[slug];
|
|
139
156
|
if (path !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-render-model.js","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-render-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,kDAAkD,EAGlD,kDAAkD,GASnD,MAAM,uDAAuD,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAAiB;IACjE,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACtE,CAAC;AAwBD,MAAM,UAAU,6CAA6C,CAAC,KAM7D;IACC;;;;;OAKG;IACH,OAAO;QACL,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,gBA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QAC7G,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;QACjC,UAAU,EAAE,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC;KAC1D,CAAC,CAAC,CAAC,CAAC;IACL,OAAO,kDAAkD,CAAC;QACxD,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,wBAAwB,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE;QAClH,2BAA2B,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,kBAAkB,EAAE;QACrI,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,kBAAkB;QAClB,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport {\n createTechnicalDocumentationRenderOutputManifestV1,\n canonicalizeTechnicalDocumentationJson,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationNormalizedRelativePathSchema,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationRendererExecutionV1,\n type TechnicalDocumentationVersionedIdentityV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationSupportedApiVersion,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\n/**\n * Names opaque emitted bytes, and detects their corruption when a reader compares this against the\n * bytes it actually loaded. That two-sided check is why it survived the 2026-08-27 digest\n * demolition; its string-hashing sibling did not, because every caller of that one was recording\n * agreement between two parts of the repository rather than naming content.\n */\nexport function technicalDocumentationSha256Bytes(bytes: Uint8Array): string {\n return `sha256:${createHash('sha256').update(bytes).digest('hex')}`;\n}\n\nexport interface TechnicalDocumentationRenderModel {\n readonly authorizedBundleIdentity: TechnicalDocumentationVersionedIdentityV1;\n readonly channel: TechnicalDocumentationAuthorizedBundleManifestV1['channel'];\n readonly units: readonly TechnicalDocumentationUnitV1[];\n readonly unitPathByRef: ReadonlyMap<string, string>;\n}\n\nexport interface TechnicalDocumentationRenderedFile {\n readonly outputRef: string;\n readonly rendererRef: string;\n readonly outputKind: TechnicalDocumentationOutputKind;\n readonly sourceUnitRefs: readonly string[];\n readonly normalizedRelativePath: string;\n readonly mediaType: string;\n readonly bytes: Uint8Array;\n}\n\nexport interface TechnicalDocumentationRendererResult {\n readonly execution: TechnicalDocumentationRendererExecutionV1;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n}\n\nexport function createTechnicalDocumentationRendererExecution(input: {\n readonly rendererKind: TechnicalDocumentationRendererKind;\n readonly rendererRef: string;\n readonly rendererVersion: number;\n /** Names the renderer's configuration. `rendererRef@rendererVersion` names the implementation. */\n readonly configurationRef: string;\n}): TechnicalDocumentationRendererExecutionV1 {\n /*\n * This built two sha256 fields until 2026-08-27: one over the renderer's own function bodies\n * (`Function.prototype.toString()`), one over its configuration object. Neither was ever compared\n * to anything — they rode into the manifest beside the `rendererRef` and `rendererVersion` that\n * already say which renderer ran, in a form a reader can act on.\n */\n return {\n rendererKind: input.rendererKind,\n rendererRef: input.rendererRef,\n rendererVersion: input.rendererVersion,\n configurationRef: input.configurationRef,\n };\n}\n\nfunction slugForUnit(unit: TechnicalDocumentationUnitV1): string {\n const source = unit.unitRef.split('/').at(-1) ?? unit.unitRef;\n const slug = source.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n if (slug.length === 0) throw new Error(`technical-documentation unit ${unit.unitRef} cannot produce a stable path`);\n return slug;\n}\n\n/**\n * Every route the engine content module owns, keyed by unit slug. Exported as a SET so the\n * renderers can tell a gated page this application does not publish (flatten the link) from a\n * misspelled route (leave it for the managed-tree validator).\n */\nconst ENGINE_UNIT_PATH_BY_SLUG: Readonly<Record<string, string>> = {\n 'application-orientation': 'get-started',\n authentication: 'access-and-identity/overview',\n 'sign-in-and-mfa': 'access-and-identity/sign-in-and-mfa',\n 'complete-sign-in': 'access-and-identity/complete-sign-in',\n 'mfa-enrollment-and-recovery': 'access-and-identity/mfa-enrollment-and-recovery',\n 'sign-in-troubleshoot': 'access-and-identity/sign-in-troubleshoot',\n 'single-sign-on': 'access-and-identity/single-sign-on',\n 'sso-configure': 'access-and-identity/sso-configure',\n 'sso-rollout-and-recovery': 'access-and-identity/sso-rollout-and-recovery',\n 'sso-troubleshoot': 'access-and-identity/sso-troubleshoot',\n 'api-keys': 'access-and-identity/api-keys',\n 'api-keys-create-and-store': 'access-and-identity/api-keys-create-and-store',\n 'api-keys-lifecycle': 'access-and-identity/api-keys-lifecycle',\n 'api-keys-troubleshoot': 'access-and-identity/api-keys-troubleshoot',\n 'oauth-provider': 'access-and-identity/oauth-provider',\n 'oauth-register-client': 'access-and-identity/oauth-register-client',\n 'oauth-authorize-delegated-access': 'access-and-identity/oauth-authorize-delegated-access',\n 'oauth-operate-and-revoke': 'access-and-identity/oauth-operate-and-revoke',\n 'user-administration': 'user-administration',\n 'manage-users-manually': 'user-administration/manage-users-manually',\n 'invite-and-onboard-user': 'user-administration/invite-and-onboard-user',\n 'organization-roles': 'user-administration/roles-and-permissions',\n 'change-user-access': 'user-administration/change-user-access',\n 'manage-organization-units': 'user-administration/manage-organization-units',\n 'design-organization-unit-hierarchy': 'user-administration/design-organization-unit-hierarchy',\n 'assign-organization-unit-access': 'user-administration/assign-organization-unit-access',\n 'operate-organization-units': 'user-administration/operate-organization-units',\n 'suspend-or-remove-user': 'user-administration/suspend-or-remove-user',\n 'review-users-and-access': 'user-administration/review-users-and-access',\n 'troubleshoot-user-access': 'user-administration/troubleshoot-user-access',\n scim: 'user-administration/scim-provisioning',\n 'scim-protocol-and-payloads': 'user-administration/scim-protocol-and-payloads',\n 'scim-configure': 'user-administration/scim-configure',\n 'scim-microsoft-entra': 'user-administration/scim-microsoft-entra',\n 'scim-okta': 'user-administration/scim-okta',\n 'scim-ldap-and-active-directory': 'user-administration/scim-ldap-and-active-directory',\n 'scim-map-profile-and-units': 'user-administration/scim-map-profile-and-units',\n 'scim-validate-and-roll-out': 'user-administration/scim-validate-and-roll-out',\n 'scim-operate-and-troubleshoot': 'user-administration/scim-operate-and-troubleshoot',\n 'audit-and-siem': 'security-and-audit',\n 'investigate-audit-event': 'security-and-audit/investigate-event',\n 'review-privileged-and-access-changes': 'security-and-audit/review-access-changes',\n 'export-audit-records': 'security-and-audit/export-audit-records',\n 'configure-siem-export': 'security-and-audit/configure-siem',\n 'siem-splunk': 'security-and-audit/siem-splunk',\n 'siem-microsoft-sentinel': 'security-and-audit/siem-microsoft-sentinel',\n 'siem-elastic': 'security-and-audit/siem-elastic',\n 'operate-and-troubleshoot-siem-delivery': 'security-and-audit/operate-siem',\n 'protect-and-retain-audit-evidence': 'security-and-audit/protect-evidence',\n billing: 'billing-and-subscriptions',\n 'understand-billing-plans-and-access': 'billing-and-subscriptions/plans-and-access',\n 'start-billing-subscription': 'billing-and-subscriptions/start-subscription',\n 'change-or-end-billing-subscription': 'billing-and-subscriptions/change-or-end-subscription',\n 'billing-records-and-usage': 'billing-and-subscriptions/billing-records',\n 'manage-invoices-and-payments': 'billing-and-subscriptions/invoices-and-payments',\n 'understand-metered-usage': 'billing-and-subscriptions/metered-usage',\n 'reconcile-billing-and-access': 'billing-and-subscriptions/reconcile-access',\n 'troubleshoot-billing-change': 'billing-and-subscriptions/troubleshoot',\n integrations: 'integrations',\n 'automation-platforms': 'integrations/automation-platforms',\n 'connect-n8n': 'integrations/automation/n8n',\n 'connect-zapier': 'integrations/automation/zapier',\n 'connect-make': 'integrations/automation/make',\n 'ai-coding-tools': 'integrations/ai-coding-tools',\n 'connect-cursor': 'integrations/ai-tools/cursor',\n 'connect-codex': 'integrations/ai-tools/codex',\n 'connect-claude-code': 'integrations/ai-tools/claude-code',\n 'agent-interoperability': 'integrations/agents',\n 'mcp-integrations': 'integrations/mcp',\n 'a2a-integrations': 'integrations/a2a',\n 'first-request': 'integrations/create-your-own-integration',\n 'common-rest-api': 'integrations/rest-api',\n 'rest-api-conventions': 'integrations/rest/conventions',\n 'send-api-request': 'integrations/rest/send-request',\n 'work-with-api-collections': 'integrations/rest/read-collections',\n 'write-and-reconcile-api-changes': 'integrations/rest/write-and-reconcile',\n 'troubleshoot-api-request': 'integrations/rest/troubleshoot',\n webhooks: 'integrations/webhooks',\n 'configure-and-test-webhook-endpoint': 'integrations/webhooks/configure-and-test',\n 'verify-webhook-delivery': 'integrations/webhooks/verify-delivery',\n 'operate-webhook-deliveries': 'integrations/webhooks/operate-deliveries',\n 'troubleshoot-webhook-deliveries': 'integrations/webhooks/troubleshoot',\n};\n\nexport const ENGINE_UNIT_ROUTES: ReadonlySet<string> = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG));\n\n/**\n * Maps a published semantic unit to its consumer navigation home.\n *\n * This is deliberately renderer-owned rather than inferred from Markdown file\n * names: the semantic unit is the stable composition input, while a renderer\n * owns audience-facing URLs. The route table is deliberately organized by a\n * customer's product responsibility—not the internal framework that implements\n * it—so readers can find access, organization, security, billing and\n * integration material without learning Wildo vocabulary. Application-domain\n * use cases remain deferred to the app-creator flow, so an application-owned\n * unit fails closed instead of acquiring an implicit route.\n */\nfunction pathForUnit(unit: TechnicalDocumentationUnitV1): string {\n const slug = slugForUnit(unit);\n if (unit.unitRef.startsWith('technical-documentation:unit/')) {\n const path = ENGINE_UNIT_PATH_BY_SLUG[slug];\n if (path !== undefined) return path;\n throw new Error(`technical-documentation framework unit ${unit.unitRef} has no consumer navigation path`);\n }\n throw new Error(`technical-documentation unit ${unit.unitRef} has no consumer navigation category`);\n}\n\nexport function createTechnicalDocumentationRenderModel(\n authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1,\n): TechnicalDocumentationRenderModel {\n const unitPathByRef = new Map<string, string>();\n const occupiedPaths = new Set<string>();\n for (const unit of authorizedBundle.units) {\n const path = pathForUnit(unit);\n if (occupiedPaths.has(path)) throw new Error(`technical-documentation units collide on renderer path ${path}`);\n occupiedPaths.add(path);\n unitPathByRef.set(unit.unitRef, path);\n }\n return Object.freeze({\n authorizedBundleIdentity: Object.freeze({ ref: authorizedBundle.bundleRef, version: authorizedBundle.bundleVersion }),\n channel: authorizedBundle.channel,\n units: Object.freeze([...authorizedBundle.units]),\n unitPathByRef,\n });\n}\n\nexport function createTechnicalDocumentationAggregateRenderManifest(input: {\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly supportedApiVersion: TechnicalDocumentationSupportedApiVersion;\n readonly rendererResults: readonly TechnicalDocumentationRendererResult[];\n /** This render's own identity; the publication pointer selects a render by it. */\n readonly renderRef: string;\n readonly renderVersion: number;\n}): TechnicalDocumentationRenderOutputManifestV1 {\n const rendererExecutions = input.rendererResults.map((result) => result.execution);\n const outputs = input.rendererResults.flatMap((result) => result.files.map((file) => ({\n outputRef: file.outputRef,\n rendererRef: file.rendererRef,\n outputKind: file.outputKind,\n sourceUnitRefs: [...file.sourceUnitRefs],\n normalizedRelativePath: TechnicalDocumentationNormalizedRelativePathSchema.parse(file.normalizedRelativePath),\n mediaType: file.mediaType,\n byteLength: file.bytes.byteLength,\n byteDigest: technicalDocumentationSha256Bytes(file.bytes),\n })));\n return createTechnicalDocumentationRenderOutputManifestV1({\n schemaVersion: 1,\n renderRef: input.renderRef,\n renderVersion: input.renderVersion,\n authorizedBundleIdentity: { ref: input.authorizedBundle.bundleRef, version: input.authorizedBundle.bundleVersion },\n resolvedAssetBundleIdentity: { ref: input.resolvedAssetBundle.assetBundleRef, version: input.resolvedAssetBundle.assetBundleVersion },\n supportedApiVersion: input.supportedApiVersion,\n rendererExecutions,\n outputs,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-render-model.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-render-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gDAAgD,EAAE,MAAM,4EAA4E,CAAC;AAE9I,OAAO,EACL,kDAAkD,EAGlD,kDAAkD,GASnD,MAAM,uDAAuD,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAAiB;IACjE,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACtE,CAAC;AAwBD,MAAM,UAAU,6CAA6C,CAAC,KAM7D;IACC;;;;;OAKG;IACH,OAAO;QACL,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KACzC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,IAAkC;IACrD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,OAAO,+BAA+B,CAAC,CAAC;IACpH,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,wBAAwB,GAAqC;IAC/D,yBAAyB,EAA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wB,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE;QAClH,2BAA2B,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,kBAAkB,EAAE;QACrI,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,kBAAkB;QAClB,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX } from '../application-documentation/technical-documentation-engine-content-bundle';\n\nimport {\n createTechnicalDocumentationRenderOutputManifestV1,\n canonicalizeTechnicalDocumentationJson,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationNormalizedRelativePathSchema,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationRendererExecutionV1,\n type TechnicalDocumentationVersionedIdentityV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationSupportedApiVersion,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\n/**\n * Names opaque emitted bytes, and detects their corruption when a reader compares this against the\n * bytes it actually loaded. That two-sided check is why it survived the 2026-08-27 digest\n * demolition; its string-hashing sibling did not, because every caller of that one was recording\n * agreement between two parts of the repository rather than naming content.\n */\nexport function technicalDocumentationSha256Bytes(bytes: Uint8Array): string {\n return `sha256:${createHash('sha256').update(bytes).digest('hex')}`;\n}\n\nexport interface TechnicalDocumentationRenderModel {\n readonly authorizedBundleIdentity: TechnicalDocumentationVersionedIdentityV1;\n readonly channel: TechnicalDocumentationAuthorizedBundleManifestV1['channel'];\n readonly units: readonly TechnicalDocumentationUnitV1[];\n readonly unitPathByRef: ReadonlyMap<string, string>;\n}\n\nexport interface TechnicalDocumentationRenderedFile {\n readonly outputRef: string;\n readonly rendererRef: string;\n readonly outputKind: TechnicalDocumentationOutputKind;\n readonly sourceUnitRefs: readonly string[];\n readonly normalizedRelativePath: string;\n readonly mediaType: string;\n readonly bytes: Uint8Array;\n}\n\nexport interface TechnicalDocumentationRendererResult {\n readonly execution: TechnicalDocumentationRendererExecutionV1;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n}\n\nexport function createTechnicalDocumentationRendererExecution(input: {\n readonly rendererKind: TechnicalDocumentationRendererKind;\n readonly rendererRef: string;\n readonly rendererVersion: number;\n /** Names the renderer's configuration. `rendererRef@rendererVersion` names the implementation. */\n readonly configurationRef: string;\n}): TechnicalDocumentationRendererExecutionV1 {\n /*\n * This built two sha256 fields until 2026-08-27: one over the renderer's own function bodies\n * (`Function.prototype.toString()`), one over its configuration object. Neither was ever compared\n * to anything — they rode into the manifest beside the `rendererRef` and `rendererVersion` that\n * already say which renderer ran, in a form a reader can act on.\n */\n return {\n rendererKind: input.rendererKind,\n rendererRef: input.rendererRef,\n rendererVersion: input.rendererVersion,\n configurationRef: input.configurationRef,\n };\n}\n\nfunction slugForUnit(unit: TechnicalDocumentationUnitV1): string {\n const source = unit.unitRef.split('/').at(-1) ?? unit.unitRef;\n const slug = source.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n if (slug.length === 0) throw new Error(`technical-documentation unit ${unit.unitRef} cannot produce a stable path`);\n return slug;\n}\n\n/**\n * Every route the engine content module owns, keyed by unit slug. Exported as a SET so the\n * renderers can tell a gated page this application does not publish (flatten the link) from a\n * misspelled route (leave it for the managed-tree validator).\n */\nconst ENGINE_UNIT_PATH_BY_SLUG: Readonly<Record<string, string>> = {\n 'application-orientation': 'get-started',\n 'what-this-application-manages': 'what-this-application-manages',\n authentication: 'access-and-identity/overview',\n 'sign-in-and-mfa': 'access-and-identity/sign-in-and-mfa',\n 'complete-sign-in': 'access-and-identity/complete-sign-in',\n 'mfa-enrollment-and-recovery': 'access-and-identity/mfa-enrollment-and-recovery',\n 'sign-in-troubleshoot': 'access-and-identity/sign-in-troubleshoot',\n 'single-sign-on': 'access-and-identity/single-sign-on',\n 'sso-configure': 'access-and-identity/sso-configure',\n 'sso-rollout-and-recovery': 'access-and-identity/sso-rollout-and-recovery',\n 'sso-troubleshoot': 'access-and-identity/sso-troubleshoot',\n 'api-keys': 'access-and-identity/api-keys',\n 'api-keys-create-and-store': 'access-and-identity/api-keys-create-and-store',\n 'api-keys-lifecycle': 'access-and-identity/api-keys-lifecycle',\n 'api-keys-troubleshoot': 'access-and-identity/api-keys-troubleshoot',\n 'oauth-provider': 'access-and-identity/oauth-provider',\n 'oauth-register-client': 'access-and-identity/oauth-register-client',\n 'oauth-authorize-delegated-access': 'access-and-identity/oauth-authorize-delegated-access',\n 'oauth-operate-and-revoke': 'access-and-identity/oauth-operate-and-revoke',\n 'user-administration': 'user-administration',\n 'manage-users-manually': 'user-administration/manage-users-manually',\n 'invite-and-onboard-user': 'user-administration/invite-and-onboard-user',\n 'organization-roles': 'user-administration/roles-and-permissions',\n 'change-user-access': 'user-administration/change-user-access',\n 'manage-organization-units': 'user-administration/manage-organization-units',\n 'design-organization-unit-hierarchy': 'user-administration/design-organization-unit-hierarchy',\n 'assign-organization-unit-access': 'user-administration/assign-organization-unit-access',\n 'operate-organization-units': 'user-administration/operate-organization-units',\n 'suspend-or-remove-user': 'user-administration/suspend-or-remove-user',\n 'review-users-and-access': 'user-administration/review-users-and-access',\n 'troubleshoot-user-access': 'user-administration/troubleshoot-user-access',\n scim: 'user-administration/scim-provisioning',\n 'scim-protocol-and-payloads': 'user-administration/scim-protocol-and-payloads',\n 'scim-configure': 'user-administration/scim-configure',\n 'scim-microsoft-entra': 'user-administration/scim-microsoft-entra',\n 'scim-okta': 'user-administration/scim-okta',\n 'scim-ldap-and-active-directory': 'user-administration/scim-ldap-and-active-directory',\n 'scim-map-profile-and-units': 'user-administration/scim-map-profile-and-units',\n 'scim-validate-and-roll-out': 'user-administration/scim-validate-and-roll-out',\n 'scim-operate-and-troubleshoot': 'user-administration/scim-operate-and-troubleshoot',\n 'audit-and-siem': 'security-and-audit',\n 'investigate-audit-event': 'security-and-audit/investigate-event',\n 'review-privileged-and-access-changes': 'security-and-audit/review-access-changes',\n 'export-audit-records': 'security-and-audit/export-audit-records',\n 'configure-siem-export': 'security-and-audit/configure-siem',\n 'siem-splunk': 'security-and-audit/siem-splunk',\n 'siem-microsoft-sentinel': 'security-and-audit/siem-microsoft-sentinel',\n 'siem-elastic': 'security-and-audit/siem-elastic',\n 'operate-and-troubleshoot-siem-delivery': 'security-and-audit/operate-siem',\n 'respond-to-leaked-credential': 'security-and-audit/respond-to-leaked-credential',\n 'protect-and-retain-audit-evidence': 'security-and-audit/protect-evidence',\n integrations: 'integrations',\n 'automation-platforms': 'integrations/automation-platforms',\n 'connect-n8n': 'integrations/automation/n8n',\n 'connect-zapier': 'integrations/automation/zapier',\n 'connect-make': 'integrations/automation/make',\n 'ai-coding-tools': 'integrations/ai-coding-tools',\n 'connect-cursor': 'integrations/ai-tools/cursor',\n 'connect-codex': 'integrations/ai-tools/codex',\n 'connect-claude-code': 'integrations/ai-tools/claude-code',\n 'agent-interoperability': 'integrations/agents',\n 'mcp-integrations': 'integrations/mcp',\n 'a2a-integrations': 'integrations/a2a',\n 'first-request': 'integrations/create-your-own-integration',\n 'common-rest-api': 'integrations/rest-api',\n 'rest-api-conventions': 'integrations/rest/conventions',\n 'send-api-request': 'integrations/rest/send-request',\n 'work-with-api-collections': 'integrations/rest/read-collections',\n 'write-and-reconcile-api-changes': 'integrations/rest/write-and-reconcile',\n 'troubleshoot-api-request': 'integrations/rest/troubleshoot',\n webhooks: 'integrations/webhooks',\n 'configure-and-test-webhook-endpoint': 'integrations/webhooks/configure-and-test',\n 'verify-webhook-delivery': 'integrations/webhooks/verify-delivery',\n 'operate-webhook-deliveries': 'integrations/webhooks/operate-deliveries',\n 'troubleshoot-webhook-deliveries': 'integrations/webhooks/troubleshoot',\n};\n\nexport const ENGINE_UNIT_ROUTES: ReadonlySet<string> = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG));\n\n/**\n * Maps a published semantic unit to its consumer navigation home.\n *\n * This is deliberately renderer-owned rather than inferred from Markdown file\n * names: the semantic unit is the stable composition input, while a renderer\n * owns audience-facing URLs. The route table is deliberately organized by a\n * customer's product responsibility—not the internal framework that implements\n * it—so readers can find access, organization, security and integration\n * material without learning Wildo vocabulary.\n *\n * One namespace is DERIVED rather than listed — `unit/manages/<resource>`, the page per\n * application resource — because those units cannot be enumerated when this file is written. An\n * application-OWNED unit still fails closed instead of acquiring an implicit route; that refusal\n * is what this table is for, and it is untouched.\n */\nfunction pathForUnit(unit: TechnicalDocumentationUnitV1): string {\n const slug = slugForUnit(unit);\n /*\n * ONE derived branch, and it is deliberately narrow.\n *\n * Every other route in this table is a constant, because a renderer owns audience-facing URLs\n * and an authored page's URL is a decision somebody made. A page per application resource cannot\n * work that way — the resources are not known when this file is written — so its route is\n * DERIVED from the reserved `unit/manages/` namespace the projector emits.\n *\n * What has NOT changed is the refusal below. A unit an application named still fails closed; the\n * generated pages are engine units carrying an application subject, which is why they can be\n * routed at all. Anything outside both the fixed table and this one namespace is still a\n * missing decision rather than an implicit URL.\n */\n if (unit.unitRef.startsWith(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX)) {\n const resourceIdentifier = unit.unitRef.slice(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX.length);\n if (resourceIdentifier.length === 0 || resourceIdentifier.includes('/')) {\n throw new Error(`technical-documentation generated resource unit ${unit.unitRef} has no single-segment resource identifier`);\n }\n return `${ENGINE_UNIT_PATH_BY_SLUG['what-this-application-manages']}/${resourceIdentifier}`;\n }\n if (unit.unitRef.startsWith('technical-documentation:unit/')) {\n const path = ENGINE_UNIT_PATH_BY_SLUG[slug];\n if (path !== undefined) return path;\n throw new Error(`technical-documentation framework unit ${unit.unitRef} has no consumer navigation path`);\n }\n throw new Error(`technical-documentation unit ${unit.unitRef} has no consumer navigation category`);\n}\n\nexport function createTechnicalDocumentationRenderModel(\n authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1,\n): TechnicalDocumentationRenderModel {\n const unitPathByRef = new Map<string, string>();\n const occupiedPaths = new Set<string>();\n for (const unit of authorizedBundle.units) {\n const path = pathForUnit(unit);\n if (occupiedPaths.has(path)) throw new Error(`technical-documentation units collide on renderer path ${path}`);\n occupiedPaths.add(path);\n unitPathByRef.set(unit.unitRef, path);\n }\n return Object.freeze({\n authorizedBundleIdentity: Object.freeze({ ref: authorizedBundle.bundleRef, version: authorizedBundle.bundleVersion }),\n channel: authorizedBundle.channel,\n units: Object.freeze([...authorizedBundle.units]),\n unitPathByRef,\n });\n}\n\nexport function createTechnicalDocumentationAggregateRenderManifest(input: {\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly supportedApiVersion: TechnicalDocumentationSupportedApiVersion;\n readonly rendererResults: readonly TechnicalDocumentationRendererResult[];\n /** This render's own identity; the publication pointer selects a render by it. */\n readonly renderRef: string;\n readonly renderVersion: number;\n}): TechnicalDocumentationRenderOutputManifestV1 {\n const rendererExecutions = input.rendererResults.map((result) => result.execution);\n const outputs = input.rendererResults.flatMap((result) => result.files.map((file) => ({\n outputRef: file.outputRef,\n rendererRef: file.rendererRef,\n outputKind: file.outputKind,\n sourceUnitRefs: [...file.sourceUnitRefs],\n normalizedRelativePath: TechnicalDocumentationNormalizedRelativePathSchema.parse(file.normalizedRelativePath),\n mediaType: file.mediaType,\n byteLength: file.bytes.byteLength,\n byteDigest: technicalDocumentationSha256Bytes(file.bytes),\n })));\n return createTechnicalDocumentationRenderOutputManifestV1({\n schemaVersion: 1,\n renderRef: input.renderRef,\n renderVersion: input.renderVersion,\n authorizedBundleIdentity: { ref: input.authorizedBundle.bundleRef, version: input.authorizedBundle.bundleVersion },\n resolvedAssetBundleIdentity: { ref: input.resolvedAssetBundle.assetBundleRef, version: input.resolvedAssetBundle.assetBundleVersion },\n supportedApiVersion: input.supportedApiVersion,\n rendererExecutions,\n outputs,\n });\n}\n"]}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { type TechnicalDocumentationRenderModel, type TechnicalDocumentationRendererResult } from './technical-documentation-render-model';
|
|
2
|
+
/**
|
|
3
|
+
* The ONE index the site reads: `indexes/search.json`, imported by the application's own
|
|
4
|
+
* `src/pages/search.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* A second `indexes/navigation.json` was emitted here and read by nothing — measured with a positive
|
|
7
|
+
* control, so the empty result is a real absence rather than a bad probe. The site's navigation is
|
|
8
|
+
* the Docusaurus sidebar, which the Docusaurus renderer emits; a second navigation index was a
|
|
9
|
+
* record with no reader (#274, and `application-creation-directive.md`: if we write a record,
|
|
10
|
+
* something reads it).
|
|
11
|
+
*/
|
|
2
12
|
export declare function renderTechnicalDocumentationSearchIndexes(model: TechnicalDocumentationRenderModel): TechnicalDocumentationRendererResult;
|
|
3
13
|
//# sourceMappingURL=technical-documentation-search-index-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-search-index-renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-search-index-renderer.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-search-index-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EAC1C,MAAM,wCAAwC,CAAC;AAIhD;;;;;;;;;GASG;AACH,wBAAgB,yCAAyC,CAAC,KAAK,EAAE,iCAAiC,GAAG,oCAAoC,CA6BxI"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { TechnicalDocumentationOutputKind, TechnicalDocumentationRendererKind } from '@wildo-ai/saas-specifications/technical-documentation';
|
|
2
2
|
import { createTechnicalDocumentationRendererExecution, } from './technical-documentation-render-model.js';
|
|
3
3
|
const SEARCH_RENDERER_REF = 'technical-documentation:renderer/search-index';
|
|
4
|
+
/**
|
|
5
|
+
* The ONE index the site reads: `indexes/search.json`, imported by the application's own
|
|
6
|
+
* `src/pages/search.tsx`.
|
|
7
|
+
*
|
|
8
|
+
* A second `indexes/navigation.json` was emitted here and read by nothing — measured with a positive
|
|
9
|
+
* control, so the empty result is a real absence rather than a bad probe. The site's navigation is
|
|
10
|
+
* the Docusaurus sidebar, which the Docusaurus renderer emits; a second navigation index was a
|
|
11
|
+
* record with no reader (#274, and `application-creation-directive.md`: if we write a record,
|
|
12
|
+
* something reads it).
|
|
13
|
+
*/
|
|
4
14
|
export function renderTechnicalDocumentationSearchIndexes(model) {
|
|
5
15
|
const sourceUnitRefs = model.units.map((unit) => unit.unitRef);
|
|
6
|
-
const navigation = model.units.map((unit) => ({
|
|
7
|
-
unitRef: unit.unitRef,
|
|
8
|
-
title: unit.title,
|
|
9
|
-
kind: unit.kind,
|
|
10
|
-
path: `/${model.unitPathByRef.get(unit.unitRef)}`,
|
|
11
|
-
}));
|
|
12
16
|
const search = model.units.map((unit) => ({
|
|
13
17
|
unitRef: unit.unitRef,
|
|
14
18
|
title: unit.title,
|
|
@@ -25,15 +29,6 @@ export function renderTechnicalDocumentationSearchIndexes(model) {
|
|
|
25
29
|
configurationRef: 'technical-documentation:renderer-configuration/search-index-json-v1',
|
|
26
30
|
}),
|
|
27
31
|
files: [
|
|
28
|
-
{
|
|
29
|
-
outputRef: 'technical-documentation:output/navigation-index',
|
|
30
|
-
rendererRef: SEARCH_RENDERER_REF,
|
|
31
|
-
outputKind: TechnicalDocumentationOutputKind.NAVIGATION_INDEX,
|
|
32
|
-
sourceUnitRefs,
|
|
33
|
-
normalizedRelativePath: 'indexes/navigation.json',
|
|
34
|
-
mediaType: 'application/json',
|
|
35
|
-
bytes: Buffer.from(`${JSON.stringify({ schemaVersion: 1, units: navigation }, null, 2)}\n`, 'utf8'),
|
|
36
|
-
},
|
|
37
32
|
{
|
|
38
33
|
outputRef: 'technical-documentation:output/search-index',
|
|
39
34
|
rendererRef: SEARCH_RENDERER_REF,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-search-index-renderer.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-search-index-renderer.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-search-index-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAC;AAE7I,OAAO,EACL,6CAA6C,GAG9C,MAAM,wCAAwC,CAAC;AAEhD,MAAM,mBAAmB,GAAG,+CAA+C,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,UAAU,yCAAyC,CAAC,KAAwC;IAChG,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACzD,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,IAAI,EAAE,IAAI,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;KAClD,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,SAAS,EAAE,6CAA6C,CAAC;YACvD,YAAY,EAAE,kCAAkC,CAAC,QAAQ;YACzD,WAAW,EAAE,mBAAmB;YAChC,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,qEAAqE;SACxF,CAAC;QACF,KAAK,EAAE;YACL;gBACE,SAAS,EAAE,6CAA6C;gBACxD,WAAW,EAAE,mBAAmB;gBAChC,UAAU,EAAE,gCAAgC,CAAC,gBAAgB;gBAC7D,cAAc;gBACd,sBAAsB,EAAE,qBAAqB;gBAC7C,SAAS,EAAE,kBAAkB;gBAC7B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;aAChG;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TechnicalDocumentationOutputKind, TechnicalDocumentationRendererKind } from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n createTechnicalDocumentationRendererExecution,\n type TechnicalDocumentationRenderModel,\n type TechnicalDocumentationRendererResult,\n} from './technical-documentation-render-model';\n\nconst SEARCH_RENDERER_REF = 'technical-documentation:renderer/search-index';\n\n/**\n * The ONE index the site reads: `indexes/search.json`, imported by the application's own\n * `src/pages/search.tsx`.\n *\n * A second `indexes/navigation.json` was emitted here and read by nothing — measured with a positive\n * control, so the empty result is a real absence rather than a bad probe. The site's navigation is\n * the Docusaurus sidebar, which the Docusaurus renderer emits; a second navigation index was a\n * record with no reader (#274, and `application-creation-directive.md`: if we write a record,\n * something reads it).\n */\nexport function renderTechnicalDocumentationSearchIndexes(model: TechnicalDocumentationRenderModel): TechnicalDocumentationRendererResult {\n const sourceUnitRefs = model.units.map((unit) => unit.unitRef);\n const search = model.units.map((unit) => ({\n unitRef: unit.unitRef,\n title: unit.title,\n summary: unit.summary,\n headings: unit.sections.map((section) => section.heading),\n readerAudiences: unit.readerAudiences,\n path: `/${model.unitPathByRef.get(unit.unitRef)}`,\n }));\n return {\n execution: createTechnicalDocumentationRendererExecution({\n rendererKind: TechnicalDocumentationRendererKind.MARKDOWN,\n rendererRef: SEARCH_RENDERER_REF,\n rendererVersion: 1,\n configurationRef: 'technical-documentation:renderer-configuration/search-index-json-v1',\n }),\n files: [\n {\n outputRef: 'technical-documentation:output/search-index',\n rendererRef: SEARCH_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.NAVIGATION_INDEX,\n sourceUnitRefs,\n normalizedRelativePath: 'indexes/search.json',\n mediaType: 'application/json',\n bytes: Buffer.from(`${JSON.stringify({ schemaVersion: 1, units: search }, null, 2)}\\n`, 'utf8'),\n },\n ],\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-asset-path.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-asset-path.d.ts","sourceRoot":"","sources":["../../../src/companion/technical-documentation-asset-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,+BAA+B,EAChC,MAAM,uDAAuD,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED,gGAAgG;AAChG,wBAAgB,gDAAgD,CAAC,KAAK,EAAE;IACtE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GAAG,MAAM,CAIT"}
|