@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,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,20 @@
|
|
|
1
|
+
/** The code of a named snippet, or why a file has none. */
|
|
2
|
+
export type SnippetRegion = {
|
|
3
|
+
status: 'found';
|
|
4
|
+
code: string;
|
|
5
|
+
} | {
|
|
6
|
+
status: 'unknown';
|
|
7
|
+
} | {
|
|
8
|
+
status: 'unclosed';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The region of `text` between the first `snippet#<id>` marker and the next marker with the same
|
|
12
|
+
* id, as a code block's `file="./x.ts"#<id>` shows it: every marker line inside it is removed
|
|
13
|
+
* (nested snippets included, as in demos) and so are `ng-doc-ignore-line` lines, blank lines
|
|
14
|
+
* around it are dropped, and the common indentation is taken off, so a region inside a class
|
|
15
|
+
* reads like top-level code. Lines end with LF whatever the file uses, so the output never
|
|
16
|
+
* depends on the platform that saved the file.
|
|
17
|
+
* @param text - The whole file.
|
|
18
|
+
* @param id - The snippet id.
|
|
19
|
+
*/
|
|
20
|
+
export declare function snippetRegion(text: string, id: string): SnippetRegion;
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
/** The Shiki grammars highlighting loads (`grammarsSwitch`). */
|
|
34
|
+
private readonly grammars;
|
|
35
|
+
/**
|
|
36
|
+
* @param services - What the compiler reads.
|
|
37
|
+
* @param highlight - The generation's cache of highlighted code blocks; without it, every block
|
|
38
|
+
* is highlighted (`./highlight-cache`).
|
|
39
|
+
* @param back - Where the HTML pipeline runs; without it, in this thread, at once.
|
|
40
|
+
*/
|
|
41
|
+
constructor(services: ContentCompilerServices, highlight?: HighlightSession | undefined, back?: ContentBack | undefined,
|
|
42
|
+
/** The Shiki grammars highlighting loads (`grammarsSwitch`). */
|
|
43
|
+
grammars?: 'used' | 'all');
|
|
44
|
+
/**
|
|
45
|
+
* Whether this call records its footprint. The semantic service's effective recorder state
|
|
46
|
+
* decides when it reports one: a service that records nothing, or whose probe or install failed,
|
|
47
|
+
* gets no content footprint either. Otherwise the environment
|
|
48
|
+
* decides. A query that still returns no footprint makes the content footprint incomplete.
|
|
49
|
+
*/
|
|
50
|
+
private recording;
|
|
51
|
+
/**
|
|
52
|
+
* One recorder scope per content phase call. The files channel is every physical dependency the
|
|
53
|
+
* call reports, and the semantic queries it made are merged in. The footprint is attached to the
|
|
54
|
+
* result out of band; the result itself is unchanged.
|
|
55
|
+
*/
|
|
56
|
+
private scope;
|
|
57
|
+
private sealed;
|
|
58
|
+
describe(request: DeferredContentRequest, provenance: ContentDescriptorProvenance, signal: AbortSignal): Promise<ServiceResult<ContentDescriptor>>;
|
|
59
|
+
private describeContent;
|
|
60
|
+
compile(request: ContentRequest, signal: AbortSignal, descriptor?: ContentDescriptor): Promise<ServiceResult<ContentIR>>;
|
|
61
|
+
/**
|
|
62
|
+
* `compile` in two stages: resolves once the front of the compile is done (everything it reads,
|
|
63
|
+
* evaluates and queries) and its HTML pipeline is dispatched to the back (`ContentBack`); `finish`
|
|
64
|
+
* then settles with exactly what `compile` returns. The rest of the compile after the pipeline is
|
|
65
|
+
* pure, so a caller may start the next front before `finish` settles: the fronts, and with them
|
|
66
|
+
* the semantic queries and their order, stay those of sequential compiles.
|
|
67
|
+
*/
|
|
68
|
+
compileStaged(request: ContentRequest, signal: AbortSignal, descriptor?: ContentDescriptor): Promise<{
|
|
69
|
+
finish: Promise<ServiceResult<ContentIR>>;
|
|
70
|
+
}>;
|
|
71
|
+
private compileContent;
|
|
72
|
+
private descriptorFields;
|
|
73
|
+
private validateProvenance;
|
|
74
|
+
private matchesDescriptor;
|
|
75
|
+
private matchesCompiledDependencies;
|
|
76
|
+
private guideTab;
|
|
77
|
+
private apiTab;
|
|
78
|
+
private demoAssets;
|
|
79
|
+
private header;
|
|
80
|
+
/** Processes one document (`./html-pipeline`) and reports what failed. */
|
|
81
|
+
private process;
|
|
82
|
+
/**
|
|
83
|
+
* Dispatches a render task to the back (or runs it here), then tells the caller of
|
|
84
|
+
* `compileStaged` that the front is done: everything after the pipeline is pure.
|
|
85
|
+
*/
|
|
86
|
+
private render;
|
|
87
|
+
/** A document's diagnostics, in the order the pipeline met them, and its HTML when it succeeded. */
|
|
88
|
+
private processed;
|
|
89
|
+
private ir;
|
|
90
|
+
/**
|
|
91
|
+
* `consulted`, when given, receives every keyword key the link pass looked up. The linked
|
|
92
|
+
* HTML is a function of the IR HTML and the bindings of exactly those keys: each lookup is
|
|
93
|
+
* made before any branch on its result.
|
|
94
|
+
*
|
|
95
|
+
* `prepared`, when given, is this request's back half dispatched earlier (`prepareLink`).
|
|
96
|
+
*/
|
|
97
|
+
link(request: {
|
|
98
|
+
ir: ContentIR;
|
|
99
|
+
keywords: KeywordExport[];
|
|
100
|
+
breadcrumbs: string[];
|
|
101
|
+
pageType: 'guide' | 'api';
|
|
102
|
+
}, signal: AbortSignal, consulted?: Set<string>, prepared?: PreparedLink): Promise<ServiceResult<LinkedContent>>;
|
|
103
|
+
/**
|
|
104
|
+
* Dispatches the back half of a link before its turn. Linking is a pure function of the IR and
|
|
105
|
+
* the keyword set, so the result `link` makes of it is the one it would make of linking then.
|
|
106
|
+
*/
|
|
107
|
+
prepareLink(request: Parameters<GeneratorContentCompiler['link']>[0], signal: AbortSignal): PreparedLink;
|
|
108
|
+
private linkBack;
|
|
109
|
+
private linkContent;
|
|
110
|
+
private actions;
|
|
111
|
+
private anchorKeywords;
|
|
112
|
+
/** A per-document renderer copied from the legacy Markdown contract without Marked.use globals. */
|
|
113
|
+
private markdownToHtml;
|
|
114
|
+
private stopIfAborted;
|
|
115
|
+
private readPhysicalFile;
|
|
116
|
+
/** `NGDOC_PARALLEL_RENDER=verify`: a thread result differed; the main thread's is used. */
|
|
117
|
+
private parallelMismatch;
|
|
118
|
+
private diag;
|
|
119
|
+
}
|
|
120
|
+
export declare function keywordBindings(keywords: KeywordExport[]): ReadonlyMap<string, KeywordExport>;
|
|
121
|
+
/** The `keywordDigest` of linked content: the bindings of the IR's used keywords. */
|
|
122
|
+
export declare function linkedKeywordDigest(ir: ContentIR, keywords: KeywordExport[]): string;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Options } from 'prettier';
|
|
2
|
+
import type { CompilationRequest, GeneratorConfiguration } from '../contracts.js';
|
|
3
|
+
/**
|
|
4
|
+
* The cache of formatted code: API signatures and demo snippets that `formatCode` formats with
|
|
5
|
+
* Prettier (`helpers/format-code.ts`), the main thread's largest cost after highlighting at a
|
|
6
|
+
* cold start. Each call resolved the Prettier configuration again and formatted through
|
|
7
|
+
* `@prettier/sync`'s worker.
|
|
8
|
+
*
|
|
9
|
+
* - **Configuration.** One generation resolves the configuration of a directory once. The files
|
|
10
|
+
* it reads (`.prettierrc*`, `prettier.config.*`, `.editorconfig`, `package.json` in the workspace
|
|
11
|
+
* root and every directory above it) are already program inputs of every page that formats
|
|
12
|
+
* (`trackFormatterConfiguration`), so an edit of one runs a new generation, which resolves
|
|
13
|
+
* again.
|
|
14
|
+
* - **Formatted code.** Formatting is a pure function of the code, the parser, the resolved
|
|
15
|
+
* configuration and the Prettier release, so its result is cached under
|
|
16
|
+
* `digestOf({ context, parser, config, code })`: the context is this cache's format and the
|
|
17
|
+
* resolved versions of `prettier` and `@prettier/sync`, and `config` the resolved configuration
|
|
18
|
+
* with the versions of the plugins it names. A configuration that cannot be identified exactly
|
|
19
|
+
* (a value JSON cannot hold, a plugin given as a path or that does not resolve to a package) is
|
|
20
|
+
* never cached: such code is formatted every time. Code Prettier rejects with a syntax error
|
|
21
|
+
* (signatures such as a bare `constructor(…): T;` always are) is cached as such and throws
|
|
22
|
+
* again, so `formatCode` returns it unformatted as before; any other error stores nothing.
|
|
23
|
+
* - **Storage.** One map per runtime, kept across generations by a long-lived runtime and
|
|
24
|
+
* cleared when it outgrows {@link FORMAT_CACHE_LIMIT}. Development generations with the artifact
|
|
25
|
+
* cache read `<hash(projectId)>.format.json` beside it once per runtime and context, and write it
|
|
26
|
+
* after the cache (best effort, atomic, skipped when unchanged), like the highlight cache.
|
|
27
|
+
* Production, `cache: false` and the reference path never read or write the pack.
|
|
28
|
+
*
|
|
29
|
+
* No dependency or watch input is added: the result depends only on the key, and the
|
|
30
|
+
* configuration's own files are recorded where the program is built.
|
|
31
|
+
*
|
|
32
|
+
* `NGDOC_FORMAT_CACHE=0` (`CompilationOptions.formatCache: false`) formats every call as before;
|
|
33
|
+
* `verify` resolves the configuration and formats every hit again, uses the fresh result and
|
|
34
|
+
* reports `CONTENT_FORMAT_CACHE_MISMATCH` when one differs. The semantic service formats through
|
|
35
|
+
* the session the compiler installs for the generation (`semantic/formatting.ts`).
|
|
36
|
+
*/
|
|
37
|
+
/** The warning of a `verify` hit (or configuration) that differs from the cached one. */
|
|
38
|
+
export declare const FORMAT_CACHE_MISMATCH = "CONTENT_FORMAT_CACHE_MISMATCH";
|
|
39
|
+
/**
|
|
40
|
+
* Above this size (keys and values, in UTF-16 code units) the pack and the map keep only the
|
|
41
|
+
* entries of the current generation.
|
|
42
|
+
*/
|
|
43
|
+
export declare const FORMAT_CACHE_LIMIT: number;
|
|
44
|
+
/**
|
|
45
|
+
* The cache's switch: `off`, `on` or `verify`.
|
|
46
|
+
* @param options
|
|
47
|
+
* @param options.formatCache
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatCacheSwitch(options: {
|
|
50
|
+
formatCache?: boolean | 'verify';
|
|
51
|
+
}): 'off' | 'on' | 'verify';
|
|
52
|
+
/**
|
|
53
|
+
* The cache of one generation, or undefined when code is formatted without it: with the switch
|
|
54
|
+
* off, and on the reference path (`incrementalReuse: false`), which recomputes everything. Only
|
|
55
|
+
* a development generation with the artifact cache on keeps a pack.
|
|
56
|
+
* @param options
|
|
57
|
+
* @param options.projectId
|
|
58
|
+
* @param options.incrementalReuse
|
|
59
|
+
* @param options.formatCache
|
|
60
|
+
* @param request
|
|
61
|
+
* @param configuration
|
|
62
|
+
*/
|
|
63
|
+
export declare function createFormatSession(options: {
|
|
64
|
+
projectId: string;
|
|
65
|
+
incrementalReuse?: boolean;
|
|
66
|
+
formatCache?: boolean | 'verify';
|
|
67
|
+
}, request: Pick<CompilationRequest, 'mode'>, configuration: Pick<GeneratorConfiguration, 'cacheEnabled' | 'cacheRoot'>): FormatSession | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* One generation's use of the cache: its resolved configurations, the keys it used, its pack. It
|
|
70
|
+
* is a `FormatCodeCache` (`helpers/format-cache.ts`), structurally: the published declarations
|
|
71
|
+
* reach this class, and they cannot import from outside the generator.
|
|
72
|
+
*/
|
|
73
|
+
export declare class FormatSession {
|
|
74
|
+
readonly verify: boolean;
|
|
75
|
+
readonly pack: string | undefined;
|
|
76
|
+
readonly context: string;
|
|
77
|
+
/** The keys this generation hit or formatted. */
|
|
78
|
+
private readonly used;
|
|
79
|
+
/** The resolved configuration per directory (`''` for the process's working directory). */
|
|
80
|
+
private readonly configs;
|
|
81
|
+
/** Each resolved configuration's identity in the keys; undefined: not cacheable. */
|
|
82
|
+
private readonly identities;
|
|
83
|
+
private loaded;
|
|
84
|
+
/** An entry was replaced (a `verify` repair): the pack must be written. */
|
|
85
|
+
private replaced;
|
|
86
|
+
private mismatchCount;
|
|
87
|
+
constructor(verify: boolean, pack: string | undefined);
|
|
88
|
+
/** How many `verify` hits and configurations differed from the cached ones. */
|
|
89
|
+
get mismatches(): number;
|
|
90
|
+
config(configDirectory: string | undefined, resolve: () => Options | null): Options | null;
|
|
91
|
+
format(input: {
|
|
92
|
+
code: string;
|
|
93
|
+
parser: string;
|
|
94
|
+
config: Options | null;
|
|
95
|
+
}, format: () => string): string;
|
|
96
|
+
/**
|
|
97
|
+
* Writes the pack after the artifact cache: the entries this generation hit or formatted, plus
|
|
98
|
+
* those the pack held before unless the generation rendered every content (`complete`), or the
|
|
99
|
+
* result would exceed {@link FORMAT_CACHE_LIMIT}. Best effort.
|
|
100
|
+
* @param complete
|
|
101
|
+
*/
|
|
102
|
+
save(complete: boolean): Promise<void>;
|
|
103
|
+
private remember;
|
|
104
|
+
/** Reads the pack once per runtime and context; an unusable pack is not read. */
|
|
105
|
+
private load;
|
|
106
|
+
}
|
|
107
|
+
/** Forgets every entry and pack of this runtime (tests). */
|
|
108
|
+
export declare function resetFormatCache(): void;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { CompilationRequest, GeneratorConfiguration, ShikiLanguage } from '../contracts.js';
|
|
2
|
+
/** The warning of a `verify` hit whose highlighting differs from the cached one. */
|
|
3
|
+
export declare const HIGHLIGHT_CACHE_MISMATCH = "CONTENT_HIGHLIGHT_CACHE_MISMATCH";
|
|
4
|
+
/**
|
|
5
|
+
* Above this size (keys and values, in UTF-16 code units) the pack and the map keep only the
|
|
6
|
+
* entries of the current generation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const HIGHLIGHT_CACHE_LIMIT: number;
|
|
9
|
+
/** The `@ng-doc/utils` block a key is computed from (`NgDocHighlightBlock`). */
|
|
10
|
+
export interface HighlightBlock {
|
|
11
|
+
readonly options: Readonly<Record<string, string | number | boolean>>;
|
|
12
|
+
readonly themes: {
|
|
13
|
+
readonly light: string;
|
|
14
|
+
readonly dark: string;
|
|
15
|
+
};
|
|
16
|
+
readonly languages?: string;
|
|
17
|
+
readonly lang: string;
|
|
18
|
+
readonly meta: string;
|
|
19
|
+
readonly code: string;
|
|
20
|
+
}
|
|
21
|
+
/** The cache one `processHtml` call uses (`NgDocHighlightCache`), with the mismatches it saw. */
|
|
22
|
+
export interface HighlightCall {
|
|
23
|
+
key(block: HighlightBlock): string;
|
|
24
|
+
get(key: string): string | undefined;
|
|
25
|
+
set(key: string, value: string): void;
|
|
26
|
+
loads(themes: HighlightBlock['themes']): boolean;
|
|
27
|
+
readonly verify: boolean;
|
|
28
|
+
mismatch(key: string): void;
|
|
29
|
+
/** The keys of the `verify` hits that differed, in the order the call met them. */
|
|
30
|
+
readonly mismatches: readonly string[];
|
|
31
|
+
}
|
|
32
|
+
/** The writes into this runtime's entries since they were last cleared, and the clear count. */
|
|
33
|
+
export declare function highlightJournal(): {
|
|
34
|
+
epoch: number;
|
|
35
|
+
entries: ReadonlyArray<[string, string]>;
|
|
36
|
+
};
|
|
37
|
+
/** The cache's switch: `off`, `on` or `verify`. */
|
|
38
|
+
export declare function highlightCacheSwitch(options: {
|
|
39
|
+
highlightCache?: boolean | 'verify';
|
|
40
|
+
}): 'off' | 'on' | 'verify';
|
|
41
|
+
/**
|
|
42
|
+
* Which Shiki grammars highlighting loads: only those code blocks reach (`used`, the default), or
|
|
43
|
+
* every bundled grammar (`all`: `usedGrammars: false` or `NGDOC_USED_GRAMMARS=0`). The HTML is the
|
|
44
|
+
* same, so neither the cache keys nor any digest depend on it.
|
|
45
|
+
*/
|
|
46
|
+
export declare function grammarsSwitch(options: {
|
|
47
|
+
usedGrammars?: boolean;
|
|
48
|
+
}): 'used' | 'all';
|
|
49
|
+
/**
|
|
50
|
+
* The cache of one generation, or undefined when blocks are highlighted without it: with the
|
|
51
|
+
* switch off, and on the reference path (`incrementalReuse: false`), which recomputes everything.
|
|
52
|
+
* Only a development generation with the artifact cache on keeps a pack.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createHighlightSession(options: {
|
|
55
|
+
projectId: string;
|
|
56
|
+
incrementalReuse?: boolean;
|
|
57
|
+
highlightCache?: boolean | 'verify';
|
|
58
|
+
}, request: Pick<CompilationRequest, 'mode'>, configuration: Pick<GeneratorConfiguration, 'cacheEnabled' | 'cacheRoot' | 'themes' | 'shikiLangs'>): HighlightSession | undefined;
|
|
59
|
+
/** One generation's use of the cache: what it hit or highlighted, and its pack. */
|
|
60
|
+
export declare class HighlightSession {
|
|
61
|
+
readonly themes: {
|
|
62
|
+
readonly light: string;
|
|
63
|
+
readonly dark: string;
|
|
64
|
+
};
|
|
65
|
+
readonly verify: boolean;
|
|
66
|
+
readonly pack: string | undefined;
|
|
67
|
+
/** The keys this generation hit or highlighted. */
|
|
68
|
+
private readonly used;
|
|
69
|
+
readonly context: string;
|
|
70
|
+
private loaded;
|
|
71
|
+
/** An entry was replaced (a corrupt one, or a `verify` repair): the pack must be written. */
|
|
72
|
+
private replaced;
|
|
73
|
+
constructor(themes: {
|
|
74
|
+
readonly light: string;
|
|
75
|
+
readonly dark: string;
|
|
76
|
+
}, verify: boolean, pack: string | undefined, langs?: readonly ShikiLanguage[]);
|
|
77
|
+
/** The cache of one `processHtml` call. */
|
|
78
|
+
call(): HighlightCall;
|
|
79
|
+
/**
|
|
80
|
+
* What a render thread needs to use this cache: the context its keys are made in, whether hits
|
|
81
|
+
* are checked again, and whether the themes are known to load. Reads the pack first, so the
|
|
82
|
+
* journal holds its entries.
|
|
83
|
+
*/
|
|
84
|
+
prepare(): {
|
|
85
|
+
context: string;
|
|
86
|
+
verify: boolean;
|
|
87
|
+
proven: boolean;
|
|
88
|
+
};
|
|
89
|
+
/** The entry this runtime holds for `key`, without counting it as used. */
|
|
90
|
+
peek(key: string): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Takes in what one document's highlighting recorded out of plan order (a render thread, or the
|
|
93
|
+
* main thread rendering ahead), as if this thread had processed it now, in plan order: a fresh
|
|
94
|
+
* value equal to the known one is a hit (another task highlighted the block first), any other
|
|
95
|
+
* replaces it; and a `verify` difference counts only while the known entry is still not the
|
|
96
|
+
* fresh value (an earlier document in plan order repaired it, as a sequential render would).
|
|
97
|
+
* Returns the differences this document reports.
|
|
98
|
+
*/
|
|
99
|
+
merge(record: {
|
|
100
|
+
used: readonly string[];
|
|
101
|
+
fresh: ReadonlyArray<readonly [string, string]>;
|
|
102
|
+
mismatched: readonly string[];
|
|
103
|
+
}): number;
|
|
104
|
+
/** Reads the pack once per runtime and context; an unusable pack is not read. */
|
|
105
|
+
private load;
|
|
106
|
+
/**
|
|
107
|
+
* Writes the pack after the artifact cache: the entries this generation hit or highlighted, plus
|
|
108
|
+
* those the pack held before unless the generation rendered every content (`complete`), or the
|
|
109
|
+
* result would exceed {@link HIGHLIGHT_CACHE_LIMIT}. Best effort: a pack that is not written
|
|
110
|
+
* only makes a later generation highlight again.
|
|
111
|
+
*/
|
|
112
|
+
save(complete: boolean): Promise<void>;
|
|
113
|
+
}
|
|
114
|
+
/** Forgets every entry, pack and proven context of this runtime (tests). */
|
|
115
|
+
export declare function resetHighlightCache(): void;
|