@ng-doc/builder 22.0.0-beta.1 → 22.0.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 +7 -2
- package/application/index.js.map +1 -1
- package/application/schema.json +11 -4
- 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/build-ng-doc.js +1 -16
- package/engine/build-ng-doc.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/page/demo-assets.builder.js +8 -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 +3 -3
- package/engine/builders/shared/content.builder.js.map +1 -1
- package/engine/builders/shared/entry.builder.js +1 -13
- package/engine/builders/shared/entry.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 +8 -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/entries-emitter.js +2 -6
- package/engine/core/operators/entries-emitter.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/stores/index.d.ts +0 -1
- package/engine/core/stores/index.js +0 -1
- package/engine/core/stores/index.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/engine/core/watcher/watch.js +19 -1
- package/engine/core/watcher/watch.js.map +1 -1
- package/engine/variables.d.ts +1 -0
- package/engine/variables.js +1 -0
- package/engine/variables.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 +7274 -0
- package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
- package/generator/bootstrap/cli.d.ts +42 -0
- package/generator/bootstrap/cli.js +7123 -0
- package/generator/bootstrap/constants.d.ts +4 -0
- package/generator/bootstrap/index.d.ts +111 -0
- package/generator/bootstrap/index.js +5020 -0
- package/generator/bootstrap/prerender-command.d.ts +31 -0
- package/generator/bootstrap/process-tree.d.ts +49 -0
- package/generator/build-metafile.json +11701 -0
- package/generator/build-provenance.json +119 -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 +111 -0
- package/generator/compiler/index.js +17759 -0
- package/generator/compiler/link.d.ts +38 -0
- package/generator/compiler/memo.d.ts +44 -0
- package/generator/compiler/plan.d.ts +92 -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/content-compiler.d.ts +118 -0
- package/generator/content/highlight-cache.d.ts +139 -0
- package/generator/content/html-pipeline.d.ts +170 -0
- package/generator/content/html-pool.d.ts +239 -0
- package/generator/content/html-worker.js +1598 -0
- package/generator/content-module-ids.d.ts +8 -0
- package/generator/contracts.d.ts +1063 -0
- package/generator/contracts.js +15 -0
- package/generator/discovery/index.d.ts +77 -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 +49 -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 +67 -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 +9 -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/fragments.d.ts +28 -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 +57 -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-assets.ts.nunj +25 -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 +2 -0
- package/generator/templates/page-header.html.nunj +5 -0
- package/generator/templates/page-wrapper.ts.nunj +64 -0
- package/generator/templates/page.ts.nunj +97 -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 +49 -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 +301 -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 +331 -0
- package/generator/vite/application-builder.schema.json +46 -0
- package/generator/vite/application.d.ts +91 -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/dev-server-builder.js +334 -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 +145 -0
- package/generator/vite/index.d.ts +13 -0
- package/generator/vite/index.js +11589 -0
- package/generator/vite/lease.d.ts +6 -0
- package/generator/vite/lifecycle.d.ts +119 -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 +395 -0
- package/generator/vite/prerender-runtime.d.ts +66 -0
- package/generator/vite/prerender.d.ts +27 -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-code.d.ts +2 -1
- package/helpers/format-code.js +13 -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/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/schema.d.ts +1 -0
- package/package.json +87 -30
- 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 +1 -1
- package/parsers/parse-code-block-params.js +22 -16
- 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 +816 -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 +100 -0
- package/schematics/migrate-to-vite/setup/workspace.js +225 -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 +18 -0
- package/schematics/migrate-to-vite/testing/fixtures.js +279 -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 +20 -0
- package/schematics/vite-setup/index.js +206 -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/context.ts.nunj +3 -0
- package/templates/helpers/badge.html.nunj +1 -1
- package/templates/helpers/status.html.nunj +4 -8
- package/templates/page-wrapper.ts.nunj +24 -1
- package/templates/page.ts.nunj +25 -0
- package/templates/parts/page-tags.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +8 -9
- package/templates/routes.ts.nunj +6 -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 +301 -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
- package/engine/core/stores/entry-status.d.ts +0 -23
- package/engine/core/stores/entry-status.js +0 -36
- package/engine/core/stores/entry-status.js.map +0 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import type { ArtifactSnapshot, CompilationContext, CompilationRequest, Dependency, DiscoverySnapshot, EntryDescriptor, JsonValue, KeywordExport, PageArtifact, RemoteKeywordSnapshot, ServiceResult } from '../contracts.js';
|
|
2
|
+
import { type DependencyRefresher, type ObservationStamp } from '../graph/index.js';
|
|
3
|
+
import { type UnitIndex } from '../graph/unit-index.js';
|
|
4
|
+
import type { SynchronizationPath } from '../semantic/semantic-service.js';
|
|
5
|
+
import { type PathPass } from './classify.js';
|
|
6
|
+
import { type Unit } from './common.js';
|
|
7
|
+
import type { DescribePlan } from './describe.js';
|
|
8
|
+
import type { CompilationOptions } from './index.js';
|
|
9
|
+
import type { GenerationPlan } from './plan.js';
|
|
10
|
+
import type { GenerationRetention } from './retention.js';
|
|
11
|
+
/**
|
|
12
|
+
* The targeted rebuild: a development watch generation whose changes are content, page (entry),
|
|
13
|
+
* program or structural edits compiles only the units they reach, and replays every other unit
|
|
14
|
+
* from the retained build of its base.
|
|
15
|
+
*
|
|
16
|
+
* - Before discovery, the changes (with the changes of every generation against the same base that
|
|
17
|
+
* did not commit, and the paths a stat sweep of the retained observations finds changed) are
|
|
18
|
+
* classified against the base's reverse index. Anything but content, an evaluated entry input
|
|
19
|
+
* (a page module or a file it imports), an existing program input or a structural change the
|
|
20
|
+
* structural class scopes (entries added, removed or moved, a discovery or program glob that
|
|
21
|
+
* gained or lost a file, a deleted program file, an unknown path) goes FULL; program inputs and
|
|
22
|
+
* structural changes only while the generation records semantic closures.
|
|
23
|
+
* - After discovery and the semantic synchronization, the fresh-discovery check: the
|
|
24
|
+
* configuration, the `onlyForTags` exclusions and the output templates must equal the base's.
|
|
25
|
+
* Every entry the base does not have is described, the units of every entry it no longer has are
|
|
26
|
+
* dropped, and every entry whose descriptor or evaluated value changed becomes a candidate (all
|
|
27
|
+
* of its units), as does a guide whose live values (playground controls read from its evaluated
|
|
28
|
+
* page) changed. When the program is not the base's (it was patched or synchronized again), every
|
|
29
|
+
* replayed unit's semantic closures are refreshed against it, as the full path's reuse predicate
|
|
30
|
+
* does, and each unit whose closure changed makes its entry a candidate (an API declaration only
|
|
31
|
+
* itself). API entries are enumerated again, in entry order, whenever the program or the entry
|
|
32
|
+
* set may have changed: a declaration the enumeration adds, drops or describes differently is
|
|
33
|
+
* described (or dropped) on its own, and every other declaration unit is replayed.
|
|
34
|
+
* - Candidates are described, rendered, linked and assembled by the full path's own code (its
|
|
35
|
+
* reuse predicates included). Every other unit is replayed: its retained records are what the
|
|
36
|
+
* full path would record for it, and its previous artifact is what the full path would build.
|
|
37
|
+
* The keyword set is combined in full, and the one-hop consumers of every key whose binding
|
|
38
|
+
* changed are linked and assembled again. The site-wide outputs (routes, context, search index,
|
|
39
|
+
* keywords, API lists) are aggregated in full, the output existence scan covers every previously
|
|
40
|
+
* published output, and the fold builds the result as the full path does.
|
|
41
|
+
* - Any doubt goes FULL in the same generation: a precondition, a class, the equality check, the
|
|
42
|
+
* dirty threshold, a digest conflict, an unknown path no rebuilt unit read, and any error
|
|
43
|
+
* diagnostic of the targeted attempt (the full path is the arbiter of failures).
|
|
44
|
+
*/
|
|
45
|
+
/** `on`: targeted generations; `verify`: each targeted generation is also compiled in full and compared. */
|
|
46
|
+
export type TargetedMode = 'on' | 'verify';
|
|
47
|
+
export declare function targetedMode(options: CompilationOptions): TargetedMode | undefined;
|
|
48
|
+
/** One unit of a retained build: its state and records once its generation completed. */
|
|
49
|
+
export interface RetainedUnit {
|
|
50
|
+
/** Never changed after its generation (`previous` is dropped). */
|
|
51
|
+
unit: Unit;
|
|
52
|
+
/**
|
|
53
|
+
* Every render step of its generation reused the previous IR: its dependency list and input
|
|
54
|
+
* digest are the reuse projection, so its artifact is exactly what the full path builds for it
|
|
55
|
+
* while its inputs stay unchanged.
|
|
56
|
+
*/
|
|
57
|
+
settled: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** What discovery and setup produced, compared by the fresh-discovery equality check. */
|
|
60
|
+
interface DiscoveryFacts {
|
|
61
|
+
configuration: string;
|
|
62
|
+
order: string;
|
|
63
|
+
filtered: string;
|
|
64
|
+
globalKeywords: string;
|
|
65
|
+
remoteKeywords: string;
|
|
66
|
+
templates: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The stat of a recorded path when its generation observed it: a regular file's stamp, a path that
|
|
70
|
+
* did not exist or was not a file, or `unverifiable` (written while it was observed, or recorded
|
|
71
|
+
* with a conflicting digest): the sweep always reports that one as changed.
|
|
72
|
+
*/
|
|
73
|
+
export type Observation = ObservationStamp | 'missing' | 'present' | 'unverifiable';
|
|
74
|
+
/** The per-unit records and facts of one successful build, retained for the next generation. */
|
|
75
|
+
export interface RetainedBuild {
|
|
76
|
+
units: RetainedUnit[];
|
|
77
|
+
byEntry: Map<string, RetainedUnit[]>;
|
|
78
|
+
/** Guide entry → `readGuideValues` as JSON. */
|
|
79
|
+
guideValues: Map<string, string>;
|
|
80
|
+
observations: Map<string, Observation>;
|
|
81
|
+
/** Content-level glob dependencies of the units (their membership is refreshed). */
|
|
82
|
+
globs: Dependency[];
|
|
83
|
+
facts: DiscoveryFacts;
|
|
84
|
+
/** The keyword loaders' results of the build: a targeted attempt's discovery pins them. */
|
|
85
|
+
remoteKeywords: RemoteKeywordSnapshot[];
|
|
86
|
+
}
|
|
87
|
+
/** What the phases ask of the targeted path about one unit. */
|
|
88
|
+
export interface ReplayScope {
|
|
89
|
+
/** The retained unit a replayed unit was built from; undefined for a described unit. */
|
|
90
|
+
retained(unit: Unit): RetainedUnit | undefined;
|
|
91
|
+
/** A replayed unit that is not linked and assembled again (not a one-hop consumer). */
|
|
92
|
+
keepsLink(unit: Unit): boolean;
|
|
93
|
+
}
|
|
94
|
+
/** Thrown inside a targeted attempt: the generation runs FULL instead, for `message`. */
|
|
95
|
+
export declare class TargetedFallback extends Error {
|
|
96
|
+
}
|
|
97
|
+
type GuideValues = (entryId: string) => ServiceResult<JsonValue>;
|
|
98
|
+
/** The report fields the targeted path fills for its generation (see `dry-run.ts`). */
|
|
99
|
+
export interface TargetedFacts {
|
|
100
|
+
path: 'content' | 'full';
|
|
101
|
+
reason?: string;
|
|
102
|
+
pass?: PathPass;
|
|
103
|
+
pending: number;
|
|
104
|
+
swept: string[];
|
|
105
|
+
candidates: {
|
|
106
|
+
units: number;
|
|
107
|
+
descriptors: number;
|
|
108
|
+
};
|
|
109
|
+
keys: string[];
|
|
110
|
+
/** Whether K was computed over the candidates' exports or (global/remote keywords changed) all keys. */
|
|
111
|
+
keysFrom?: 'candidates' | 'all';
|
|
112
|
+
consumers: number;
|
|
113
|
+
closure: string[];
|
|
114
|
+
/**
|
|
115
|
+
* `pinned`: discovery kept the base's keyword loader results; `refreshed`: it was pinned, and
|
|
116
|
+
* ran again with the loaders evaluated because the generation did not publish a targeted result.
|
|
117
|
+
*/
|
|
118
|
+
loaders?: 'pinned' | 'refreshed';
|
|
119
|
+
/** The structural class: entries the fresh discovery added and removed, by ID. */
|
|
120
|
+
entries?: {
|
|
121
|
+
added: string[];
|
|
122
|
+
removed: string[];
|
|
123
|
+
};
|
|
124
|
+
timings: {
|
|
125
|
+
sweepMs: number;
|
|
126
|
+
classifyMs: number;
|
|
127
|
+
admitMs: number;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** One generation's use of the targeted path (created before discovery). */
|
|
131
|
+
export declare class TargetedGeneration implements ReplayScope {
|
|
132
|
+
readonly mode: TargetedMode;
|
|
133
|
+
private readonly request;
|
|
134
|
+
private readonly committed;
|
|
135
|
+
private readonly startedNs;
|
|
136
|
+
readonly facts: TargetedFacts;
|
|
137
|
+
/** Candidate units (owner IDs) and their entries. */
|
|
138
|
+
readonly candidates: Set<string>;
|
|
139
|
+
/** Entries described in full (their descriptor changed, or the base has none). */
|
|
140
|
+
private readonly candidateEntries;
|
|
141
|
+
/** Entries of the base the fresh discovery no longer has. */
|
|
142
|
+
private removedEntries;
|
|
143
|
+
/**
|
|
144
|
+
* API entries described declaration by declaration: their enumeration changed, or one of their
|
|
145
|
+
* units is a candidate. The others are replayed (see {@link describing}).
|
|
146
|
+
*/
|
|
147
|
+
private readonly apiEntries;
|
|
148
|
+
/** API entries whose own unit is described (its record holds the enumeration, which changed). */
|
|
149
|
+
private readonly apiShells;
|
|
150
|
+
/** This generation's enumeration of every API entry, when it had to run again. */
|
|
151
|
+
private readonly enumerations;
|
|
152
|
+
/** Base owners the generation no longer has (known once the keyword set is combined). */
|
|
153
|
+
private removedOwners;
|
|
154
|
+
/** Unknown paths no fresh discovery or program input explains (a rebuilt unit must read them). */
|
|
155
|
+
private unknown;
|
|
156
|
+
private readonly replayed;
|
|
157
|
+
private linked;
|
|
158
|
+
/** K, and whether it was computed over every key (otherwise over the candidates' exports). */
|
|
159
|
+
private keys;
|
|
160
|
+
private everyKey;
|
|
161
|
+
private keywordFacts;
|
|
162
|
+
/**
|
|
163
|
+
* Whether the generation's discovery inputs or program may differ from the base's (a changed
|
|
164
|
+
* entry, a program synchronized again): the retained index then builds its input roles again.
|
|
165
|
+
*/
|
|
166
|
+
private inputsChanged;
|
|
167
|
+
/** Live guide values read in this generation (the retained ones for the next). */
|
|
168
|
+
readonly guideValues: Map<string, string>;
|
|
169
|
+
private constructor();
|
|
170
|
+
/**
|
|
171
|
+
* Undefined when the targeted rebuild is off or the generation retains nothing (production,
|
|
172
|
+
* one-shot, the reference path): such a generation is FULL and builds no retained state.
|
|
173
|
+
*/
|
|
174
|
+
static start(options: CompilationOptions, request: CompilationRequest, context: CompilationContext | undefined, retention: GenerationRetention, startedNs: bigint): TargetedGeneration | undefined;
|
|
175
|
+
/** The base's reverse index, when there is one for this generation's base. */
|
|
176
|
+
get index(): UnitIndex | undefined;
|
|
177
|
+
/** Whether the path pass allows a targeted attempt (the equality check still follows). */
|
|
178
|
+
get eligible(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* The keyword loader results discovery keeps instead of invoking the loaders, when the path pass
|
|
181
|
+
* allows a targeted attempt: the base's. Loaders are evaluated on every other generation (the
|
|
182
|
+
* pin is refreshed by each FULL generation and by a restart). Decided before discovery, which
|
|
183
|
+
* invokes the loaders; a generation that then does not publish a targeted result runs discovery
|
|
184
|
+
* again without the pin.
|
|
185
|
+
*/
|
|
186
|
+
pin(): RemoteKeywordSnapshot[] | undefined;
|
|
187
|
+
/** The generation runs FULL, for `reason` (the first reason is kept). */
|
|
188
|
+
full(reason: string): void;
|
|
189
|
+
/**
|
|
190
|
+
* The fresh-discovery equality check and the other admission rules, after discovery, the
|
|
191
|
+
* semantic synchronization and setup. False (with a reason) when the generation must run FULL.
|
|
192
|
+
* It may add candidates: a guide whose live values changed.
|
|
193
|
+
*/
|
|
194
|
+
admit(input: {
|
|
195
|
+
found: DiscoverySnapshot;
|
|
196
|
+
synchronization: SynchronizationPath | undefined;
|
|
197
|
+
plan: GenerationPlan;
|
|
198
|
+
readGuideValues: GuideValues;
|
|
199
|
+
refresher: DependencyRefresher;
|
|
200
|
+
}): Promise<boolean>;
|
|
201
|
+
private admission;
|
|
202
|
+
/**
|
|
203
|
+
* The unknown paths of the path pass that neither this generation's discovery nor its program
|
|
204
|
+
* read (a directory is explained by what they read below it).
|
|
205
|
+
*/
|
|
206
|
+
private unexplained;
|
|
207
|
+
/**
|
|
208
|
+
* Compares an API entry's fresh enumeration with its retained units: the entry's own unit holds
|
|
209
|
+
* the enumeration's contribution (its first describe record), each declaration unit its
|
|
210
|
+
* descriptor. A difference makes the entry one described declaration by declaration, with its
|
|
211
|
+
* own unit described when the contribution changed and each declaration whose descriptor changed
|
|
212
|
+
* a candidate; new declarations are described and dropped ones removed.
|
|
213
|
+
*/
|
|
214
|
+
private enumerationDiff;
|
|
215
|
+
/**
|
|
216
|
+
* Whether a refresh changes a non-physical dependency a replayed unit recorded (its describe
|
|
217
|
+
* records and its published artifact with every IR). `semantic`: the semantic closures and
|
|
218
|
+
* references are refreshed too; otherwise the program is the base's and they hold.
|
|
219
|
+
*/
|
|
220
|
+
private replayedChanged;
|
|
221
|
+
/**
|
|
222
|
+
* Describe phase of an entry with no candidate: appends its retained units, with records that
|
|
223
|
+
* hold what the full path's describe (and, for a settled unit, render) phases would record.
|
|
224
|
+
* False for an entry the caller describes: a candidate, a new entry, or an API entry described
|
|
225
|
+
* declaration by declaration ({@link describing}).
|
|
226
|
+
*/
|
|
227
|
+
replay(plan: GenerationPlan, entry: EntryDescriptor, units: Unit[]): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* How the caller describes an entry {@link replay} did not replay: an API entry takes this
|
|
230
|
+
* generation's enumeration (enumerated for every API entry in entry order, so a second call
|
|
231
|
+
* would see later entries' declarations), and one that is not a candidate replays its own unit
|
|
232
|
+
* when its enumeration's contribution is unchanged and each declaration whose unit is unchanged.
|
|
233
|
+
*/
|
|
234
|
+
describing(plan: GenerationPlan, entry: EntryDescriptor, units: Unit[]): DescribePlan | undefined;
|
|
235
|
+
/** Appends one retained unit with the records the full path would hold for it. */
|
|
236
|
+
private replayUnit;
|
|
237
|
+
retained(unit: Unit): RetainedUnit | undefined;
|
|
238
|
+
keepsLink(unit: Unit): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* After render: a path a candidate read in this generation with other bytes than a replayed
|
|
241
|
+
* unit recorded changed without an event that reached this generation. The full path would
|
|
242
|
+
* refresh and render that unit again, so the generation runs FULL. Only digests of the same
|
|
243
|
+
* recorder (the content compiler) are compared.
|
|
244
|
+
*/
|
|
245
|
+
conflict(units: Unit[]): string | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* After the keyword set is combined: the keyword diff K and the link set (candidates plus the
|
|
248
|
+
* one-hop consumers of K). One hop is exact: exports come only from entries and IR, and linking
|
|
249
|
+
* changes neither.
|
|
250
|
+
*/
|
|
251
|
+
closure(units: Unit[], keywords: KeywordExport[]): void;
|
|
252
|
+
/**
|
|
253
|
+
* After assembly: every unknown path of the path pass that no fresh discovery or program input
|
|
254
|
+
* read must be read by a unit this generation built; otherwise the full path decides.
|
|
255
|
+
*/
|
|
256
|
+
explain(artifacts: PageArtifact[], units: Unit[]): void;
|
|
257
|
+
/** The units a targeted generation linked and assembled (for the report). */
|
|
258
|
+
get closureUnits(): ReadonlySet<string>;
|
|
259
|
+
/**
|
|
260
|
+
* The retained build and index of this generation's published units, for the next generation.
|
|
261
|
+
* `targeted`: the published result is this generation's targeted attempt, so the base's build
|
|
262
|
+
* and index are overlaid; otherwise both are built from scratch.
|
|
263
|
+
*/
|
|
264
|
+
retain(input: {
|
|
265
|
+
targeted: boolean;
|
|
266
|
+
units: Unit[];
|
|
267
|
+
candidate: ArtifactSnapshot;
|
|
268
|
+
found: DiscoverySnapshot;
|
|
269
|
+
plan: GenerationPlan;
|
|
270
|
+
keywords: KeywordExport[];
|
|
271
|
+
discovery: Dependency[];
|
|
272
|
+
guideValues: Map<string, string>;
|
|
273
|
+
}): {
|
|
274
|
+
index: UnitIndex;
|
|
275
|
+
build: RetainedBuild;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
/** Changed units between two snapshots (the aggregate artifact excluded). */
|
|
279
|
+
export declare function changedArtifacts(previous: ArtifactSnapshot | undefined, candidate: ArtifactSnapshot): string[];
|
|
280
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { ContentCompiler, ContentCompilerServices, ContentDescriptor, ContentDescriptorProvenance, ContentIR, ContentRequest, DeferredContentRequest, KeywordExport, LinkedContent, ServiceResult } from '../contracts.js';
|
|
2
|
+
import { type HighlightSession } from './highlight-cache.js';
|
|
3
|
+
import { type LinkedDocument, type LinkTask, type RenderedDocument, type RenderTask } from './html-pipeline.js';
|
|
4
|
+
/** The warning of `NGDOC_PARALLEL_RENDER=verify` (`./html-pool`). */
|
|
5
|
+
export declare const PARALLEL_RENDER_MISMATCH = "CONTENT_PARALLEL_MISMATCH";
|
|
6
|
+
/**
|
|
7
|
+
* Where a generation runs the back half of its content (`./html-pipeline`): in the main thread or
|
|
8
|
+
* on render threads (`./html-pool`). Either way a task's result is the pipeline's result for its
|
|
9
|
+
* input, so the content compiler cannot tell them apart.
|
|
10
|
+
*/
|
|
11
|
+
export interface ContentBack {
|
|
12
|
+
render(task: RenderTask, signal: AbortSignal): Promise<RenderedDocument[]>;
|
|
13
|
+
link(task: LinkTask, keywords: readonly KeywordExport[], signal: AbortSignal): Promise<LinkedDocument>;
|
|
14
|
+
}
|
|
15
|
+
/** A link whose back half was dispatched ahead of its turn (`prepareLink`). */
|
|
16
|
+
export interface PreparedLink {
|
|
17
|
+
readonly ir: ContentIR;
|
|
18
|
+
readonly keywords: KeywordExport[];
|
|
19
|
+
readonly outcome: Promise<LinkedDocument>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Stateless, per-document content compiler. It never touches legacy stores.
|
|
23
|
+
*
|
|
24
|
+
* A compile has a front, which reads files, evaluates templates and queries the program, and a back
|
|
25
|
+
* half, the HTML pipeline, which is a pure function of the HTML the front produced
|
|
26
|
+
* (`./html-pipeline`). `compileStaged` resolves once the front is done and the back half is
|
|
27
|
+
* dispatched, so a caller can run the next front while the back half of this one runs elsewhere.
|
|
28
|
+
*/
|
|
29
|
+
export declare class GeneratorContentCompiler implements ContentCompiler {
|
|
30
|
+
private readonly services;
|
|
31
|
+
private readonly highlight?;
|
|
32
|
+
private readonly back?;
|
|
33
|
+
/**
|
|
34
|
+
* @param services - What the compiler reads.
|
|
35
|
+
* @param highlight - The generation's cache of highlighted code blocks; without it, every block
|
|
36
|
+
* is highlighted (`./highlight-cache`).
|
|
37
|
+
* @param back - Where the HTML pipeline runs; without it, in this thread, at once.
|
|
38
|
+
*/
|
|
39
|
+
constructor(services: ContentCompilerServices, highlight?: HighlightSession | undefined, back?: ContentBack | undefined);
|
|
40
|
+
/**
|
|
41
|
+
* Whether this call records its footprint. The semantic service's effective recorder state
|
|
42
|
+
* decides when it reports one: a service that records nothing, or whose probe or install failed,
|
|
43
|
+
* gets no content footprint either. Otherwise the environment
|
|
44
|
+
* decides. A query that still returns no footprint makes the content footprint incomplete.
|
|
45
|
+
*/
|
|
46
|
+
private recording;
|
|
47
|
+
/**
|
|
48
|
+
* One recorder scope per content phase call. The files channel is every physical dependency the
|
|
49
|
+
* call reports, and the semantic queries it made are merged in. The footprint is attached to the
|
|
50
|
+
* result out of band; the result itself is unchanged.
|
|
51
|
+
*/
|
|
52
|
+
private scope;
|
|
53
|
+
private sealed;
|
|
54
|
+
describe(request: DeferredContentRequest, provenance: ContentDescriptorProvenance, signal: AbortSignal): Promise<ServiceResult<ContentDescriptor>>;
|
|
55
|
+
private describeContent;
|
|
56
|
+
compile(request: ContentRequest, signal: AbortSignal, descriptor?: ContentDescriptor): Promise<ServiceResult<ContentIR>>;
|
|
57
|
+
/**
|
|
58
|
+
* `compile` in two stages: resolves once the front of the compile is done (everything it reads,
|
|
59
|
+
* evaluates and queries) and its HTML pipeline is dispatched to the back (`ContentBack`); `finish`
|
|
60
|
+
* then settles with exactly what `compile` returns. The rest of the compile after the pipeline is
|
|
61
|
+
* pure, so a caller may start the next front before `finish` settles: the fronts, and with them
|
|
62
|
+
* the semantic queries and their order, stay those of sequential compiles.
|
|
63
|
+
*/
|
|
64
|
+
compileStaged(request: ContentRequest, signal: AbortSignal, descriptor?: ContentDescriptor): Promise<{
|
|
65
|
+
finish: Promise<ServiceResult<ContentIR>>;
|
|
66
|
+
}>;
|
|
67
|
+
private compileContent;
|
|
68
|
+
private descriptorFields;
|
|
69
|
+
private validateProvenance;
|
|
70
|
+
private matchesDescriptor;
|
|
71
|
+
private matchesCompiledDependencies;
|
|
72
|
+
private guideTab;
|
|
73
|
+
private apiTab;
|
|
74
|
+
private demoAssets;
|
|
75
|
+
private header;
|
|
76
|
+
/** Processes one document (`./html-pipeline`) and reports what failed. */
|
|
77
|
+
private process;
|
|
78
|
+
/**
|
|
79
|
+
* Dispatches a render task to the back (or runs it here), then tells the caller of
|
|
80
|
+
* `compileStaged` that the front is done: everything after the pipeline is pure.
|
|
81
|
+
*/
|
|
82
|
+
private render;
|
|
83
|
+
/** A document's diagnostics, in the order the pipeline met them, and its HTML when it succeeded. */
|
|
84
|
+
private processed;
|
|
85
|
+
private ir;
|
|
86
|
+
/**
|
|
87
|
+
* `consulted`, when given, receives every keyword key the link pass looked up. The linked
|
|
88
|
+
* HTML is a function of the IR HTML and the bindings of exactly those keys: each lookup is
|
|
89
|
+
* made before any branch on its result.
|
|
90
|
+
*
|
|
91
|
+
* `prepared`, when given, is this request's back half dispatched earlier (`prepareLink`).
|
|
92
|
+
*/
|
|
93
|
+
link(request: {
|
|
94
|
+
ir: ContentIR;
|
|
95
|
+
keywords: KeywordExport[];
|
|
96
|
+
breadcrumbs: string[];
|
|
97
|
+
pageType: 'guide' | 'api';
|
|
98
|
+
}, signal: AbortSignal, consulted?: Set<string>, prepared?: PreparedLink): Promise<ServiceResult<LinkedContent>>;
|
|
99
|
+
/**
|
|
100
|
+
* Dispatches the back half of a link before its turn. Linking is a pure function of the IR and
|
|
101
|
+
* the keyword set, so the result `link` makes of it is the one it would make of linking then.
|
|
102
|
+
*/
|
|
103
|
+
prepareLink(request: Parameters<GeneratorContentCompiler['link']>[0], signal: AbortSignal): PreparedLink;
|
|
104
|
+
private linkBack;
|
|
105
|
+
private linkContent;
|
|
106
|
+
private actions;
|
|
107
|
+
private anchorKeywords;
|
|
108
|
+
/** A per-document renderer copied from the legacy Markdown contract without Marked.use globals. */
|
|
109
|
+
private markdownToHtml;
|
|
110
|
+
private stopIfAborted;
|
|
111
|
+
private readPhysicalFile;
|
|
112
|
+
/** `NGDOC_PARALLEL_RENDER=verify`: a thread result differed; the main thread's is used. */
|
|
113
|
+
private parallelMismatch;
|
|
114
|
+
private diag;
|
|
115
|
+
}
|
|
116
|
+
export declare function keywordBindings(keywords: KeywordExport[]): ReadonlyMap<string, KeywordExport>;
|
|
117
|
+
/** The `keywordDigest` of linked content: the bindings of the IR's used keywords. */
|
|
118
|
+
export declare function linkedKeywordDigest(ir: ContentIR, keywords: KeywordExport[]): string;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { CompilationRequest, GeneratorConfiguration } from '../contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* The cache of highlighted code blocks (`processHtml`'s `highlight` option, `@ng-doc/utils`).
|
|
4
|
+
*
|
|
5
|
+
* Highlighting a block is a pure function of its text, language and meta string, the themes, the
|
|
6
|
+
* fixed options of the highlighting plugin and the Shiki release, so its result is cached under a
|
|
7
|
+
* key that covers all of them: `digestOf({ context, block })`, where the context is the format of
|
|
8
|
+
* this cache, the resolved versions of `shiki`, `@shikijs/core` and `@shikijs/rehype`
|
|
9
|
+
* (`runtimePackages`) and the identity of each theme (a bundled theme's name; NgDoc's own theme by
|
|
10
|
+
* the digest of its definition), and the block names the plugin's format and options, the theme
|
|
11
|
+
* names, the language before its fallback, the raw meta string and the text. A Shiki upgrade or a
|
|
12
|
+
* plugin change therefore changes every key, and a stale entry is never hit.
|
|
13
|
+
*
|
|
14
|
+
* Every runtime (each thread) keeps one map of entries, which a long-lived runtime keeps across
|
|
15
|
+
* generations. A development generation with the artifact cache on also reads a pack of entries
|
|
16
|
+
* beside the cache (`<hash(projectId)>.highlight.json`) the first time it highlights, and writes
|
|
17
|
+
* it after the cache (best effort, atomically replaced, skipped when unchanged). Production, the
|
|
18
|
+
* reference path and `cache: false` never read or write the pack: they use the map only.
|
|
19
|
+
*
|
|
20
|
+
* A cached entry can never change output: the plugin uses an entry only when it is a JSON array of
|
|
21
|
+
* HAST elements and highlights the block otherwise, it stores only blocks that were highlighted
|
|
22
|
+
* without an error, and a pack of another version or context, or one that cannot be read or
|
|
23
|
+
* parsed, is not read. No dependency or watch input is added: the result depends only on the key.
|
|
24
|
+
*
|
|
25
|
+
* `NGDOC_HIGHLIGHT_CACHE=0` (`CompilationOptions.highlightCache: false`) highlights every block
|
|
26
|
+
* with the plain `@shikijs/rehype` plugin, which sets its highlighter up again for every document;
|
|
27
|
+
* `verify` highlights every hit again, uses the fresh result and reports
|
|
28
|
+
* `CONTENT_HIGHLIGHT_CACHE_MISMATCH` when it differs.
|
|
29
|
+
*
|
|
30
|
+
* The entries are plain strings, so a render thread (`./html-pool`) is handed them (the journal of
|
|
31
|
+
* this runtime's writes, `highlightJournal`) and returns what it hit and highlighted, which the
|
|
32
|
+
* main thread merges (`HighlightSession.merge`); the key is a function of the block alone. Only the
|
|
33
|
+
* main thread reads and writes the pack.
|
|
34
|
+
*/
|
|
35
|
+
/** The warning of a `verify` hit whose highlighting differs from the cached one. */
|
|
36
|
+
export declare const HIGHLIGHT_CACHE_MISMATCH = "CONTENT_HIGHLIGHT_CACHE_MISMATCH";
|
|
37
|
+
/**
|
|
38
|
+
* Above this size (keys and values, in UTF-16 code units) the pack and the map keep only the
|
|
39
|
+
* entries of the current generation.
|
|
40
|
+
*/
|
|
41
|
+
export declare const HIGHLIGHT_CACHE_LIMIT: number;
|
|
42
|
+
/** The `@ng-doc/utils` block a key is computed from (`NgDocHighlightBlock`). */
|
|
43
|
+
export interface HighlightBlock {
|
|
44
|
+
readonly options: Readonly<Record<string, string | number | boolean>>;
|
|
45
|
+
readonly themes: {
|
|
46
|
+
readonly light: string;
|
|
47
|
+
readonly dark: string;
|
|
48
|
+
};
|
|
49
|
+
readonly lang: string;
|
|
50
|
+
readonly meta: string;
|
|
51
|
+
readonly code: string;
|
|
52
|
+
}
|
|
53
|
+
/** The cache one `processHtml` call uses (`NgDocHighlightCache`), with the mismatches it saw. */
|
|
54
|
+
export interface HighlightCall {
|
|
55
|
+
key(block: HighlightBlock): string;
|
|
56
|
+
get(key: string): string | undefined;
|
|
57
|
+
set(key: string, value: string): void;
|
|
58
|
+
loads(themes: HighlightBlock['themes']): boolean;
|
|
59
|
+
readonly verify: boolean;
|
|
60
|
+
mismatch(key: string): void;
|
|
61
|
+
/** The keys of the `verify` hits that differed, in the order the call met them. */
|
|
62
|
+
readonly mismatches: readonly string[];
|
|
63
|
+
}
|
|
64
|
+
/** The writes into this runtime's entries since they were last cleared, and the clear count. */
|
|
65
|
+
export declare function highlightJournal(): {
|
|
66
|
+
epoch: number;
|
|
67
|
+
entries: ReadonlyArray<[string, string]>;
|
|
68
|
+
};
|
|
69
|
+
/** The cache's switch: `off`, `on` or `verify`. */
|
|
70
|
+
export declare function highlightCacheSwitch(options: {
|
|
71
|
+
highlightCache?: boolean | 'verify';
|
|
72
|
+
}): 'off' | 'on' | 'verify';
|
|
73
|
+
/**
|
|
74
|
+
* The cache of one generation, or undefined when blocks are highlighted without it: with the
|
|
75
|
+
* switch off, and on the reference path (`incrementalReuse: false`), which recomputes everything.
|
|
76
|
+
* Only a development generation with the artifact cache on keeps a pack.
|
|
77
|
+
*/
|
|
78
|
+
export declare function createHighlightSession(options: {
|
|
79
|
+
projectId: string;
|
|
80
|
+
incrementalReuse?: boolean;
|
|
81
|
+
highlightCache?: boolean | 'verify';
|
|
82
|
+
}, request: Pick<CompilationRequest, 'mode'>, configuration: Pick<GeneratorConfiguration, 'cacheEnabled' | 'cacheRoot' | 'themes'>): HighlightSession | undefined;
|
|
83
|
+
/** One generation's use of the cache: what it hit or highlighted, and its pack. */
|
|
84
|
+
export declare class HighlightSession {
|
|
85
|
+
readonly themes: {
|
|
86
|
+
readonly light: string;
|
|
87
|
+
readonly dark: string;
|
|
88
|
+
};
|
|
89
|
+
readonly verify: boolean;
|
|
90
|
+
readonly pack: string | undefined;
|
|
91
|
+
/** The keys this generation hit or highlighted. */
|
|
92
|
+
private readonly used;
|
|
93
|
+
readonly context: string;
|
|
94
|
+
private loaded;
|
|
95
|
+
/** An entry was replaced (a corrupt one, or a `verify` repair): the pack must be written. */
|
|
96
|
+
private replaced;
|
|
97
|
+
constructor(themes: {
|
|
98
|
+
readonly light: string;
|
|
99
|
+
readonly dark: string;
|
|
100
|
+
}, verify: boolean, pack: string | undefined);
|
|
101
|
+
/** The cache of one `processHtml` call. */
|
|
102
|
+
call(): HighlightCall;
|
|
103
|
+
/**
|
|
104
|
+
* What a render thread needs to use this cache: the context its keys are made in, whether hits
|
|
105
|
+
* are checked again, and whether the themes are known to load. Reads the pack first, so the
|
|
106
|
+
* journal holds its entries.
|
|
107
|
+
*/
|
|
108
|
+
prepare(): {
|
|
109
|
+
context: string;
|
|
110
|
+
verify: boolean;
|
|
111
|
+
proven: boolean;
|
|
112
|
+
};
|
|
113
|
+
/** The entry this runtime holds for `key`, without counting it as used. */
|
|
114
|
+
peek(key: string): string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Takes in what one document's highlighting recorded out of plan order (a render thread, or the
|
|
117
|
+
* main thread rendering ahead), as if this thread had processed it now, in plan order: a fresh
|
|
118
|
+
* value equal to the known one is a hit (another task highlighted the block first), any other
|
|
119
|
+
* replaces it; and a `verify` difference counts only while the known entry is still not the
|
|
120
|
+
* fresh value (an earlier document in plan order repaired it, as a sequential render would).
|
|
121
|
+
* Returns the differences this document reports.
|
|
122
|
+
*/
|
|
123
|
+
merge(record: {
|
|
124
|
+
used: readonly string[];
|
|
125
|
+
fresh: ReadonlyArray<readonly [string, string]>;
|
|
126
|
+
mismatched: readonly string[];
|
|
127
|
+
}): number;
|
|
128
|
+
/** Reads the pack once per runtime and context; an unusable pack is not read. */
|
|
129
|
+
private load;
|
|
130
|
+
/**
|
|
131
|
+
* Writes the pack after the artifact cache: the entries this generation hit or highlighted, plus
|
|
132
|
+
* those the pack held before unless the generation rendered every content (`complete`), or the
|
|
133
|
+
* result would exceed {@link HIGHLIGHT_CACHE_LIMIT}. Best effort: a pack that is not written
|
|
134
|
+
* only makes a later generation highlight again.
|
|
135
|
+
*/
|
|
136
|
+
save(complete: boolean): Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
/** Forgets every entry, pack and proven context of this runtime (tests). */
|
|
139
|
+
export declare function resetHighlightCache(): void;
|