@ng-doc/builder 22.0.0-beta.2 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -28
- package/application/index.js +2 -2
- package/application/index.js.map +1 -1
- package/application/schema.json +1 -2
- package/builders.json +23 -13
- package/classes/observable-map.d.ts +1 -0
- package/classes/observable-map.js +14 -3
- package/classes/observable-map.js.map +1 -1
- package/classes/observable-set.js +2 -1
- package/classes/observable-set.js.map +1 -1
- package/dev-server/index.js +5 -3
- package/dev-server/index.js.map +1 -1
- package/engine/builders/api-list/api-list-component.builder.js +4 -4
- package/engine/builders/api-list/api-list-component.builder.js.map +1 -1
- package/engine/builders/api-list/api-page-template.builder.js +2 -2
- package/engine/builders/api-list/api-page-template.builder.js.map +1 -1
- package/engine/builders/global/keywords.builder.d.ts +1 -4
- package/engine/builders/global/keywords.builder.js +5 -9
- package/engine/builders/global/keywords.builder.js.map +1 -1
- package/engine/builders/global/search-indexes.builder.js +1 -1
- package/engine/builders/global/search-indexes.builder.js.map +1 -1
- package/engine/builders/helpers/create-entry-metadata.js +2 -1
- package/engine/builders/helpers/create-entry-metadata.js.map +1 -1
- package/engine/builders/helpers/create-import-path.js.map +1 -1
- package/engine/builders/helpers/get-entry-relative-path.js.map +1 -1
- package/engine/builders/helpers/get-playground-metadata.js +7 -1
- package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
- package/engine/builders/page/demo-assets.builder.js +10 -5
- package/engine/builders/page/demo-assets.builder.js.map +1 -1
- package/engine/builders/page/playground.builder.js +1 -0
- package/engine/builders/page/playground.builder.js.map +1 -1
- package/engine/builders/shared/content.builder.js +5 -3
- package/engine/builders/shared/content.builder.js.map +1 -1
- package/engine/builders/shared/page-component.builder.js +16 -6
- package/engine/builders/shared/page-component.builder.js.map +1 -1
- package/engine/builders/shared/page-wrapper.builder.js +10 -5
- package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
- package/engine/core/operators/distinct-pending.js.map +1 -1
- package/engine/core/operators/factory.js +1 -4
- package/engine/core/operators/factory.js.map +1 -1
- package/engine/core/operators/merge-factory.js +19 -17
- package/engine/core/operators/merge-factory.js.map +1 -1
- package/engine/core/operators/when-builders-done.js.map +1 -1
- package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
- package/engine/core/triggers/on-dependencies-change.js +2 -2
- package/engine/core/triggers/on-dependencies-change.js.map +1 -1
- package/generator/artifacts/index.d.ts +317 -0
- package/generator/bootstrap/bin.d.ts +18 -0
- package/generator/bootstrap/bin.js +7298 -0
- package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
- package/generator/bootstrap/cli.d.ts +42 -0
- package/generator/bootstrap/cli.js +7147 -0
- package/generator/bootstrap/constants.d.ts +4 -0
- package/generator/bootstrap/index.d.ts +111 -0
- package/generator/bootstrap/index.js +5034 -0
- package/generator/bootstrap/prerender-command.d.ts +31 -0
- package/generator/bootstrap/process-tree.d.ts +49 -0
- package/generator/build-metafile.json +12009 -0
- package/generator/build-provenance.json +121 -0
- package/generator/compiler/assemble.d.ts +41 -0
- package/generator/compiler/classify.d.ts +161 -0
- package/generator/compiler/closure-store.d.ts +55 -0
- package/generator/compiler/common.d.ts +32 -0
- package/generator/compiler/describe.d.ts +21 -0
- package/generator/compiler/dry-run.d.ts +108 -0
- package/generator/compiler/fast-start.d.ts +104 -0
- package/generator/compiler/fold.d.ts +116 -0
- package/generator/compiler/index.d.ts +131 -0
- package/generator/compiler/index.js +19009 -0
- package/generator/compiler/link.d.ts +38 -0
- package/generator/compiler/memo.d.ts +44 -0
- package/generator/compiler/plan.d.ts +116 -0
- package/generator/compiler/progress.d.ts +54 -0
- package/generator/compiler/render.d.ts +27 -0
- package/generator/compiler/retention.d.ts +181 -0
- package/generator/compiler/semantic-closure.d.ts +46 -0
- package/generator/compiler/targeted.d.ts +280 -0
- package/generator/content/code-snippet.d.ts +20 -0
- package/generator/content/content-compiler.d.ts +122 -0
- package/generator/content/format-cache.d.ts +108 -0
- package/generator/content/highlight-cache.d.ts +115 -0
- package/generator/content/html-pipeline.d.ts +179 -0
- package/generator/content/html-pool.d.ts +245 -0
- package/generator/content/html-worker.js +2181 -0
- package/generator/content-module-ids.d.ts +8 -0
- package/generator/contracts.d.ts +1102 -0
- package/generator/contracts.js +15 -0
- package/generator/discovery/index.d.ts +79 -0
- package/generator/graph/index.d.ts +211 -0
- package/generator/graph/unit-index.d.ts +216 -0
- package/generator/kernel/canonical.d.ts +57 -0
- package/generator/kernel/flags.d.ts +51 -0
- package/generator/kernel/footprint.d.ts +88 -0
- package/generator/kernel/observations.d.ts +68 -0
- package/generator/kernel/paths.d.ts +22 -0
- package/generator/kernel/runtime-identity.d.ts +11 -0
- package/generator/outputs/index.d.ts +80 -0
- package/generator/package.json +3 -0
- package/generator/progress/ci.d.ts +22 -0
- package/generator/progress/detect.d.ts +60 -0
- package/generator/progress/events.d.ts +126 -0
- package/generator/progress/format.d.ts +83 -0
- package/generator/progress/gate.d.ts +49 -0
- package/generator/progress/host.d.ts +29 -0
- package/generator/progress/lines.d.ts +42 -0
- package/generator/progress/live.d.ts +115 -0
- package/generator/progress/model.d.ts +85 -0
- package/generator/progress/reporter.d.ts +87 -0
- package/generator/progress/settings.d.ts +60 -0
- package/generator/semantic/angular.d.ts +29 -0
- package/generator/semantic/api-enumeration.d.ts +19 -0
- package/generator/semantic/api-summary.d.ts +33 -0
- package/generator/semantic/dependencies.d.ts +20 -0
- package/generator/semantic/derived-classes.d.ts +58 -0
- package/generator/semantic/documentation-cache.d.ts +23 -0
- package/generator/semantic/formatting.d.ts +27 -0
- package/generator/semantic/fragments.d.ts +37 -0
- package/generator/semantic/owned-roots.d.ts +59 -0
- package/generator/semantic/program-builder.d.ts +55 -0
- package/generator/semantic/program-index.d.ts +124 -0
- package/generator/semantic/program-inputs.d.ts +26 -0
- package/generator/semantic/program-observations.d.ts +158 -0
- package/generator/semantic/program-retention.d.ts +147 -0
- package/generator/semantic/program-state.d.ts +196 -0
- package/generator/semantic/program-verify.d.ts +22 -0
- package/generator/semantic/recorder.d.ts +89 -0
- package/generator/semantic/rendering.d.ts +34 -0
- package/generator/semantic/semantic-closure.d.ts +129 -0
- package/generator/semantic/semantic-service.d.ts +186 -0
- package/generator/semantic/type-text.d.ts +5 -0
- package/generator/session/build-session.d.ts +206 -0
- package/generator/session/input-verification.d.ts +38 -0
- package/generator/session/parcel-event-source.d.ts +22 -0
- package/generator/session/progress.d.ts +72 -0
- package/generator/session/unchanged-saves.d.ts +63 -0
- package/generator/session/watch-inputs.d.ts +6 -0
- package/generator/session/watch-signals.d.ts +10 -0
- package/generator/templates/api/base.html.nunj +26 -0
- package/generator/templates/api/class-declaration.html.nunj +59 -0
- package/generator/templates/api/details/class-declaration.html.nunj +47 -0
- package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
- package/generator/templates/api/details/function-declaration.html.nunj +14 -0
- package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
- package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
- package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
- package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
- package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
- package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
- package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
- package/generator/templates/api/details.html.nunj +9 -0
- package/generator/templates/api/enum-declaration.html.nunj +12 -0
- package/generator/templates/api/function-declaration.html.nunj +35 -0
- package/generator/templates/api/interface-declaration.html.nunj +37 -0
- package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
- package/generator/templates/api/variable-declaration.html.nunj +8 -0
- package/generator/templates/api-header.html.nunj +11 -0
- package/generator/templates/api-list.ts.nunj +22 -0
- package/generator/templates/api-page-content.html.nunj +1 -0
- package/generator/templates/api-scope.ts.nunj +22 -0
- package/generator/templates/category.ts.nunj +22 -0
- package/generator/templates/code.html.nunj +3 -0
- package/generator/templates/context.ts.nunj +55 -0
- package/generator/templates/demo-app.ts.nunj +37 -0
- package/generator/templates/demo-assets.ts.nunj +25 -0
- package/generator/templates/demo-routes.ts.nunj +23 -0
- package/generator/templates/helpers/accessor.html.nunj +76 -0
- package/generator/templates/helpers/accessors.html.nunj +7 -0
- package/generator/templates/helpers/badge.html.nunj +4 -0
- package/generator/templates/helpers/call-signature.html.nunj +70 -0
- package/generator/templates/helpers/code.html.nunj +3 -0
- package/generator/templates/helpers/constructor.html.nunj +32 -0
- package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
- package/generator/templates/helpers/decorators.html.nunj +11 -0
- package/generator/templates/helpers/members.html.nunj +29 -0
- package/generator/templates/helpers/method.html.nunj +89 -0
- package/generator/templates/helpers/methods.html.nunj +7 -0
- package/generator/templates/helpers/modifier.html.nunj +4 -0
- package/generator/templates/helpers/no-content.html.nunj +3 -0
- package/generator/templates/helpers/overload.html.nunj +57 -0
- package/generator/templates/helpers/parameters.html.nunj +44 -0
- package/generator/templates/helpers/properties.html.nunj +61 -0
- package/generator/templates/helpers/status.html.nunj +33 -0
- package/generator/templates/helpers/tag.html.nunj +4 -0
- package/generator/templates/helpers/type.html.nunj +11 -0
- package/generator/templates/index.ts.nunj +7 -0
- package/generator/templates/page-header.html.nunj +5 -0
- package/generator/templates/page-wrapper.ts.nunj +69 -0
- package/generator/templates/page.ts.nunj +104 -0
- package/generator/templates/parts/examples.html.nunj +11 -0
- package/generator/templates/parts/member-examples.html.nunj +12 -0
- package/generator/templates/parts/member-remarks.html.nunj +8 -0
- package/generator/templates/parts/page-tags.html.nunj +10 -0
- package/generator/templates/parts/remarks.html.nunj +10 -0
- package/generator/templates/parts/see-also.html.nunj +23 -0
- package/generator/templates/parts/usage-notes.html.nunj +8 -0
- package/generator/templates/playgrounds.ts.nunj +63 -0
- package/generator/templates/routes.ts.nunj +53 -0
- package/generator/templates/symbol/decorators.html.nunj +12 -0
- package/generator/templates/symbol/details.html.nunj +62 -0
- package/generator/templates/symbol/extended-by.html.nunj +17 -0
- package/generator/templates/symbol/header.html.nunj +22 -0
- package/generator/templates/symbol/members.html.nunj +303 -0
- package/generator/templates/symbol/page.html.nunj +76 -0
- package/generator/templates/symbol/see-also.html.nunj +16 -0
- package/generator/vite/angular/ANALOG-LICENSE +21 -0
- package/generator/vite/angular/analog-provenance.json +880 -0
- package/generator/vite/angular/index.d.ts +14 -0
- package/generator/vite/angular/index.js +7300 -0
- package/generator/vite/angular-compatibility.d.ts +6 -0
- package/generator/vite/angular-composition.d.ts +68 -0
- package/generator/vite/angular-version.d.ts +38 -0
- package/generator/vite/application-builder.js +336 -0
- package/generator/vite/application-builder.schema.json +46 -0
- package/generator/vite/application.d.ts +105 -0
- package/generator/vite/assets.d.ts +11 -0
- package/generator/vite/bounded-close.d.ts +33 -0
- package/generator/vite/component-updates.d.ts +21 -0
- package/generator/vite/configuration.d.ts +3 -0
- package/generator/vite/demo-application.d.ts +34 -0
- package/generator/vite/dev-server-builder.js +339 -0
- package/generator/vite/dev-server-builder.schema.json +27 -0
- package/generator/vite/dev-styles.d.ts +65 -0
- package/generator/vite/diagnostics.d.ts +4 -0
- package/generator/vite/external-probes.d.ts +40 -0
- package/generator/vite/host-updates.d.ts +212 -0
- package/generator/vite/index.d.ts +13 -0
- package/generator/vite/index.js +11949 -0
- package/generator/vite/lease.d.ts +6 -0
- package/generator/vite/lifecycle.d.ts +120 -0
- package/generator/vite/mime.d.ts +2 -0
- package/generator/vite/missing-paths.d.ts +44 -0
- package/generator/vite/options.d.ts +87 -0
- package/generator/vite/output-watch.d.ts +41 -0
- package/generator/vite/paths.d.ts +7 -0
- package/generator/vite/plugin.d.ts +3 -0
- package/generator/vite/prerender-entry.js +465 -0
- package/generator/vite/prerender-runtime.d.ts +79 -0
- package/generator/vite/prerender.d.ts +29 -0
- package/generator/vite/production.d.ts +66 -0
- package/generator/vite/progress.d.ts +33 -0
- package/generator/vite/restore-theme.js +13 -0
- package/generator/vite/route-inventory.d.ts +24 -0
- package/generator/vite/ssr-renderer-control.d.ts +1 -0
- package/generator/vite/ssr-renderer-entry.js +444 -0
- package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
- package/generator/vite/ssr-renderer.d.ts +74 -0
- package/generator/vite/theme-index.d.ts +13 -0
- package/generator/vite/tsconfig-paths.d.ts +64 -0
- package/generator/vite/vite-event-source.d.ts +198 -0
- package/generator/vite/vite-version.d.ts +26 -0
- package/generator/vite/watch-inputs.d.ts +39 -0
- package/generator/worker/entry.d.ts +1 -0
- package/generator/worker/entry.js +614 -0
- package/generator/worker/index.d.ts +156 -0
- package/generator/worker/index.js +1030 -0
- package/generator/worker/protocol.d.ts +160 -0
- package/helpers/angular/get-component-decorator.js +6 -6
- package/helpers/angular/get-component-decorator.js.map +1 -1
- package/helpers/angular/get-directive-decorator.js +3 -3
- package/helpers/angular/get-directive-decorator.js.map +1 -1
- package/helpers/angular/get-pipe-decorator.js +3 -3
- package/helpers/angular/get-pipe-decorator.js.map +1 -1
- package/helpers/build-indexes.js +5 -2
- package/helpers/build-indexes.js.map +1 -1
- package/helpers/construct-page-keyword.js +2 -1
- package/helpers/construct-page-keyword.js.map +1 -1
- package/helpers/extract-selectors.d.ts +1 -1
- package/helpers/extract-selectors.js +5 -3
- package/helpers/extract-selectors.js.map +1 -1
- package/helpers/filter-useless-members.d.ts +1 -1
- package/helpers/format-cache.d.ts +34 -0
- package/helpers/format-cache.js +26 -0
- package/helpers/format-cache.js.map +1 -0
- package/helpers/format-code.d.ts +2 -1
- package/helpers/format-code.js +20 -4
- package/helpers/format-code.js.map +1 -1
- package/helpers/import-fresh-esm.js.map +1 -1
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +2 -0
- package/helpers/index.js.map +1 -1
- package/helpers/keyword-heading-title.d.ts +7 -0
- package/helpers/keyword-heading-title.js +21 -0
- package/helpers/keyword-heading-title.js.map +1 -0
- package/helpers/markdown-to-html.js +3 -3
- package/helpers/markdown-to-html.js.map +1 -1
- package/helpers/navigation-title-order.d.ts +8 -0
- package/helpers/navigation-title-order.js +15 -0
- package/helpers/navigation-title-order.js.map +1 -0
- package/helpers/playground/get-playground-inputs.js +8 -4
- package/helpers/playground/get-playground-inputs.js.map +1 -1
- package/helpers/playground/get-playground-template-inputs.js +2 -1
- package/helpers/playground/get-playground-template-inputs.js.map +1 -1
- package/helpers/presentation.d.ts +7 -7
- package/helpers/presentation.js +23 -23
- package/helpers/presentation.js.map +1 -1
- package/helpers/print.js +32 -5
- package/helpers/print.js.map +1 -1
- package/helpers/process-snippets.d.ts +1 -1
- package/helpers/process-snippets.js +3 -3
- package/helpers/process-snippets.js.map +1 -1
- package/helpers/snippets-from-asset.d.ts +1 -1
- package/helpers/snippets-from-asset.js +2 -2
- package/helpers/snippets-from-asset.js.map +1 -1
- package/helpers/sort-navigation-entities.js +2 -1
- package/helpers/sort-navigation-entities.js.map +1 -1
- package/helpers/stable-generated-id.d.ts +2 -0
- package/helpers/stable-generated-id.js +12 -0
- package/helpers/stable-generated-id.js.map +1 -0
- package/helpers/text-order.d.ts +8 -0
- package/helpers/text-order.js +26 -0
- package/helpers/text-order.js.map +1 -0
- package/helpers/to-template-string.d.ts +5 -1
- package/helpers/to-template-string.js +7 -2
- package/helpers/to-template-string.js.map +1 -1
- package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
- package/helpers/typescript/member/get-inherited-parent.js +2 -2
- package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
- package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
- package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
- package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
- package/helpers/typescript/property/get-property-assignment.js.map +1 -1
- package/interfaces/code-block-options.d.ts +5 -0
- package/interfaces/configuration.d.ts +84 -1
- package/package.json +87 -29
- package/parsers/helpers/number.d.ts +1 -1
- package/parsers/helpers/number.js +2 -2
- package/parsers/helpers/number.js.map +1 -1
- package/parsers/helpers/param-value.d.ts +1 -1
- package/parsers/helpers/param-value.js +2 -2
- package/parsers/helpers/param-value.js.map +1 -1
- package/parsers/helpers/param.js +3 -3
- package/parsers/helpers/param.js.map +1 -1
- package/parsers/parse-code-block-params.d.ts +11 -2
- package/parsers/parse-code-block-params.js +50 -18
- package/parsers/parse-code-block-params.js.map +1 -1
- package/parsers/parse-snippet.js +10 -10
- package/parsers/parse-snippet.js.map +1 -1
- package/schematics/collection.json +34 -23
- package/schematics/migrate-to-vite/analyze.d.ts +76 -0
- package/schematics/migrate-to-vite/analyze.js +859 -0
- package/schematics/migrate-to-vite/analyze.js.map +1 -0
- package/schematics/migrate-to-vite/index.d.ts +9 -0
- package/schematics/migrate-to-vite/index.js +585 -0
- package/schematics/migrate-to-vite/index.js.map +1 -0
- package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
- package/schematics/migrate-to-vite/legacy-folder.js +340 -0
- package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
- package/schematics/migrate-to-vite/report.d.ts +32 -0
- package/schematics/migrate-to-vite/report.js +97 -0
- package/schematics/migrate-to-vite/report.js.map +1 -0
- package/schematics/migrate-to-vite/schema.d.ts +13 -0
- package/schematics/migrate-to-vite/schema.js +3 -0
- package/schematics/migrate-to-vite/schema.js.map +1 -0
- package/schematics/migrate-to-vite/schema.json +31 -0
- package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
- package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
- package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
- package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
- package/schematics/migrate-to-vite/setup/index.js +13 -0
- package/schematics/migrate-to-vite/setup/index.js.map +1 -0
- package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
- package/schematics/migrate-to-vite/setup/json-file.js +115 -0
- package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
- package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
- package/schematics/migrate-to-vite/setup/source.js +202 -0
- package/schematics/migrate-to-vite/setup/source.js.map +1 -0
- package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
- package/schematics/migrate-to-vite/setup/targets.js +48 -0
- package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
- package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
- package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
- package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
- package/schematics/migrate-to-vite/setup/workspace.d.ts +105 -0
- package/schematics/migrate-to-vite/setup/workspace.js +245 -0
- package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
- package/schematics/migrate-to-vite/state.d.ts +65 -0
- package/schematics/migrate-to-vite/state.js +92 -0
- package/schematics/migrate-to-vite/state.js.map +1 -0
- package/schematics/migrate-to-vite/testing/fixtures.d.ts +30 -0
- package/schematics/migrate-to-vite/testing/fixtures.js +306 -0
- package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
- package/schematics/migrate-to-vite/update-note.d.ts +6 -0
- package/schematics/migrate-to-vite/update-note.js +23 -0
- package/schematics/migrate-to-vite/update-note.js.map +1 -0
- package/schematics/migration.json +5 -0
- package/schematics/migrations/standalone-pages/index.js +7 -6
- package/schematics/migrations/standalone-pages/index.js.map +1 -1
- package/schematics/vite-setup/index.d.ts +24 -0
- package/schematics/vite-setup/index.js +212 -0
- package/schematics/vite-setup/index.js.map +1 -0
- package/schematics/vite-setup/schema.d.ts +7 -0
- package/schematics/vite-setup/schema.js +3 -0
- package/schematics/vite-setup/schema.js.map +1 -0
- package/schematics/vite-setup/schema.json +19 -0
- package/scripts/restore-theme.js +9 -2
- package/templates/api/class-declaration.html.nunj +5 -3
- package/templates/context.ts.nunj +3 -0
- package/templates/demo-app.ts.nunj +37 -0
- package/templates/demo-routes.ts.nunj +23 -0
- package/templates/helpers/badge.html.nunj +1 -1
- package/templates/helpers/status.html.nunj +4 -8
- package/templates/index.ts.nunj +5 -0
- package/templates/page-wrapper.ts.nunj +30 -2
- package/templates/page.ts.nunj +33 -1
- package/templates/parts/page-tags.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +8 -9
- package/templates/routes.ts.nunj +10 -1
- package/templates/symbol/decorators.html.nunj +12 -0
- package/templates/symbol/details.html.nunj +62 -0
- package/templates/symbol/extended-by.html.nunj +17 -0
- package/templates/symbol/header.html.nunj +22 -0
- package/templates/symbol/members.html.nunj +303 -0
- package/templates/symbol/page.html.nunj +76 -0
- package/templates/symbol/see-also.html.nunj +16 -0
- package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
- package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
- package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
- package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
- package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
- package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
|
@@ -0,0 +1,1102 @@
|
|
|
1
|
+
/** Internal generator contract. Data types are JSON; service ports are process-local. */
|
|
2
|
+
/**
|
|
3
|
+
* Versions the persisted shapes that carry dependencies: the artifact fingerprint (the cache key),
|
|
4
|
+
* content descriptors and content IR. Version 2: entries record their own evaluation closure and
|
|
5
|
+
* an `evaluated` dependency, and development units and IRs record a `semantic-closure` per
|
|
6
|
+
* semantic query in place of the global `semantic-reference`, so a cache written by version 1 is a
|
|
7
|
+
* miss and is rebuilt. Version 2 also computes every digest canonically (`kernel/canonical.ts`);
|
|
8
|
+
* that changed digest values only, not shapes, so it is not a version of its own: the input
|
|
9
|
+
* digest names its formulas (`dependencyRepresentation`), and an entry written with other
|
|
10
|
+
* formulas never matches it. Version 3: page artifacts no longer carry `deferredContentIds` and
|
|
11
|
+
* snapshots no `contentIndex` (both held one value since every descriptor is always ready), so
|
|
12
|
+
* artifact and snapshot revisions changed and a cache written by version 2 is a miss. Version 4:
|
|
13
|
+
* declaration descriptors carry the declaration's `signature` and `description`, the search records
|
|
14
|
+
* of an API page's summary carry them with its `kind`, API list records a `description` and a `signature`, and the
|
|
15
|
+
* route of an API entry its `apiListSegment`, so a cache written by version 3 is a miss.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GENERATOR_SCHEMA_VERSION: 4;
|
|
18
|
+
/**
|
|
19
|
+
* Versions the output format other processes read across generator versions: the output
|
|
20
|
+
* manifest in the output root. Unchanged by {@link GENERATOR_SCHEMA_VERSION}.
|
|
21
|
+
*/
|
|
22
|
+
export declare const OUTPUT_SCHEMA_VERSION: 1;
|
|
23
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
24
|
+
[key: string]: JsonValue;
|
|
25
|
+
};
|
|
26
|
+
export type ProjectId = string;
|
|
27
|
+
export type EntryId = string;
|
|
28
|
+
export type ArtifactId = string;
|
|
29
|
+
export type Generation = number;
|
|
30
|
+
/** Absolute normalized filesystem path, never a URL. DTO paths use forward slashes. */
|
|
31
|
+
export type FilePath = string;
|
|
32
|
+
/** Route segments have no leading slash; asset URLs are resolved separately by the host. */
|
|
33
|
+
export type DocRoute = string;
|
|
34
|
+
export interface SourceLocation {
|
|
35
|
+
path: FilePath;
|
|
36
|
+
/** One-based coordinates, when available. */
|
|
37
|
+
line?: number;
|
|
38
|
+
column?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface Diagnostic {
|
|
41
|
+
code: string;
|
|
42
|
+
severity: 'error' | 'warning' | 'info';
|
|
43
|
+
message: string;
|
|
44
|
+
stage: 'discovery' | 'evaluation' | 'semantic' | 'content' | 'aggregate' | 'cache' | 'commit' | 'host';
|
|
45
|
+
source?: SourceLocation;
|
|
46
|
+
ownerId?: ArtifactId;
|
|
47
|
+
related?: Array<{
|
|
48
|
+
message: string;
|
|
49
|
+
source: SourceLocation;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
/** File dependencies are observed even when reads fail; absence is not an empty file hash. */
|
|
53
|
+
export type Dependency = {
|
|
54
|
+
kind: 'content';
|
|
55
|
+
path: FilePath;
|
|
56
|
+
digest: string;
|
|
57
|
+
} | {
|
|
58
|
+
kind: 'existence';
|
|
59
|
+
path: FilePath;
|
|
60
|
+
exists: boolean;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'glob';
|
|
63
|
+
root: FilePath;
|
|
64
|
+
include: string[];
|
|
65
|
+
exclude: string[];
|
|
66
|
+
/** Sorted resolved membership; include dot directories unless explicitly excluded. */
|
|
67
|
+
members: FilePath[];
|
|
68
|
+
} | {
|
|
69
|
+
kind: 'semantic';
|
|
70
|
+
scopeId: string;
|
|
71
|
+
/** Fingerprint includes TS config/extends, resolution, libraries and source membership. */
|
|
72
|
+
digest: string;
|
|
73
|
+
files: FilePath[];
|
|
74
|
+
reason: string;
|
|
75
|
+
} | {
|
|
76
|
+
/** Resolves to one aggregate-owned full semantic scope in a complete candidate. */
|
|
77
|
+
kind: 'semantic-reference';
|
|
78
|
+
scopeId: string;
|
|
79
|
+
digest: string;
|
|
80
|
+
reason: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'keyword';
|
|
83
|
+
key: string; /** Includes a stable missing-key sentinel. */
|
|
84
|
+
digest: string;
|
|
85
|
+
} | SemanticClosureDependency | EvaluatedDependency;
|
|
86
|
+
/**
|
|
87
|
+
* The semantic footprint of one semantic query of a unit or IR: a digest over the program
|
|
88
|
+
* environment and the content and type closure of exactly the program files the query read (and
|
|
89
|
+
* the derived-class lists it read). Non-physical: it is never a path, a watch input or a graph path
|
|
90
|
+
* edge. Only the digest is persisted; the files it covers stay with the runtime's retained program,
|
|
91
|
+
* where the refresher recomputes the digest from them (`semantic/semantic-closure.ts`). Development
|
|
92
|
+
* generations record it (schema version 2); production records the global `semantic-reference`.
|
|
93
|
+
*/
|
|
94
|
+
export interface SemanticClosureDependency {
|
|
95
|
+
kind: 'semantic-closure';
|
|
96
|
+
scopeId: string;
|
|
97
|
+
/** The query: its recorder scope kind and key (one closure per query and scope). */
|
|
98
|
+
key: string;
|
|
99
|
+
digest: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The digest of one entry's evaluated default export and its guide values. Discovery records it in
|
|
103
|
+
* the entry's dependencies (so every unit of the entry records it) and in every template render
|
|
104
|
+
* of the entry. The refresher recomputes it from the generation's fresh discovery snapshot, never
|
|
105
|
+
* from disk. Non-physical, like {@link SemanticClosureDependency}.
|
|
106
|
+
*/
|
|
107
|
+
export interface EvaluatedDependency {
|
|
108
|
+
kind: 'evaluated';
|
|
109
|
+
entryId: EntryId;
|
|
110
|
+
digest: string;
|
|
111
|
+
}
|
|
112
|
+
/** Dependency kinds that name no file, glob or keyword: they are refreshed from compiler state. */
|
|
113
|
+
export type NonPhysicalDependency = SemanticClosureDependency | EvaluatedDependency;
|
|
114
|
+
/**
|
|
115
|
+
* The identity of a non-physical dependency, shared by every dependency key and collapse: a unit
|
|
116
|
+
* records one closure per scope and key, and one evaluated digest per entry.
|
|
117
|
+
*/
|
|
118
|
+
export declare function nonPhysicalIdentity(dependency: NonPhysicalDependency): string;
|
|
119
|
+
export interface ServiceResult<T> {
|
|
120
|
+
/** Absent when this operation cannot produce usable data. Errors always fail the generation. */
|
|
121
|
+
value?: T;
|
|
122
|
+
dependencies: Dependency[];
|
|
123
|
+
diagnostics: Diagnostic[];
|
|
124
|
+
}
|
|
125
|
+
export interface RuntimeImport {
|
|
126
|
+
source: FilePath;
|
|
127
|
+
exportName: string;
|
|
128
|
+
}
|
|
129
|
+
export interface ExecutableProvenance {
|
|
130
|
+
id: string;
|
|
131
|
+
source: SourceLocation;
|
|
132
|
+
exportName: string;
|
|
133
|
+
inputDigest: string;
|
|
134
|
+
/** Opaque executable values never enter descriptors, artifacts or the persistent cache. */
|
|
135
|
+
policy: 'evaluate-each-generation' | 'input-fingerprint';
|
|
136
|
+
}
|
|
137
|
+
export interface KeywordExport {
|
|
138
|
+
key: string;
|
|
139
|
+
title: string;
|
|
140
|
+
path: string;
|
|
141
|
+
/** Missing type preserves the current inline-code keyword presentation. */
|
|
142
|
+
type?: 'link';
|
|
143
|
+
languages?: string[];
|
|
144
|
+
description?: string;
|
|
145
|
+
}
|
|
146
|
+
export interface RemoteKeywordSnapshot {
|
|
147
|
+
loaderId: string;
|
|
148
|
+
/** Digest of the actual normalized result, not function.toString(). */
|
|
149
|
+
digest: string;
|
|
150
|
+
keywords: KeywordExport[];
|
|
151
|
+
/** Optional upstream validator is evidence, never an assumed lifetime guarantee. */
|
|
152
|
+
validator?: string;
|
|
153
|
+
}
|
|
154
|
+
/** A Shiki (TextMate) language registration of `shiki.langs`: a grammar as plain JSON. */
|
|
155
|
+
export interface ShikiLanguage {
|
|
156
|
+
readonly name: string;
|
|
157
|
+
readonly scopeName: string;
|
|
158
|
+
readonly [key: string]: JsonValue;
|
|
159
|
+
}
|
|
160
|
+
export interface GeneratorConfiguration {
|
|
161
|
+
projectId: ProjectId;
|
|
162
|
+
workspaceRoot: FilePath;
|
|
163
|
+
docsRoots: FilePath[];
|
|
164
|
+
tsConfig: FilePath;
|
|
165
|
+
outputRoot: FilePath;
|
|
166
|
+
cacheRoot: FilePath;
|
|
167
|
+
routePrefix: DocRoute;
|
|
168
|
+
/** Paths relative to outputRoot. Do not conflate these with public URLs/base href. */
|
|
169
|
+
guideDirectory: string;
|
|
170
|
+
apiDirectory: string;
|
|
171
|
+
assetDirectory: string;
|
|
172
|
+
inlineStyleLanguage: 'CSS' | 'SCSS' | 'SASS' | 'LESS';
|
|
173
|
+
anchorHeadings: Array<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
|
|
174
|
+
headerTemplate?: FilePath;
|
|
175
|
+
/**
|
|
176
|
+
* `false` when `api.protectedMembers` is `false`: API templates then list only public class
|
|
177
|
+
* members. Absent otherwise, so every other configuration keeps its digest.
|
|
178
|
+
*/
|
|
179
|
+
apiProtectedMembers?: false;
|
|
180
|
+
/**
|
|
181
|
+
* The demo pages (`isolatedDemos`, `demoApplication`, `demoProviders`). Absent when none of them
|
|
182
|
+
* is set, so every other configuration keeps its digest, and so is every default field:
|
|
183
|
+
* - `pages`: `all` builds a demo page for every demo, `none` for none; absent, only the guides
|
|
184
|
+
* with an isolated demo get them.
|
|
185
|
+
* - `isolated`: `true` when `isolatedDemos` is: every `demo` action shows an iframe by default.
|
|
186
|
+
* - `path`: the URL path of the demo pages, absent for `demo-preview`.
|
|
187
|
+
* - `providers`: the module that `demoProviders` imports.
|
|
188
|
+
*/
|
|
189
|
+
demoApplication?: {
|
|
190
|
+
pages?: 'all' | 'none';
|
|
191
|
+
isolated?: true;
|
|
192
|
+
path?: string;
|
|
193
|
+
providers?: FilePath;
|
|
194
|
+
};
|
|
195
|
+
themes: {
|
|
196
|
+
light: string;
|
|
197
|
+
dark: string;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* The Shiki language registrations of `shiki.langs`, flattened, as plain JSON in configuration
|
|
201
|
+
* order. Absent without any, so every other configuration keeps its digest.
|
|
202
|
+
*/
|
|
203
|
+
shikiLangs?: ShikiLanguage[];
|
|
204
|
+
repo?: {
|
|
205
|
+
url: string;
|
|
206
|
+
platform: 'github' | 'gitlab';
|
|
207
|
+
mainBranch?: string;
|
|
208
|
+
releaseBranch?: string;
|
|
209
|
+
};
|
|
210
|
+
cacheEnabled: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Build tags matched against `onlyForTags` (sorted, unique). Discovery always sets it; only the
|
|
213
|
+
* tags that some `onlyForTags` names enter the digest.
|
|
214
|
+
*/
|
|
215
|
+
tags?: string[];
|
|
216
|
+
/** Digest of normalized settings AND executable/input provenance. */
|
|
217
|
+
digest: string;
|
|
218
|
+
executables: ExecutableProvenance[];
|
|
219
|
+
}
|
|
220
|
+
interface BaseEntryDescriptor {
|
|
221
|
+
id: EntryId;
|
|
222
|
+
source: SourceLocation;
|
|
223
|
+
title: string;
|
|
224
|
+
route: DocRoute;
|
|
225
|
+
absoluteRoute: DocRoute;
|
|
226
|
+
breadcrumbs: string[];
|
|
227
|
+
parentId?: EntryId;
|
|
228
|
+
order?: number;
|
|
229
|
+
hidden?: boolean;
|
|
230
|
+
/** Original import preserves providers, demos, route functions and non-JSON data at runtime. */
|
|
231
|
+
runtimeImport: RuntimeImport;
|
|
232
|
+
dependencies: Dependency[];
|
|
233
|
+
}
|
|
234
|
+
export interface CategoryDescriptor extends BaseEntryDescriptor {
|
|
235
|
+
kind: 'category';
|
|
236
|
+
expandable?: boolean;
|
|
237
|
+
expanded?: boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface GuideDescriptor extends BaseEntryDescriptor {
|
|
240
|
+
kind: 'guide';
|
|
241
|
+
/** Ordered markdown paths; front matter is owned by the content compiler. */
|
|
242
|
+
markdown: FilePath[];
|
|
243
|
+
hasImports: boolean;
|
|
244
|
+
}
|
|
245
|
+
export interface ApiScopeDescriptor {
|
|
246
|
+
id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
route: DocRoute;
|
|
249
|
+
order?: number;
|
|
250
|
+
include: string[];
|
|
251
|
+
exclude: string[];
|
|
252
|
+
}
|
|
253
|
+
export interface ApiDescriptor extends BaseEntryDescriptor {
|
|
254
|
+
kind: 'api';
|
|
255
|
+
keyword?: string;
|
|
256
|
+
/** Raw API route used by legacy list assets; empty when route was omitted. */
|
|
257
|
+
assetRoute?: DocRoute;
|
|
258
|
+
scopes: ApiScopeDescriptor[];
|
|
259
|
+
}
|
|
260
|
+
export type EntryDescriptor = CategoryDescriptor | GuideDescriptor | ApiDescriptor;
|
|
261
|
+
/**
|
|
262
|
+
* A page, category or API page that `onlyForTags` leaves out of this build. It has no descriptor
|
|
263
|
+
* and produces nothing; this record only lets diagnostics and acceptance checks name it.
|
|
264
|
+
*/
|
|
265
|
+
export interface FilteredEntry {
|
|
266
|
+
kind: EntryDescriptor['kind'];
|
|
267
|
+
title: string;
|
|
268
|
+
source: FilePath;
|
|
269
|
+
/** The route it would have had. */
|
|
270
|
+
absoluteRoute: DocRoute;
|
|
271
|
+
/** Its own trimmed `onlyForTags`, when it declares them. */
|
|
272
|
+
onlyForTags?: string[];
|
|
273
|
+
/** The entry whose `onlyForTags` excluded it: itself or an ancestor category. */
|
|
274
|
+
filteredBy: {
|
|
275
|
+
title: string;
|
|
276
|
+
source: FilePath;
|
|
277
|
+
onlyForTags: string[];
|
|
278
|
+
};
|
|
279
|
+
/** Guide keywords (`*Key`) from its markdown front matter. */
|
|
280
|
+
keywords?: string[];
|
|
281
|
+
}
|
|
282
|
+
export interface DiscoverySnapshot {
|
|
283
|
+
configuration: GeneratorConfiguration;
|
|
284
|
+
entries: EntryDescriptor[];
|
|
285
|
+
globalKeywords: KeywordExport[];
|
|
286
|
+
remoteKeywords: RemoteKeywordSnapshot[];
|
|
287
|
+
/** Entries left out by `onlyForTags`, sorted by source; absent when there are none. */
|
|
288
|
+
filtered?: FilteredEntry[];
|
|
289
|
+
}
|
|
290
|
+
export interface DiscoveryRequest {
|
|
291
|
+
generation: Generation;
|
|
292
|
+
projectId: ProjectId;
|
|
293
|
+
workspaceRoot: FilePath;
|
|
294
|
+
configFile?: FilePath;
|
|
295
|
+
/** Adapter supplies explicit fallbacks formerly derived from Architect target options. */
|
|
296
|
+
defaults: {
|
|
297
|
+
docsRoot: FilePath;
|
|
298
|
+
tsConfig: FilePath;
|
|
299
|
+
outputRoot: FilePath;
|
|
300
|
+
cacheRoot: FilePath;
|
|
301
|
+
};
|
|
302
|
+
changes: FileChange[];
|
|
303
|
+
/**
|
|
304
|
+
* Last results of keyword loaders. A loader whose `loaderId` has one here is not invoked, and
|
|
305
|
+
* that result is used as its own; any other loader is invoked.
|
|
306
|
+
*/
|
|
307
|
+
pinnedRemoteKeywords?: RemoteKeywordSnapshot[];
|
|
308
|
+
}
|
|
309
|
+
/** Owns configuration/evaluator lifetime and all transitive bundler inputs. */
|
|
310
|
+
export interface DiscoveryService {
|
|
311
|
+
discover(request: DiscoveryRequest, signal: AbortSignal): Promise<ServiceResult<DiscoverySnapshot>>;
|
|
312
|
+
/** Ends the current executable scope. A later discover creates a fresh scope. */
|
|
313
|
+
dispose(): Promise<void>;
|
|
314
|
+
}
|
|
315
|
+
export interface DeclarationDescriptor {
|
|
316
|
+
/**
|
|
317
|
+
* Discriminates a declaration from an entry descriptor, whose `kind` is a closed union while a
|
|
318
|
+
* declaration's `kind` is free text. Optional until the next schema version: enumeration does not
|
|
319
|
+
* emit it yet, because declaration descriptors are digested into artifact revisions. Read it
|
|
320
|
+
* through {@link isDeclarationDescriptor}.
|
|
321
|
+
*/
|
|
322
|
+
descriptorKind?: 'declaration';
|
|
323
|
+
id: string;
|
|
324
|
+
apiEntryId: EntryId;
|
|
325
|
+
scopeId: string;
|
|
326
|
+
source: SourceLocation;
|
|
327
|
+
name: string;
|
|
328
|
+
kind: string;
|
|
329
|
+
/** Public API list type, including Angular Component/Directive/Pipe distinctions. */
|
|
330
|
+
apiListType?: string;
|
|
331
|
+
/** The declaration header as written (`semantic/api-summary.ts`). */
|
|
332
|
+
signature?: string;
|
|
333
|
+
/** The first paragraph of the doc comment as one line of plain text. */
|
|
334
|
+
description?: string;
|
|
335
|
+
route: DocRoute;
|
|
336
|
+
breadcrumbs: string[];
|
|
337
|
+
/** Declaration/selector/pipe exports available without rendering anchors. */
|
|
338
|
+
exportedKeywords: KeywordExport[];
|
|
339
|
+
}
|
|
340
|
+
export interface DemoAsset {
|
|
341
|
+
title: string;
|
|
342
|
+
language: string;
|
|
343
|
+
source: FilePath;
|
|
344
|
+
/** Existing snippet/code-tab presentation metadata. */
|
|
345
|
+
icon?: string;
|
|
346
|
+
opened?: boolean;
|
|
347
|
+
/** Unhighlighted source; the content pipeline handles code/keywords consistently. */
|
|
348
|
+
code: string;
|
|
349
|
+
}
|
|
350
|
+
export interface PlaygroundDescriptor {
|
|
351
|
+
id: string;
|
|
352
|
+
target: RuntimeImport;
|
|
353
|
+
standalone: boolean;
|
|
354
|
+
selector?: string;
|
|
355
|
+
pipeName?: string;
|
|
356
|
+
template: string;
|
|
357
|
+
templatesBySelector: Record<string, string>;
|
|
358
|
+
/** Existing NgDocPlaygroundProperties shape with JSON-safe values, aliases and model inputs. */
|
|
359
|
+
properties: Record<string, JsonValue>;
|
|
360
|
+
content: Record<string, string>;
|
|
361
|
+
}
|
|
362
|
+
export interface GuideSemantics {
|
|
363
|
+
demos: Record<string, DemoAsset[]>;
|
|
364
|
+
playgrounds: PlaygroundDescriptor[];
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Whether a header's entry is a declaration descriptor rather than a guide or API entry. The one
|
|
368
|
+
* place that tells them apart while enumeration does not emit `descriptorKind` yet.
|
|
369
|
+
*/
|
|
370
|
+
export declare function isDeclarationDescriptor(entry: EntryDescriptor | DeclarationDescriptor): entry is DeclarationDescriptor;
|
|
371
|
+
/**
|
|
372
|
+
* A fragment request names its target explicitly: `declaration` for an enumerated declaration id,
|
|
373
|
+
* `entry` (the default) for an entry and, where given, a declaration path relative to it.
|
|
374
|
+
*/
|
|
375
|
+
export type SemanticFragmentRequest = {
|
|
376
|
+
kind: 'api-page' | 'api-header';
|
|
377
|
+
target: 'declaration';
|
|
378
|
+
declarationId: string;
|
|
379
|
+
} | {
|
|
380
|
+
kind: 'entry-doc';
|
|
381
|
+
target?: 'entry';
|
|
382
|
+
entryId: EntryId;
|
|
383
|
+
} | {
|
|
384
|
+
kind: 'api' | 'api-details';
|
|
385
|
+
target?: 'entry';
|
|
386
|
+
entryId: EntryId;
|
|
387
|
+
declarationPath: string;
|
|
388
|
+
} | {
|
|
389
|
+
kind: 'js-doc' | 'js-doc-tag' | 'js-doc-tags' | 'js-doc-has-tag';
|
|
390
|
+
target?: 'entry';
|
|
391
|
+
entryId: EntryId;
|
|
392
|
+
declarationPath: string;
|
|
393
|
+
tag?: string;
|
|
394
|
+
};
|
|
395
|
+
export interface SemanticFragment {
|
|
396
|
+
/** HTML for API, Markdown/string/boolean/string[] for JSDoc actions;
|
|
397
|
+
* entry-doc returns the existing { description, tags } JSDocMetadata JSON shape. */
|
|
398
|
+
format: 'html' | 'markdown' | 'value';
|
|
399
|
+
value: JsonValue;
|
|
400
|
+
}
|
|
401
|
+
/** Owns all ts-morph Nodes AND existing Node-dependent API templates/filters. */
|
|
402
|
+
export interface SemanticService {
|
|
403
|
+
/** With `retention`, the program is built so it can be retained, and may reuse `previous`. */
|
|
404
|
+
synchronize(request: {
|
|
405
|
+
generation: Generation;
|
|
406
|
+
discovery: DiscoverySnapshot;
|
|
407
|
+
changes: FileChange[];
|
|
408
|
+
retention?: SemanticRetentionRequest;
|
|
409
|
+
}, signal: AbortSignal): Promise<ServiceResult<null>>;
|
|
410
|
+
enumerateApi(entryId: EntryId): ServiceResult<DeclarationDescriptor[]>;
|
|
411
|
+
describeGuide(entryId: EntryId): ServiceResult<GuideSemantics>;
|
|
412
|
+
/** Synchronous after synchronize, so existing synchronous Nunjucks actions remain valid. */
|
|
413
|
+
renderFragment(request: SemanticFragmentRequest): ServiceResult<SemanticFragment>;
|
|
414
|
+
dispose(): Promise<void>;
|
|
415
|
+
}
|
|
416
|
+
/** An opaque retained program. Only the service that made it can use it. */
|
|
417
|
+
export interface RetainedSemanticState {
|
|
418
|
+
readonly retained: true;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* The retention part of a `synchronize` request. `synchronize` takes `previous` off the request
|
|
422
|
+
* unless it keeps the program, so a discarded program can be collected while its replacement is
|
|
423
|
+
* built. The changes it checks are the request's own `changes`.
|
|
424
|
+
*/
|
|
425
|
+
export interface SemanticRetentionRequest {
|
|
426
|
+
previous?: RetainedSemanticState;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* How one `synchronize` treated the retained program:
|
|
430
|
+
* - `reused`: kept as it was;
|
|
431
|
+
* - `patched`: kept, with the changed files applied to it;
|
|
432
|
+
* - `patched-failed`: kept with the changes applied, but the synchronization failed (for example
|
|
433
|
+
* a syntax error); the taken program is handed back so the next edit patches it again;
|
|
434
|
+
* - `full`: not kept (consumed or absent); a new program was built.
|
|
435
|
+
*/
|
|
436
|
+
export type ProgramRetentionOutcome = 'reused' | 'patched' | 'patched-failed' | 'full';
|
|
437
|
+
/** The outcome of the last `synchronize`, for the caller that keeps retained programs. */
|
|
438
|
+
export interface SemanticProgramSynchronization {
|
|
439
|
+
outcome: ProgramRetentionOutcome;
|
|
440
|
+
/** `full` only: why no retained program was kept. */
|
|
441
|
+
reason?: string;
|
|
442
|
+
/** `patched-failed` only: the taken program, handed back as the same object. */
|
|
443
|
+
handedBack?: RetainedSemanticState;
|
|
444
|
+
}
|
|
445
|
+
/** The optional port of a semantic service that can retain its program between generations. */
|
|
446
|
+
export interface SemanticProgramRetention {
|
|
447
|
+
/** How the last `synchronize` treated the retained program; undefined before it decided. */
|
|
448
|
+
programSynchronization(): SemanticProgramSynchronization | undefined;
|
|
449
|
+
/** The program to retain for the next generation, or undefined when it must not be retained. */
|
|
450
|
+
retain(): RetainedSemanticState | undefined;
|
|
451
|
+
}
|
|
452
|
+
export interface TemplateRequest {
|
|
453
|
+
entryId: EntryId;
|
|
454
|
+
source: SourceLocation;
|
|
455
|
+
text: string;
|
|
456
|
+
scope: FilePath;
|
|
457
|
+
kind: 'guide' | 'header';
|
|
458
|
+
/** Serializable front matter/JSDoc context; original NgDocPage stays inside evaluator. */
|
|
459
|
+
values: Record<string, JsonValue>;
|
|
460
|
+
}
|
|
461
|
+
/** Process-local callbacks, never cached or transported. No callback accepts or returns a Node. */
|
|
462
|
+
export interface TemplateActions {
|
|
463
|
+
invoke(namespace: 'NgDocActions' | 'NgDocApi' | 'JSDoc', name: string, args: JsonValue[]): JsonValue;
|
|
464
|
+
}
|
|
465
|
+
/** Renders with live user values and the content compiler's actions, with Nunjucks parity. */
|
|
466
|
+
export interface TemplateEvaluationService {
|
|
467
|
+
render(request: TemplateRequest, actions: TemplateActions): ServiceResult<string>;
|
|
468
|
+
}
|
|
469
|
+
export interface ContentAnchor {
|
|
470
|
+
/** DOM id can differ from the user-facing keyword anchor. */
|
|
471
|
+
anchorId: string;
|
|
472
|
+
anchor: string;
|
|
473
|
+
title: string;
|
|
474
|
+
type: 'heading' | 'member';
|
|
475
|
+
scope?: {
|
|
476
|
+
key: string;
|
|
477
|
+
title: string;
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
export interface ContentIR {
|
|
481
|
+
schemaVersion: typeof GENERATOR_SCHEMA_VERSION;
|
|
482
|
+
id: string;
|
|
483
|
+
entryId: EntryId;
|
|
484
|
+
role: 'guide-tab' | 'api-tab' | 'header' | 'demo-assets';
|
|
485
|
+
title: string;
|
|
486
|
+
/** Search navigation, preserving explicitly titled Markdown tabs. */
|
|
487
|
+
searchBreadcrumbs?: string[];
|
|
488
|
+
icon?: string;
|
|
489
|
+
/** Local child route from front matter, used by the shared wrapper. */
|
|
490
|
+
route: DocRoute;
|
|
491
|
+
absoluteRoute: DocRoute;
|
|
492
|
+
/** Highlighted/processed HTML retaining keyword placeholders until the linking stage. */
|
|
493
|
+
html: string;
|
|
494
|
+
anchors: ContentAnchor[];
|
|
495
|
+
exportedKeywords: KeywordExport[];
|
|
496
|
+
/** Includes unresolved uses. Resolve against exports after all required exports are available. */
|
|
497
|
+
usedKeywords: string[];
|
|
498
|
+
dependencies: Dependency[];
|
|
499
|
+
diagnostics: Diagnostic[];
|
|
500
|
+
}
|
|
501
|
+
export type ContentRequest = {
|
|
502
|
+
kind: 'guide-tab';
|
|
503
|
+
id: string;
|
|
504
|
+
entry: GuideDescriptor;
|
|
505
|
+
markdown: FilePath;
|
|
506
|
+
} | {
|
|
507
|
+
kind: 'header';
|
|
508
|
+
id: string;
|
|
509
|
+
entry: GuideDescriptor | ApiDescriptor | DeclarationDescriptor;
|
|
510
|
+
} | {
|
|
511
|
+
kind: 'api-tab';
|
|
512
|
+
id: string;
|
|
513
|
+
declaration: DeclarationDescriptor;
|
|
514
|
+
} | {
|
|
515
|
+
kind: 'demo-assets';
|
|
516
|
+
id: string;
|
|
517
|
+
entry: GuideDescriptor;
|
|
518
|
+
semantics: GuideSemantics;
|
|
519
|
+
};
|
|
520
|
+
/** The described content roles; demo-assets are compiled with their guide, never described. */
|
|
521
|
+
export type DeferredContentRole = 'guide-tab' | 'api-tab' | 'header';
|
|
522
|
+
export type DeferredContentRequest = Exclude<ContentRequest, {
|
|
523
|
+
kind: 'demo-assets';
|
|
524
|
+
}>;
|
|
525
|
+
/** Scalar locator resolved only against the current owning artifact/discovery tables. */
|
|
526
|
+
export type ContentLocator = {
|
|
527
|
+
kind: 'guide-tab';
|
|
528
|
+
markdown: FilePath;
|
|
529
|
+
} | {
|
|
530
|
+
kind: 'api-tab';
|
|
531
|
+
declarationId: string;
|
|
532
|
+
} | {
|
|
533
|
+
kind: 'header';
|
|
534
|
+
};
|
|
535
|
+
/** One descriptor per content slot of a page. Never embeds ContentRequest. */
|
|
536
|
+
export interface ContentDescriptor {
|
|
537
|
+
schemaVersion: typeof GENERATOR_SCHEMA_VERSION;
|
|
538
|
+
id: string;
|
|
539
|
+
ownerId: ArtifactId;
|
|
540
|
+
/** Contiguous current request order within the owner; identity is never derived from this. */
|
|
541
|
+
ordinal: number;
|
|
542
|
+
role: DeferredContentRole;
|
|
543
|
+
locator: ContentLocator;
|
|
544
|
+
title: string;
|
|
545
|
+
route: DocRoute;
|
|
546
|
+
absoluteRoute: DocRoute;
|
|
547
|
+
searchBreadcrumbs: string[];
|
|
548
|
+
icon?: string;
|
|
549
|
+
/** Raw guide front-matter keyword; content-derived anchor exports remain deferred. */
|
|
550
|
+
keyword?: string;
|
|
551
|
+
/** Compact physical/existence inputs only; owner retains semantic/config provenance once. */
|
|
552
|
+
dependencies: Dependency[];
|
|
553
|
+
inputDigest: string;
|
|
554
|
+
requestDigest: string;
|
|
555
|
+
/** Sorted unique additional slots required by this slot, within the same owner; no self-edge. */
|
|
556
|
+
closureIds: string[];
|
|
557
|
+
}
|
|
558
|
+
/** Process-local inputs to cheap metadata derivation, not repeated inside cached descriptors. */
|
|
559
|
+
export interface ContentDescriptorProvenance {
|
|
560
|
+
ownerId: ArtifactId;
|
|
561
|
+
ordinal: number;
|
|
562
|
+
ownerInputDigest: string;
|
|
563
|
+
compilerVersion: string;
|
|
564
|
+
toolchainDigest: string;
|
|
565
|
+
configurationDigest: string;
|
|
566
|
+
closureIds: string[];
|
|
567
|
+
}
|
|
568
|
+
export interface SearchRecord {
|
|
569
|
+
breadcrumbs: string[];
|
|
570
|
+
pageType: 'guide' | 'api';
|
|
571
|
+
title: string;
|
|
572
|
+
section: string;
|
|
573
|
+
route: DocRoute;
|
|
574
|
+
fragment?: string;
|
|
575
|
+
content: string;
|
|
576
|
+
/**
|
|
577
|
+
* The summary of an API declaration, on the records of its page that belong to no section:
|
|
578
|
+
* the API list type, the signature and the one-line description (when it has one).
|
|
579
|
+
*/
|
|
580
|
+
kind?: string;
|
|
581
|
+
signature?: string;
|
|
582
|
+
description?: string;
|
|
583
|
+
}
|
|
584
|
+
export interface LinkedContent {
|
|
585
|
+
ir: ContentIR;
|
|
586
|
+
html: string;
|
|
587
|
+
searchRecords: SearchRecord[];
|
|
588
|
+
/** Digest of keyword bindings, including missing uses, used in this linked output. */
|
|
589
|
+
keywordDigest: string;
|
|
590
|
+
}
|
|
591
|
+
/** Owns a per-document Marked instance and explicit HTML processor configuration. */
|
|
592
|
+
export interface ContentCompiler {
|
|
593
|
+
describe(request: DeferredContentRequest, provenance: ContentDescriptorProvenance, signal: AbortSignal): Promise<ServiceResult<ContentDescriptor>>;
|
|
594
|
+
/** Two-argument callers retain eager behavior; others pass the current validated descriptor. */
|
|
595
|
+
compile(request: ContentRequest, signal: AbortSignal, descriptor?: ContentDescriptor): Promise<ServiceResult<ContentIR>>;
|
|
596
|
+
link(request: {
|
|
597
|
+
ir: ContentIR;
|
|
598
|
+
keywords: KeywordExport[];
|
|
599
|
+
breadcrumbs: string[];
|
|
600
|
+
pageType: 'guide' | 'api';
|
|
601
|
+
}, signal: AbortSignal): Promise<ServiceResult<LinkedContent>>;
|
|
602
|
+
}
|
|
603
|
+
/** One configuration/synchronized semantic snapshot per compilation runtime. */
|
|
604
|
+
export interface ContentCompilerServices {
|
|
605
|
+
configuration: GeneratorConfiguration;
|
|
606
|
+
templates: TemplateEvaluationService;
|
|
607
|
+
semantic: SemanticService;
|
|
608
|
+
}
|
|
609
|
+
export interface FileOutput {
|
|
610
|
+
/** Relative to the configured output root; traversal/absolute paths are rejected. */
|
|
611
|
+
path: string;
|
|
612
|
+
role: 'angular' | 'content' | 'asset' | 'routes' | 'context' | 'search' | 'api-list';
|
|
613
|
+
encoding: 'utf8' | 'base64';
|
|
614
|
+
content: string;
|
|
615
|
+
digest: string;
|
|
616
|
+
}
|
|
617
|
+
export interface RouteRecord {
|
|
618
|
+
id: string;
|
|
619
|
+
parentId?: string;
|
|
620
|
+
path: DocRoute;
|
|
621
|
+
title: string;
|
|
622
|
+
order?: number;
|
|
623
|
+
hidden?: boolean;
|
|
624
|
+
icon?: string;
|
|
625
|
+
/** Current navigation JSDoc metadata must survive a warm artifact restore. */
|
|
626
|
+
metadata?: {
|
|
627
|
+
description: string;
|
|
628
|
+
tags: Record<string, string[]>;
|
|
629
|
+
};
|
|
630
|
+
category?: {
|
|
631
|
+
runtimeImport: RuntimeImport;
|
|
632
|
+
expandable?: boolean;
|
|
633
|
+
expanded?: boolean;
|
|
634
|
+
};
|
|
635
|
+
/** Relative Angular output to import, absent for categories with children. */
|
|
636
|
+
modulePath?: string;
|
|
637
|
+
/**
|
|
638
|
+
* The segment of an API entry's list data (`<asset directory>/<segment>/api-list.json`, empty
|
|
639
|
+
* for the root list), which its route carries as `ngDocApiListSegment` data.
|
|
640
|
+
*/
|
|
641
|
+
apiListSegment?: string;
|
|
642
|
+
/**
|
|
643
|
+
* The guide's demo routes module (relative to the output root), when the guide has demo pages.
|
|
644
|
+
* The aggregate lists it in `demo-app.ts`. Optional and only written for such guides, so a cache
|
|
645
|
+
* written without it stays valid: every other route record is unchanged.
|
|
646
|
+
*/
|
|
647
|
+
demoModulePath?: string;
|
|
648
|
+
/** The names of the guide's demo pages, in the order of `demos`, with `demoModulePath`. */
|
|
649
|
+
demoNames?: string[];
|
|
650
|
+
}
|
|
651
|
+
export interface ApiListRecord {
|
|
652
|
+
apiEntryId: EntryId;
|
|
653
|
+
scopeId: string;
|
|
654
|
+
scopeTitle: string;
|
|
655
|
+
name: string;
|
|
656
|
+
type: string;
|
|
657
|
+
route: DocRoute;
|
|
658
|
+
/** The declaration's one-line description, when its doc comment has one. */
|
|
659
|
+
description?: string;
|
|
660
|
+
/** The declaration header as written (`semantic/api-summary.ts`). */
|
|
661
|
+
signature?: string;
|
|
662
|
+
}
|
|
663
|
+
export interface ArtifactIdentity {
|
|
664
|
+
projectId: ProjectId;
|
|
665
|
+
entryId: EntryId;
|
|
666
|
+
/** Stable semantic ID for API declarations, omitted for guides. */
|
|
667
|
+
declarationId?: string;
|
|
668
|
+
role: 'page-shell' | 'content' | 'demo-assets' | 'playgrounds' | 'category' | 'api-list' | 'aggregate';
|
|
669
|
+
/** Stable source-derived tab/content identity, never array position or title alone. */
|
|
670
|
+
part?: string;
|
|
671
|
+
}
|
|
672
|
+
export interface ArtifactFingerprint {
|
|
673
|
+
schemaVersion: typeof GENERATOR_SCHEMA_VERSION;
|
|
674
|
+
compilerVersion: string;
|
|
675
|
+
toolchainDigest: string;
|
|
676
|
+
configurationDigest: string;
|
|
677
|
+
inputDigest: string;
|
|
678
|
+
keywordDigest: string;
|
|
679
|
+
}
|
|
680
|
+
/** Full replaceable unit: fresh compile and cache restore use exactly this representation. */
|
|
681
|
+
export interface PageArtifact {
|
|
682
|
+
id: ArtifactId;
|
|
683
|
+
identity: ArtifactIdentity;
|
|
684
|
+
revision: string;
|
|
685
|
+
fingerprint: ArtifactFingerprint;
|
|
686
|
+
dependencies: Dependency[];
|
|
687
|
+
content: LinkedContent[];
|
|
688
|
+
/**
|
|
689
|
+
* The content slots of a page artifact, each with its linked content in `content`. Absent on
|
|
690
|
+
* category and aggregate artifacts.
|
|
691
|
+
*/
|
|
692
|
+
contentDescriptors?: ContentDescriptor[];
|
|
693
|
+
exportedKeywords: KeywordExport[];
|
|
694
|
+
usedKeywords: string[];
|
|
695
|
+
searchRecords: SearchRecord[];
|
|
696
|
+
routes: RouteRecord[];
|
|
697
|
+
apiList: ApiListRecord[];
|
|
698
|
+
outputs: FileOutput[];
|
|
699
|
+
diagnostics: Diagnostic[];
|
|
700
|
+
}
|
|
701
|
+
/** JSON-only configuration used by the candidate, without executable user values. */
|
|
702
|
+
export interface PublishedGeneratorConfiguration {
|
|
703
|
+
outputRoot: FilePath;
|
|
704
|
+
cacheRoot: FilePath;
|
|
705
|
+
assetDirectory: string;
|
|
706
|
+
themes: {
|
|
707
|
+
light: string;
|
|
708
|
+
dark: string;
|
|
709
|
+
};
|
|
710
|
+
digest: string;
|
|
711
|
+
}
|
|
712
|
+
export interface ArtifactSnapshot {
|
|
713
|
+
/** Required from current compilers; optional for legacy schema-1 snapshots. */
|
|
714
|
+
configuration?: PublishedGeneratorConfiguration;
|
|
715
|
+
projectId: ProjectId;
|
|
716
|
+
revision: string;
|
|
717
|
+
artifacts: PageArtifact[];
|
|
718
|
+
globalKeywords: KeywordExport[];
|
|
719
|
+
remoteKeywords: RemoteKeywordSnapshot[];
|
|
720
|
+
}
|
|
721
|
+
export interface RebuildReason {
|
|
722
|
+
ownerId: ArtifactId;
|
|
723
|
+
reason: 'initial' | 'input' | 'existence' | 'membership' | 'semantic' | 'keyword' | 'cache-miss' | 'output-missing'
|
|
724
|
+
/** The owner's entry evaluated to another value, with no recorded path changed. */
|
|
725
|
+
| 'evaluated';
|
|
726
|
+
detail: string;
|
|
727
|
+
}
|
|
728
|
+
export interface FileChange {
|
|
729
|
+
kind: 'create' | 'update' | 'delete';
|
|
730
|
+
path: FilePath;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Why a watch generation runs. The session sends `filesystem` for a batch with changes and
|
|
734
|
+
* `reconcile` for one without (the first watch generation, or a rescan that found no difference).
|
|
735
|
+
*/
|
|
736
|
+
export type ContentRequestOrigin = 'filesystem' | 'reconcile';
|
|
737
|
+
export interface CompilationRequest {
|
|
738
|
+
generation: Generation;
|
|
739
|
+
mode: 'development' | 'production';
|
|
740
|
+
changes: FileChange[];
|
|
741
|
+
previous?: ArtifactSnapshot;
|
|
742
|
+
/** Why a watch generation runs; a `buildOnce` generation sends none. */
|
|
743
|
+
contentRequest?: {
|
|
744
|
+
origin: ContentRequestOrigin;
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
export interface CompilationResult {
|
|
748
|
+
/** Complete candidate, including retained and restored artifacts; never a partial mutation. */
|
|
749
|
+
candidate?: ArtifactSnapshot;
|
|
750
|
+
dependencies: Dependency[];
|
|
751
|
+
diagnostics: Diagnostic[];
|
|
752
|
+
whyRebuilt: RebuildReason[];
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Compiler phases in execution order (`compiler/index.ts`). Hosts group them into the user-facing
|
|
756
|
+
* steps of the progress output (`progress/model.ts`).
|
|
757
|
+
*/
|
|
758
|
+
export type CompilationPhase = 'discovery'
|
|
759
|
+
/** The fast start's check of a start's recorded inputs (`compiler/fast-start.ts`). */
|
|
760
|
+
| 'restore' | 'semantic' | 'plan' | 'describe' | 'render' | 'keywords' | 'link' | 'assemble' | 'aggregate' | 'persist';
|
|
761
|
+
/**
|
|
762
|
+
* One progress update of a compilation. Advisory only: it never influences results, commits,
|
|
763
|
+
* retention, watch inputs or caching. `boot` (a worker runtime starting) and `transfer` (the result
|
|
764
|
+
* travelling back and becoming the candidate) are reported by a worker-backed service, the other
|
|
765
|
+
* phases by the compiler.
|
|
766
|
+
*/
|
|
767
|
+
export interface CompilationProgressUpdate {
|
|
768
|
+
phase: CompilationPhase | 'boot' | 'transfer';
|
|
769
|
+
state: 'start' | 'advance' | 'end';
|
|
770
|
+
/** Units done so far; non-decreasing within `(pass, phase)`, never above `total`. */
|
|
771
|
+
completed?: number;
|
|
772
|
+
/** Fixed at `start`. */
|
|
773
|
+
total?: number;
|
|
774
|
+
/** Render: units whose content was reused from the previous generation. */
|
|
775
|
+
reused?: number;
|
|
776
|
+
/**
|
|
777
|
+
* `targeted` while the generation compiles only what its changes reach; a fall back to `full`
|
|
778
|
+
* may restart the phases once per generation. `restored`: the end of the `restore` phase of a
|
|
779
|
+
* start that published its recorded candidate without compiling (the fast start).
|
|
780
|
+
*/
|
|
781
|
+
pass?: 'targeted' | 'full' | 'restored';
|
|
782
|
+
/** With the first update of a `full` pass: a short, user-safe reason. */
|
|
783
|
+
reason?: string;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* How long the compiler runtime serving a generation may live, and what it retains between
|
|
787
|
+
* generations.
|
|
788
|
+
*/
|
|
789
|
+
export interface CompilationContext {
|
|
790
|
+
/**
|
|
791
|
+
* `watch`: a development generation of an active watch; a worker-backed service may serve it
|
|
792
|
+
* from one long-lived runtime per watch session. `generation` (buildOnce, production, and any
|
|
793
|
+
* caller that passes no context) runs in a fresh one-shot runtime; a worker-backed service may
|
|
794
|
+
* serve a development one from the long-lived runtime before the first watch, so that the watch
|
|
795
|
+
* finds its program there.
|
|
796
|
+
*/
|
|
797
|
+
lifetime: 'generation' | 'watch';
|
|
798
|
+
/**
|
|
799
|
+
* Delta transport. Set only by a caller that uses a service implementing `acknowledge`, and
|
|
800
|
+
* only for `watch` generations. The caller then:
|
|
801
|
+
*
|
|
802
|
+
* - passes its own committed snapshot as `request.previous` without a copy and does not change
|
|
803
|
+
* it while the compile runs (the service must not change it either);
|
|
804
|
+
* - owns the returned result, whose candidate may share unchanged artifact objects with
|
|
805
|
+
* `request.previous` (so the caller adopts it without another copy);
|
|
806
|
+
* - reports the outcome of every returned candidate through `acknowledge`.
|
|
807
|
+
*/
|
|
808
|
+
delta?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* The retention slot of the long-lived runtime serving this `watch` generation. A compiler
|
|
811
|
+
* without it keeps its own in-process slot. It is a process-local capability, not data: a
|
|
812
|
+
* worker runtime attaches it as a non-enumerable property, so it never serialises or clones
|
|
813
|
+
* with the context.
|
|
814
|
+
*/
|
|
815
|
+
retention?: CompilationRetention;
|
|
816
|
+
/**
|
|
817
|
+
* Process-local progress sink, attached as a non-enumerable property like `retention`, so it
|
|
818
|
+
* never serialises or clones with the context. Without it the compiler does no progress work.
|
|
819
|
+
* A worker-backed service forwards the updates of its runtime (a JSON message each, throttled)
|
|
820
|
+
* and adds `boot` and `transfer`. The caller contains its own exceptions.
|
|
821
|
+
*/
|
|
822
|
+
progress?: (update: CompilationProgressUpdate) => void;
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* What one development generation hands to the next through a {@link CompilationRetention}: an
|
|
826
|
+
* entry valid for exactly one base revision. The rest of the entry is the compiler's own.
|
|
827
|
+
*/
|
|
828
|
+
export interface RetainedCompilation {
|
|
829
|
+
/** The compiler-options key it was built under; another configuration never reuses it. */
|
|
830
|
+
readonly key: string;
|
|
831
|
+
/** The candidate revision it describes: the next generation may use it only on that base. */
|
|
832
|
+
readonly base: string;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* A retention slot: a **committed** entry, valid for the base the caller committed, and a
|
|
836
|
+
* copy-on-write **working** entry for the last returned candidate.
|
|
837
|
+
*
|
|
838
|
+
* A generation takes the committed entry for its whole run (no other generation can share it),
|
|
839
|
+
* offers the entry of its candidate, and restores the committed entry only when its program is
|
|
840
|
+
* still intact (reused and not mutated). A consumed program (a full rebuild replaced it) or a
|
|
841
|
+
* mutated one (a query added source files) is never restored, so the next generation rebuilds.
|
|
842
|
+
* Where the offer goes is the slot's promotion policy: the in-process slot commits it at once;
|
|
843
|
+
* a long-lived runtime serving delta generations keeps it as the working entry until the caller's
|
|
844
|
+
* commit is acknowledged (the `promote` message), and drops it otherwise.
|
|
845
|
+
*/
|
|
846
|
+
export interface CompilationRetention {
|
|
847
|
+
/** Empties the committed entry and returns it. */
|
|
848
|
+
take(): RetainedCompilation | undefined;
|
|
849
|
+
/** The entry of a returned candidate (its `base` is the candidate revision). */
|
|
850
|
+
offer(entry: RetainedCompilation): void;
|
|
851
|
+
/** Returns an intact taken entry; `false` (and nothing kept) when a committed entry is held. */
|
|
852
|
+
restore(entry: RetainedCompilation): boolean;
|
|
853
|
+
/**
|
|
854
|
+
* The taken entry is invalid and is not restored, for `reason` (for example `consumed`: a full
|
|
855
|
+
* rebuild replaced its program; `mutated`: a query added source files to it). The slot keeps
|
|
856
|
+
* the reason until it holds a committed entry again, so the next generation can say why it
|
|
857
|
+
* found none instead of looking like a cold start. Optional for slots that do not report it.
|
|
858
|
+
*/
|
|
859
|
+
invalidate?(reason: string): void;
|
|
860
|
+
/**
|
|
861
|
+
* The revisions held: the committed entry's base, and the working entry's while unacknowledged;
|
|
862
|
+
* while no committed entry is held, why the last one was invalidated (if the slot knows).
|
|
863
|
+
*/
|
|
864
|
+
held(): {
|
|
865
|
+
committed?: string;
|
|
866
|
+
working?: string;
|
|
867
|
+
invalidated?: string;
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
/** What the caller did with a candidate returned for a `delta` compile. */
|
|
871
|
+
export interface CompilationAcknowledgement {
|
|
872
|
+
generation: Generation;
|
|
873
|
+
/** The candidate's revision. */
|
|
874
|
+
revision: string;
|
|
875
|
+
/** `committed`: published and now the caller's `previous`. `discarded`: failed, stale or rejected. */
|
|
876
|
+
status: 'committed' | 'discarded';
|
|
877
|
+
}
|
|
878
|
+
/** Integrates discovery, templates, content, semantics and the cache; a fake can replace it. */
|
|
879
|
+
export interface CompilationService {
|
|
880
|
+
compile(request: CompilationRequest, signal: AbortSignal, context?: CompilationContext): Promise<CompilationResult>;
|
|
881
|
+
/**
|
|
882
|
+
* The session's watch started (`true`) or stopped (`false`). A worker-backed service may start
|
|
883
|
+
* its long-lived runtime ahead of the first watch generation, and ends it when the watch stops.
|
|
884
|
+
* Optional; in-process compilers ignore it.
|
|
885
|
+
*/
|
|
886
|
+
watching?(active: boolean): void | Promise<void>;
|
|
887
|
+
/**
|
|
888
|
+
* Optional. Its presence means the service supports `CompilationContext.delta`.
|
|
889
|
+
* The caller reports each delta candidate's commit outcome before its next compile. A
|
|
890
|
+
* long-lived runtime promotes its retained working state to "committed" only on `committed`;
|
|
891
|
+
* on `discarded` (or without any report) it keeps the previous committed state, and a request
|
|
892
|
+
* for any other base is served after a full resync.
|
|
893
|
+
*/
|
|
894
|
+
acknowledge?(acknowledgement: CompilationAcknowledgement): void;
|
|
895
|
+
/**
|
|
896
|
+
* Optional. Whether `result` (as this service returned it) came from a targeted generation
|
|
897
|
+
* (the targeted rebuild compiled only what its content changes reach). Only such a result may be
|
|
898
|
+
* committed as a delta against the committed snapshot; the commit of any other generation of a
|
|
899
|
+
* service that implements this is the full commit, which re-verifies every output.
|
|
900
|
+
*/
|
|
901
|
+
targetedResult?(result: CompilationResult): boolean;
|
|
902
|
+
dispose(): Promise<void>;
|
|
903
|
+
}
|
|
904
|
+
export interface CacheKey {
|
|
905
|
+
identity: ArtifactIdentity;
|
|
906
|
+
fingerprint: ArtifactFingerprint;
|
|
907
|
+
}
|
|
908
|
+
/** Validates schema, identity, digest and JSON shape before returning a hit. */
|
|
909
|
+
export interface ArtifactCache {
|
|
910
|
+
read(key: CacheKey): Promise<{
|
|
911
|
+
status: 'hit';
|
|
912
|
+
artifact: PageArtifact;
|
|
913
|
+
} | {
|
|
914
|
+
status: 'miss';
|
|
915
|
+
reason: 'absent' | 'invalid' | 'fingerprint';
|
|
916
|
+
diagnostics: Diagnostic[];
|
|
917
|
+
}>;
|
|
918
|
+
write(artifact: PageArtifact): Promise<void>;
|
|
919
|
+
}
|
|
920
|
+
export interface OutputManifest {
|
|
921
|
+
schemaVersion: typeof OUTPUT_SCHEMA_VERSION;
|
|
922
|
+
projectId: ProjectId;
|
|
923
|
+
generation: Generation;
|
|
924
|
+
revision: string;
|
|
925
|
+
files: Array<{
|
|
926
|
+
path: string;
|
|
927
|
+
ownerId: ArtifactId;
|
|
928
|
+
digest: string;
|
|
929
|
+
role: FileOutput['role'];
|
|
930
|
+
}>;
|
|
931
|
+
}
|
|
932
|
+
/** The session owns this authority. Checks must remain live; do not pass a captured boolean. */
|
|
933
|
+
export interface CommitGuard {
|
|
934
|
+
isCurrent(generation: Generation): boolean;
|
|
935
|
+
}
|
|
936
|
+
export interface CommitRequest {
|
|
937
|
+
generation: Generation;
|
|
938
|
+
candidate: ArtifactSnapshot;
|
|
939
|
+
previous?: OutputManifest;
|
|
940
|
+
/**
|
|
941
|
+
* The caller's committed snapshot and manifest, which one acknowledgement made its state. With
|
|
942
|
+
* it a committer may commit only the artifacts that changed against it. A committer checks that
|
|
943
|
+
* this is the manifest it last published itself and otherwise commits in full, as it does
|
|
944
|
+
* without a base. Omit it to ask for a full commit.
|
|
945
|
+
*/
|
|
946
|
+
base?: {
|
|
947
|
+
snapshot: ArtifactSnapshot;
|
|
948
|
+
manifest: OutputManifest;
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
export type CommitResult = {
|
|
952
|
+
status: 'committed';
|
|
953
|
+
manifest: OutputManifest;
|
|
954
|
+
written: string[];
|
|
955
|
+
removed: string[];
|
|
956
|
+
diagnostics: Diagnostic[];
|
|
957
|
+
} | {
|
|
958
|
+
status: 'stale';
|
|
959
|
+
diagnostics: Diagnostic[];
|
|
960
|
+
} | {
|
|
961
|
+
status: 'failed';
|
|
962
|
+
diagnostics: Diagnostic[];
|
|
963
|
+
};
|
|
964
|
+
/** Stages, validates ownership/collisions, rechecks guard and commits manifest last. */
|
|
965
|
+
export interface OutputCommitter {
|
|
966
|
+
commit(request: CommitRequest, guard: CommitGuard, signal: AbortSignal): Promise<CommitResult>;
|
|
967
|
+
dispose(): Promise<void>;
|
|
968
|
+
}
|
|
969
|
+
/** Ephemeral filesystem observation from one current compilation attempt; never cached. */
|
|
970
|
+
export interface WatchInputs {
|
|
971
|
+
/** Sorted unique absolute normalized paths, including missing inputs. */
|
|
972
|
+
files: FilePath[];
|
|
973
|
+
/** Sorted unique membership obligations; empty membership still needs watching. */
|
|
974
|
+
globs: Array<{
|
|
975
|
+
root: FilePath;
|
|
976
|
+
include: string[];
|
|
977
|
+
exclude: string[];
|
|
978
|
+
}>;
|
|
979
|
+
}
|
|
980
|
+
export type BuildResult = {
|
|
981
|
+
status: 'success';
|
|
982
|
+
generation: Generation;
|
|
983
|
+
/**
|
|
984
|
+
* Read-only. A watch generation served by the delta transport returns the session's
|
|
985
|
+
* committed snapshot itself, deep-frozen and shared by every consumer; any other result
|
|
986
|
+
* carries each consumer's own copy.
|
|
987
|
+
*/
|
|
988
|
+
snapshot: ArtifactSnapshot;
|
|
989
|
+
manifest: OutputManifest;
|
|
990
|
+
diagnostics: Diagnostic[];
|
|
991
|
+
whyRebuilt: RebuildReason[];
|
|
992
|
+
/** Complete successful observation. Omission means no observation, not clear watches. */
|
|
993
|
+
watchInputs?: WatchInputs;
|
|
994
|
+
/**
|
|
995
|
+
* The generation was superseded (or its watch stopped) after its commit had completed on
|
|
996
|
+
* disk. The session adopted it anyway: its snapshot and manifest are the base of the next
|
|
997
|
+
* commit. Hosts treat it as any committed generation (manifest, expected outputs, watch
|
|
998
|
+
* inputs) and may skip publishing it, since a newer result follows.
|
|
999
|
+
*/
|
|
1000
|
+
superseded?: true;
|
|
1001
|
+
} | {
|
|
1002
|
+
status: 'failure';
|
|
1003
|
+
generation: Generation;
|
|
1004
|
+
diagnostics: Diagnostic[];
|
|
1005
|
+
whyRebuilt: RebuildReason[];
|
|
1006
|
+
lastGoodRevision?: string;
|
|
1007
|
+
/** Partial attempt observation; hosts retain last-success inputs plus this failure. */
|
|
1008
|
+
watchInputs?: WatchInputs;
|
|
1009
|
+
} | {
|
|
1010
|
+
status: 'cancelled';
|
|
1011
|
+
generation: Generation;
|
|
1012
|
+
diagnostics: Diagnostic[];
|
|
1013
|
+
whyRebuilt: RebuildReason[];
|
|
1014
|
+
lastGoodRevision?: string;
|
|
1015
|
+
/** Superseded/disposed work must not change host watch registrations. */
|
|
1016
|
+
watchInputs?: never;
|
|
1017
|
+
};
|
|
1018
|
+
export type BuildEvent = {
|
|
1019
|
+
kind: 'started';
|
|
1020
|
+
generation: Generation;
|
|
1021
|
+
changes: FileChange[];
|
|
1022
|
+
} | {
|
|
1023
|
+
kind: 'result';
|
|
1024
|
+
result: BuildResult;
|
|
1025
|
+
} | {
|
|
1026
|
+
kind: 'diagnostic';
|
|
1027
|
+
diagnostic: Diagnostic;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Watched `update` events the session discarded as unchanged saves: each file's bytes equal the
|
|
1031
|
+
* content the last committed generation observed and no active or queued generation had the
|
|
1032
|
+
* path in its changes. No generation starts for them; hosts release per-change waits instead.
|
|
1033
|
+
*/
|
|
1034
|
+
| {
|
|
1035
|
+
kind: 'unchanged';
|
|
1036
|
+
changes: FileChange[];
|
|
1037
|
+
} | {
|
|
1038
|
+
kind: 'disposed';
|
|
1039
|
+
};
|
|
1040
|
+
/** subscribe is asynchronous: session must close a late-resolving subscription after dispose. */
|
|
1041
|
+
export interface FileEventSource {
|
|
1042
|
+
subscribe(
|
|
1043
|
+
/**
|
|
1044
|
+
* Returns `false` when the session discarded every delivered change as an unchanged save, so
|
|
1045
|
+
* no generation will run for them (see the `unchanged` BuildEvent). Any other value means the
|
|
1046
|
+
* changes were admitted or are still pending a decision.
|
|
1047
|
+
*/
|
|
1048
|
+
listener: (events: FileChange[]) => unknown, onError: (diagnostic: Diagnostic) => void): Promise<{
|
|
1049
|
+
dispose(): Promise<void>;
|
|
1050
|
+
}>;
|
|
1051
|
+
}
|
|
1052
|
+
export interface WatchHandle {
|
|
1053
|
+
/** Resolves to the first completed attempt; callers must inspect success before starting a host. */
|
|
1054
|
+
initial: Promise<BuildResult>;
|
|
1055
|
+
dispose(): Promise<void>;
|
|
1056
|
+
}
|
|
1057
|
+
/** Owns queue, committed state, resource lifetime, bounded concurrency and generation guards. */
|
|
1058
|
+
export interface BuildSession {
|
|
1059
|
+
buildOnce(options?: {
|
|
1060
|
+
mode?: 'development' | 'production';
|
|
1061
|
+
}): Promise<BuildResult>;
|
|
1062
|
+
watch(source: FileEventSource, onEvent: (event: BuildEvent) => void): Promise<WatchHandle>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Re-observes the given paths of the active watch (inputs a host has only just begun watching)
|
|
1065
|
+
* against what the newest settled generation observed. Each difference is admitted as an
|
|
1066
|
+
* ordinary watched change; when nothing differs no generation runs. Resolves once any change
|
|
1067
|
+
* is admitted, never waiting for a generation. Without an active watch it does nothing.
|
|
1068
|
+
*/
|
|
1069
|
+
reconcileInputs(paths: readonly string[]): Promise<void>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Asks the active watch to re-observe every committed input before its next generation, as
|
|
1072
|
+
* after a lossy watcher: for a host that may have missed changes it cannot name. Every
|
|
1073
|
+
* difference becomes an ordinary change; the generation runs even when nothing differs, and it
|
|
1074
|
+
* always takes the full commit. Resolves once scheduled, never waiting for a generation.
|
|
1075
|
+
* Without an active watch it does nothing.
|
|
1076
|
+
*/
|
|
1077
|
+
rescan(): Promise<void>;
|
|
1078
|
+
dispose(): Promise<void>;
|
|
1079
|
+
}
|
|
1080
|
+
export interface BuildSessionServices {
|
|
1081
|
+
compiler: CompilationService;
|
|
1082
|
+
committer: OutputCommitter;
|
|
1083
|
+
}
|
|
1084
|
+
/** Adapts readiness/events, assets, compiler diagnostics and shutdown to a host. */
|
|
1085
|
+
export interface HostAdapter {
|
|
1086
|
+
start(initial: Extract<BuildResult, {
|
|
1087
|
+
status: 'success';
|
|
1088
|
+
}>, signal: AbortSignal): Promise<void>;
|
|
1089
|
+
update(result: BuildResult): Promise<void>;
|
|
1090
|
+
dispose(): Promise<void>;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* The runtime and generator share one JSON content schema without app → builder imports. Imported
|
|
1094
|
+
* from the package root: `@ng-doc/core` has no `exports`, so a subpath is a directory import,
|
|
1095
|
+
* which TypeScript's `NodeNext` resolution refuses in these ESM declarations.
|
|
1096
|
+
*/
|
|
1097
|
+
export type { NgDocContentModule as ContentModule } from '@ng-doc/core';
|
|
1098
|
+
export interface HostAssetMapping {
|
|
1099
|
+
generatedDirectory: FilePath;
|
|
1100
|
+
/** URL prefix resolved against document base href by the host/runtime. */
|
|
1101
|
+
publicPath: string;
|
|
1102
|
+
}
|