@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,196 @@
|
|
|
1
|
+
import type { ClassDeclaration, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, Project, ts, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
|
|
2
|
+
import type { ApiScopeDescriptor, DeclarationDescriptor, Dependency, DiscoverySnapshot, EntryDescriptor, RetainedSemanticState, SemanticRetentionRequest } from '../contracts.js';
|
|
3
|
+
import type { DirectoryListings, ObservationStamps } from '../graph/index.js';
|
|
4
|
+
import { type TrackedFiles } from './dependencies.js';
|
|
5
|
+
import type { OwnedRoots } from './owned-roots.js';
|
|
6
|
+
import type { ProgramObservations } from './program-observations.js';
|
|
7
|
+
import type { ClosureStore } from './semantic-closure.js';
|
|
8
|
+
/**
|
|
9
|
+
* The typed program state of the semantic service.
|
|
10
|
+
*
|
|
11
|
+
* - {@link Snapshot}: the state one synchronization publishes to its queries.
|
|
12
|
+
* - {@link ProgramMirror}: the mutable description of a retained Project, shared by every retained
|
|
13
|
+
* state made from it (the committed and the working entry of the retention slot).
|
|
14
|
+
* - {@link RetainedProgram}: the concrete retained program behind the opaque
|
|
15
|
+
* {@link RetainedSemanticState}. Its published observations, semantic definition and stat stamps
|
|
16
|
+
* are read from the mirror, never copied.
|
|
17
|
+
*/
|
|
18
|
+
/** The aggregate `semantic` definition of one synchronized program. */
|
|
19
|
+
export type SemanticDefinition = Extract<Dependency, {
|
|
20
|
+
kind: 'semantic';
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* The declaration kinds an API page documents: the same union as the legacy
|
|
24
|
+
* `NgDocSupportedDeclaration` (`libs/builder/types`), spelled here so the generator's emitted
|
|
25
|
+
* declarations never reference a module outside the generator.
|
|
26
|
+
*/
|
|
27
|
+
export type SupportedDeclaration = ClassDeclaration | InterfaceDeclaration | EnumDeclaration | FunctionDeclaration | VariableDeclaration | TypeAliasDeclaration;
|
|
28
|
+
export interface DeclarationState {
|
|
29
|
+
node: SupportedDeclaration;
|
|
30
|
+
descriptor: DeclarationDescriptor;
|
|
31
|
+
scope: ApiScopeDescriptor;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The program state of one successful synchronization, handed from one semantic service to the
|
|
35
|
+
* next development generation's service. Opaque to callers (the contract's
|
|
36
|
+
* `RetainedSemanticState`). It holds the TypeScript Project and the generator's own observations
|
|
37
|
+
* only; no evaluated user module.
|
|
38
|
+
*/
|
|
39
|
+
export type { RetainedSemanticState };
|
|
40
|
+
/**
|
|
41
|
+
* What a retained program is re-verified against beyond its published observations (`files`):
|
|
42
|
+
* - `stamps`: stat stamps of every content observation (published and private);
|
|
43
|
+
* - `hidden`, `missingDirectories` and `realpaths`: private observations that are not part of the
|
|
44
|
+
* published dependency set, the semantic digest or any revision (so cold and incremental
|
|
45
|
+
* results, and the session's watch inputs, stay exactly as before): the file probes and reads of
|
|
46
|
+
* the `types` directives (explicit and automatic), the directories module resolution found
|
|
47
|
+
* missing (TypeScript probes no file inside a missing directory, so nothing else records an
|
|
48
|
+
* install into it), and the symlinked paths resolution went through;
|
|
49
|
+
* - `listings`: the listing of every effective type root (automatic type directives enumerate its
|
|
50
|
+
* packages) and of the directories on the way to each observed glob's members.
|
|
51
|
+
*/
|
|
52
|
+
export interface ProgramWatch {
|
|
53
|
+
stamps: ObservationStamps;
|
|
54
|
+
hidden: TrackedFiles;
|
|
55
|
+
/**
|
|
56
|
+
* Directories module resolution was told do not exist (`directoryExists` false; the path may
|
|
57
|
+
* be a file, which is not a directory). Verified with the same predicate, never by existence.
|
|
58
|
+
*/
|
|
59
|
+
missingDirectories: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Symlinked paths resolution went through, with the real path it got: a retarget
|
|
62
|
+
* between byte-identical files is otherwise invisible, because program files are observed under
|
|
63
|
+
* their real paths and the old target still exists unchanged.
|
|
64
|
+
*/
|
|
65
|
+
realpaths: Array<[string, string]>;
|
|
66
|
+
listings: DirectoryListings;
|
|
67
|
+
}
|
|
68
|
+
/** Resolution facts a tracking host collects privately (see {@link ProgramWatch}). */
|
|
69
|
+
export interface ResolutionProbes {
|
|
70
|
+
missing: Set<string>;
|
|
71
|
+
realpaths: Map<string, string>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The mutable state of one retained Project, shared by reference by every {@link RetainedProgram}
|
|
75
|
+
* made from it: a reused or patched program's next retained state carries the same mirror, a FULL
|
|
76
|
+
* synchronization makes a new one. It always describes the Project as it is, not the base a
|
|
77
|
+
* retained entry names: a patch re-tracks and re-stamps what it applied.
|
|
78
|
+
*/
|
|
79
|
+
export interface ProgramMirror {
|
|
80
|
+
/**
|
|
81
|
+
* Paths patched into the Project that no successful synchronization has confirmed yet, with the
|
|
82
|
+
* digest of the bytes applied. Written before the Project is changed and cleared when a patched
|
|
83
|
+
* synchronization succeeds (the Project then equals its candidate's tree). It stays set only
|
|
84
|
+
* behind a failed patch, whose Project is handed back for its old base: the next synchronization
|
|
85
|
+
* of that Project re-reads and re-checks these paths and never reuses it as it is.
|
|
86
|
+
*/
|
|
87
|
+
readonly appliedSinceBase: Map<string, string>;
|
|
88
|
+
/** Per-importer and global observations of the Project; the published set is their aggregate. */
|
|
89
|
+
readonly observations: ProgramObservations;
|
|
90
|
+
/** The re-verification state; a patch re-stamps the files it applied. */
|
|
91
|
+
readonly watch: ProgramWatch;
|
|
92
|
+
/**
|
|
93
|
+
* The root names of the program the FULL synchronization built. ts-morph re-creates a changed
|
|
94
|
+
* program from every file in its cache, which after `resolveSourceFileDependencies` holds the
|
|
95
|
+
* resolved dependencies too: a patch passes these roots instead, so the patched program keeps
|
|
96
|
+
* the cold file set and order (and TypeScript can reuse its structure). A root change
|
|
97
|
+
* (`restructureProgram`) replaces them with the root names a FULL synchronization of the new root
|
|
98
|
+
* membership has.
|
|
99
|
+
*/
|
|
100
|
+
roots: readonly string[];
|
|
101
|
+
/** Bumped by every patch applied to the Project. */
|
|
102
|
+
version: number;
|
|
103
|
+
}
|
|
104
|
+
/** A new mirror for a program synchronized for retention. */
|
|
105
|
+
export declare function createProgramMirror(observations: ProgramObservations, watch: ProgramWatch, roots: readonly string[]): ProgramMirror;
|
|
106
|
+
/** The state one synchronization publishes to the queries of its generation. */
|
|
107
|
+
export interface Snapshot {
|
|
108
|
+
project: Project;
|
|
109
|
+
discovery: DiscoverySnapshot;
|
|
110
|
+
/** The program's observations; `observations.files` is the published dependency set. */
|
|
111
|
+
observations: ProgramObservations;
|
|
112
|
+
declarations: Map<string, DeclarationState>;
|
|
113
|
+
scopes: Map<string, string[]>;
|
|
114
|
+
owned: OwnedRoots;
|
|
115
|
+
/** Present only for a synchronization made to be retained. */
|
|
116
|
+
retention?: {
|
|
117
|
+
key: string;
|
|
118
|
+
mirror: ProgramMirror;
|
|
119
|
+
};
|
|
120
|
+
/** Set when a query added source files to the Project; such a Project is never retained. */
|
|
121
|
+
mutated?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* The whole-program dependencies of `program`, tracked once for this synchronization and added
|
|
124
|
+
* to every query that depends on the whole program (`fragments.ts`, `trackWholeProgram`).
|
|
125
|
+
*/
|
|
126
|
+
tracked?: {
|
|
127
|
+
program: ts.Program;
|
|
128
|
+
dependencies: readonly Dependency[];
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/** The entry of the snapshot's discovery with this id. */
|
|
132
|
+
export declare function entryOf(state: Snapshot, id: string): EntryDescriptor;
|
|
133
|
+
interface RetainedProgramFields {
|
|
134
|
+
key: string;
|
|
135
|
+
project: Project;
|
|
136
|
+
scopes: Map<string, string[]>;
|
|
137
|
+
owned: OwnedRoots;
|
|
138
|
+
mirror: ProgramMirror;
|
|
139
|
+
closures?: ClosureStore;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The concrete retained program behind the opaque {@link RetainedSemanticState}: a class, so a
|
|
143
|
+
* state handed back to `synchronize` is checked with `instanceof` instead of being cast. A state
|
|
144
|
+
* this module did not make is never reused.
|
|
145
|
+
*/
|
|
146
|
+
export declare class RetainedProgram implements RetainedSemanticState {
|
|
147
|
+
readonly retained = true;
|
|
148
|
+
readonly key: string;
|
|
149
|
+
readonly project: Project;
|
|
150
|
+
readonly scopes: Map<string, string[]>;
|
|
151
|
+
readonly owned: OwnedRoots;
|
|
152
|
+
readonly mirror: ProgramMirror;
|
|
153
|
+
/**
|
|
154
|
+
* The closure records of the generation that retained this program, by digest. They describe
|
|
155
|
+
* digests, not this Project, so the next generation uses them whether it reuses the program or
|
|
156
|
+
* synchronizes a new one.
|
|
157
|
+
*/
|
|
158
|
+
readonly closures?: ClosureStore;
|
|
159
|
+
constructor(fields: RetainedProgramFields);
|
|
160
|
+
/** The published observations (derived from the mirror on read). */
|
|
161
|
+
get files(): TrackedFiles;
|
|
162
|
+
/** The re-verification state (derived from the mirror on read). */
|
|
163
|
+
get watch(): ProgramWatch;
|
|
164
|
+
}
|
|
165
|
+
/** The sweep counters of a synchronization that kept its retained Project. */
|
|
166
|
+
export interface SweepCounters {
|
|
167
|
+
stamped: number;
|
|
168
|
+
rehashed: number;
|
|
169
|
+
probed: number;
|
|
170
|
+
/** Directory listings verified by stat alone / read again. */
|
|
171
|
+
listed: number;
|
|
172
|
+
relisted: number;
|
|
173
|
+
}
|
|
174
|
+
/** How the last `synchronize` obtained its Project (instrumentation and tests). */
|
|
175
|
+
export type SynchronizationPath = ({
|
|
176
|
+
path: 'reused';
|
|
177
|
+
} & SweepCounters)
|
|
178
|
+
/**
|
|
179
|
+
* The retained Project with the content of `files` applied to it. `failed`: the patched program
|
|
180
|
+
* failed the cold synchronization's syntax check; the Project is handed back as it is.
|
|
181
|
+
*/
|
|
182
|
+
| ({
|
|
183
|
+
path: 'patched';
|
|
184
|
+
files: string[];
|
|
185
|
+
failed?: true;
|
|
186
|
+
} & SweepCounters) | {
|
|
187
|
+
path: 'full';
|
|
188
|
+
reason: string;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Retention request of a development generation: build the Project so it can be retained and,
|
|
192
|
+
* when `previous` is given, reuse it instead of rebuilding if the request's changes and a stat
|
|
193
|
+
* sweep prove every observation of that program still holds. `previous` is consumed: removed from
|
|
194
|
+
* this object when the program is not kept.
|
|
195
|
+
*/
|
|
196
|
+
export type SemanticRetention = SemanticRetentionRequest;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Project } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
* The semantic facts of a program that `NGDOC_INCREMENTAL_PROGRAM=verify` compares between a
|
|
4
|
+
* patched program and a cold synchronization of the same tree, beyond the observations, root names
|
|
5
|
+
* and texts: what the queries read through the checker, which a stale cache on an object a patched
|
|
6
|
+
* program reused (a symbol of an unchanged file) would change.
|
|
7
|
+
*
|
|
8
|
+
* For every workspace file of the program (not a default library, not under `node_modules`), in
|
|
9
|
+
* program order:
|
|
10
|
+
* - the program index facts: `token`, `exportSurface`, `typeClosure`, `dtsShape` and
|
|
11
|
+
* `shapeClosure` (and `env` once);
|
|
12
|
+
* - the documentation TypeScript gives every export and every member of it (inherited
|
|
13
|
+
* documentation included), with its tags;
|
|
14
|
+
* - the derived-class list of every top-level class, as the API template renders it.
|
|
15
|
+
*
|
|
16
|
+
* A fresh index is built for each program (never the shared one of `programIndex`, whose
|
|
17
|
+
* observations digest the closures of the generation use). Everything runs with recording
|
|
18
|
+
* suspended.
|
|
19
|
+
*/
|
|
20
|
+
export declare function programFacts(project: Project): Array<[string, string]>;
|
|
21
|
+
/** The first fact whose name or value differs, or undefined when the two lists are equal. */
|
|
22
|
+
export declare function firstFactDifference(left: ReadonlyArray<readonly [string, string]>, right: ReadonlyArray<readonly [string, string]>): string | undefined;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Project } from 'ts-morph';
|
|
2
|
+
import { type Footprint, type FootprintScopeKind, type RecorderMode, FootprintScope } from '../kernel/footprint.js';
|
|
3
|
+
/** Runs `build` with recording suspended (shared indexes). */
|
|
4
|
+
export declare function suspendRecording<T>(build: () => T): T;
|
|
5
|
+
/**
|
|
6
|
+
* Runs `query`, the derived-class list of the class `identity` (`path#start`), recording only the
|
|
7
|
+
* identity into the current scope. The list depends on heritage clauses anywhere in the program,
|
|
8
|
+
* and the scope's semantic closure recomputes it (`derived`), so the query itself runs with
|
|
9
|
+
* recording suspended: the reference searches it makes would record whatever TypeScript resolves
|
|
10
|
+
* for the first time, which depends on what ran before, not on this scope.
|
|
11
|
+
*/
|
|
12
|
+
export declare function recordDerivedQuery<T>(identity: string, query: () => T): T;
|
|
13
|
+
/** Channel 3: an explicit source-file lookup by path. */
|
|
14
|
+
export declare function recordLookup(path: string): void;
|
|
15
|
+
export interface RecordedAnswer<T> {
|
|
16
|
+
readonly value: T;
|
|
17
|
+
readonly footprint: Footprint;
|
|
18
|
+
/** Verify-mode gaps found while computing the answer; replayed on every use. */
|
|
19
|
+
readonly gaps: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A per-answer cache entry that replays what computing it recorded. The key is an identity
|
|
23
|
+
* (`path#name`, position), never a ts-morph node. The answer is always computed inside a capture
|
|
24
|
+
* scope, even when the caller's recording is suspended, so a hit never under-records.
|
|
25
|
+
*/
|
|
26
|
+
export declare function recordedAnswer<T>(cache: Map<string, RecordedAnswer<T>>, key: string, compute: () => T): T;
|
|
27
|
+
export declare const SYMBOL_DOC_METHODS: readonly ["getDocumentationComment", "getContextualDocumentationComment", "getJsDocTags", "getContextualJsDocTags"];
|
|
28
|
+
export declare const SIGNATURE_DOC_METHODS: readonly ["getDocumentationComment", "getJsDocTags"];
|
|
29
|
+
/** The factory methods every wrapper is created or fetched through (ts-morph 28.0.0). */
|
|
30
|
+
export declare const NODE_FACTORY_METHODS: readonly ["getNodeFromCompilerNode", "getSourceFile", "getSourceFileForNode"];
|
|
31
|
+
export declare const VERIFIED_NODE_READS: readonly ["getJsDocs", "getText", "getFullText", "getStructure"];
|
|
32
|
+
export interface RecorderCompatibility {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
/** Why recording is off when `ok` is false. */
|
|
35
|
+
reason?: string;
|
|
36
|
+
typescript: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The pinned-version probe, run once per process on a two-file in-memory project: TypeScript's
|
|
40
|
+
* `TypeObject`/`SymbolObject` methods reach the wrapped checker, ts-morph wrappers come through all
|
|
41
|
+
* three factory methods, and `findReferences` reaches the wrapped language service. Any failure
|
|
42
|
+
* turns recording off.
|
|
43
|
+
*/
|
|
44
|
+
export declare function recorderCompatibility(): RecorderCompatibility;
|
|
45
|
+
/** Test hook: forget the cached probe result. */
|
|
46
|
+
export declare function resetRecorderCompatibility(): void;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
export declare function probeRecorder(): RecorderCompatibility;
|
|
51
|
+
/** One open scope of a semantic query. */
|
|
52
|
+
export declare class RecordingScope {
|
|
53
|
+
readonly scope: FootprintScope;
|
|
54
|
+
private open;
|
|
55
|
+
constructor(scope: FootprintScope);
|
|
56
|
+
/** The files-channel observer handed to the query's `TrackedFiles`. */
|
|
57
|
+
readonly observe: (dependency: Parameters<FootprintScope["observe"]>[0]) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Closes the scope. In verify mode a recorder gap (a node read outside the footprint, or a
|
|
60
|
+
* failure while recording) throws `SEMANTIC_RECORDER_GAP`; outside verify mode nothing throws.
|
|
61
|
+
*/
|
|
62
|
+
close(assert?: boolean): Footprint;
|
|
63
|
+
/** Removes the scope from the stack if it is still open. */
|
|
64
|
+
dispose(): void;
|
|
65
|
+
}
|
|
66
|
+
/** A semantic service's recorder: its mode, and hook installation on each Project it queries. */
|
|
67
|
+
export declare class SemanticRecorder {
|
|
68
|
+
readonly mode: RecorderMode;
|
|
69
|
+
/**
|
|
70
|
+
* Why recording is off although the mode asks for it (the probe or an install failed). Once set
|
|
71
|
+
* it is never cleared: this recorder then opens no scope again.
|
|
72
|
+
*/
|
|
73
|
+
unavailable?: string;
|
|
74
|
+
constructor(mode: RecorderMode);
|
|
75
|
+
/**
|
|
76
|
+
* Installs the channels on the project's current program (idempotent; a re-created program gets
|
|
77
|
+
* its checker wrapped here) and returns whether recording is available.
|
|
78
|
+
*/
|
|
79
|
+
ensure(project: Project): boolean;
|
|
80
|
+
/** Opens a scope for one phase call, or undefined when recording is off or unavailable. */
|
|
81
|
+
open(kind: FootprintScopeKind, key: string, project: Project | undefined): RecordingScope | undefined;
|
|
82
|
+
}
|
|
83
|
+
/** Test and diagnostics hook: the number of open scopes (0 between queries). */
|
|
84
|
+
export declare function openRecordingScopes(): number;
|
|
85
|
+
/**
|
|
86
|
+
* Closes every scope and ends every suspension. For use between queries only, after a query was
|
|
87
|
+
* terminated (V8's `vm` watchdog runs no `finally` block, so its scopes were never closed).
|
|
88
|
+
*/
|
|
89
|
+
export declare function resetRecording(): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type JSDocableNode, Node } from 'ts-morph';
|
|
2
|
+
import type { TrackedFiles } from './dependencies.js';
|
|
3
|
+
export type MarkdownRenderer = (markdown: string, context: {
|
|
4
|
+
source: string;
|
|
5
|
+
read(path: string): string;
|
|
6
|
+
}) => string;
|
|
7
|
+
/** Standalone parity default; a caller may inject another renderer (the `markdown` option). */
|
|
8
|
+
export declare const renderMarkdown: MarkdownRenderer;
|
|
9
|
+
/** Same TSDoc excerpt/status traversal as the legacy Formatter, with an explicit renderer. */
|
|
10
|
+
export declare function createJsDoc(markdown: (text: string) => string): {
|
|
11
|
+
getJsDocDescription: (node?: JSDocableNode) => string;
|
|
12
|
+
getJsDocTags: (node: JSDocableNode | undefined, name: string) => string[];
|
|
13
|
+
getJsDocTag: (node: JSDocableNode | undefined, name: string) => string;
|
|
14
|
+
hasJsDocTag: (node: JSDocableNode | undefined, name: string) => boolean;
|
|
15
|
+
getAllJsDocTags: (node?: JSDocableNode) => Record<string, string[]>;
|
|
16
|
+
getJsDocParam: (node: JSDocableNode | undefined, name: string) => string;
|
|
17
|
+
};
|
|
18
|
+
export type JsDoc = ReturnType<typeof createJsDoc>;
|
|
19
|
+
/** The Angular signal function that declares a member, as the symbol view's members table shows it. */
|
|
20
|
+
export interface SignalMember {
|
|
21
|
+
/** `input`, `model` or `output`. */
|
|
22
|
+
kind: 'input' | 'model' | 'output';
|
|
23
|
+
/** Whether it is `input.required()` or `model.required()`. */
|
|
24
|
+
required: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Tells a signal input, model or output from its initializer (`input()`, `input.required()`,
|
|
28
|
+
* `model()`, `model.required()`, `output()`, `outputFromObservable()`), so the members table
|
|
29
|
+
* shows it as an input or output the way it shows `@Input()` and `@Output()`. It reads only the
|
|
30
|
+
* member's own syntax.
|
|
31
|
+
* @param node - A class member.
|
|
32
|
+
*/
|
|
33
|
+
export declare function signalMember(node: Node): SignalMember | undefined;
|
|
34
|
+
export declare function renderApiTemplate(template: string, context: object, root: string, files: TrackedFiles, markdown: (text: string) => string, configDirectory?: string): string;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { Dependency, SemanticClosureDependency } from '../contracts.js';
|
|
2
|
+
import type { FlagValue } from '../kernel/flags.js';
|
|
3
|
+
import type { Footprint } from '../kernel/footprint.js';
|
|
4
|
+
import type { Snapshot } from './program-state.js';
|
|
5
|
+
/**
|
|
6
|
+
* Recorded semantic closures: in a scoped development generation every semantic query records one
|
|
7
|
+
* `semantic-closure` dependency, `{ scopeId, key: <query>, digest }`, in place of the global
|
|
8
|
+
* `semantic-reference`. The digest covers exactly the program files the query's
|
|
9
|
+
* footprint read (`R`), their type closures, the program environment and the derived-class lists
|
|
10
|
+
* it read (`ProgramIndex`).
|
|
11
|
+
*
|
|
12
|
+
* The artifact carries only the digest. `R` stays with the retained program (`ClosureStore`,
|
|
13
|
+
* keyed by digest, so a record always belongs to the digest it produced), and the refresher
|
|
14
|
+
* recomputes the digest from it over the current program. A digest without a record still holds
|
|
15
|
+
* when the whole program equals the one of the previous candidate, since every closure is a
|
|
16
|
+
* function of the program; otherwise it refreshes as changed and its unit is recomputed, as without
|
|
17
|
+
* scoping. A runtime that carries no records (a fresh runtime, a recycle) is seeded from the
|
|
18
|
+
* persistent store (`compiler/closure-store.ts`, {@link SemanticClosures.seed}). A record is
|
|
19
|
+
* checked every time it is used: the digest covers `R` and the derived identities themselves, so
|
|
20
|
+
* a record recomputes to its dependency's digest only when it is that digest's record and the
|
|
21
|
+
* closure holds, whatever its source. The store also keeps its program's file order: with
|
|
22
|
+
* `stableTypeOrdering` output depends on the relative order of the files that declare the printed
|
|
23
|
+
* types, so when two files both programs have swapped places no earlier closure is confirmed
|
|
24
|
+
* (every closure refreshes as changed); files added or removed reorder no surviving file.
|
|
25
|
+
*
|
|
26
|
+
* Shape closures (`NGDOC_SHAPE_CLOSURE`, on by default) follow the files of `R` by their content
|
|
27
|
+
* and their declaration-shape closures (`ProgramIndex.closure` with `shape`): a body edit that
|
|
28
|
+
* keeps every declaration shape then changes only the closures whose `R` holds the edited file.
|
|
29
|
+
* Their keys carry {@link SHAPE_KEY_SUFFIX}, so a digest recorded in the other mode never holds
|
|
30
|
+
* without a record (a cache restored across a switch change). `verify` reports every closure that
|
|
31
|
+
* holds only by its shapes as narrowed ({@link SemanticClosures.narrowed}): its type-closure digest
|
|
32
|
+
* changed since its query recorded it, or is not known (a record carried from a generation that did
|
|
33
|
+
* not keep it); the compiler then renders the content reused on it again and compares.
|
|
34
|
+
*/
|
|
35
|
+
/** The mode of shape closures: `off` keeps type closures for every file of `R`. */
|
|
36
|
+
export type ShapeClosureMode = FlagValue;
|
|
37
|
+
/** The key suffix of a closure recorded with shape closures. */
|
|
38
|
+
export declare const SHAPE_KEY_SUFFIX = "@shape";
|
|
39
|
+
/** What one closure digest was computed from. */
|
|
40
|
+
export interface ClosureRecord {
|
|
41
|
+
/** `R`: the program files the query's semantic channels touched, sorted. */
|
|
42
|
+
readonly files: readonly string[];
|
|
43
|
+
/** The classes whose derived-class list the query read, sorted. */
|
|
44
|
+
readonly derived: readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* Shape closures in `verify` mode: per closure key, the closure's digest with type closures only
|
|
47
|
+
* when that query last recorded this digest (queries with equal footprints share a record).
|
|
48
|
+
*/
|
|
49
|
+
readonly wide?: Readonly<Record<string, string>>;
|
|
50
|
+
/**
|
|
51
|
+
* Set only on a record the service hands to the persistent store (`closureRecord`): the file
|
|
52
|
+
* order of the program it holds on, which the store keeps as the seeded records' order.
|
|
53
|
+
*/
|
|
54
|
+
readonly order?: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Closure records by digest, handed from one generation of a runtime to the next, with the file
|
|
58
|
+
* order of the program they were refreshed on ({@link programOrder}).
|
|
59
|
+
*/
|
|
60
|
+
export type ClosureStore = ReadonlyMap<string, ClosureRecord> & {
|
|
61
|
+
readonly order?: readonly string[];
|
|
62
|
+
};
|
|
63
|
+
export declare class SemanticClosures {
|
|
64
|
+
private readonly shape;
|
|
65
|
+
/** Whether queries record closures (a scoped development generation). */
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
private previous;
|
|
68
|
+
/** Whether the previous records' program and the current one order every common file alike. */
|
|
69
|
+
private ordered?;
|
|
70
|
+
private current;
|
|
71
|
+
/** The whole-program digest of the previous candidate's program. */
|
|
72
|
+
private base?;
|
|
73
|
+
/** Digests whose record came from the persistent store in this generation (see `seed`). */
|
|
74
|
+
private seeded;
|
|
75
|
+
/** `verify`: the closures (`key` and digest) that held only by their shapes in this generation. */
|
|
76
|
+
private readonly narrowedClosures;
|
|
77
|
+
constructor(shape?: ShapeClosureMode);
|
|
78
|
+
/** Starts a generation: its mode, and the records of the generation it continues. */
|
|
79
|
+
start(enabled: boolean, previous: ClosureStore | undefined): void;
|
|
80
|
+
/**
|
|
81
|
+
* Seeds a generation that carries no records of its runtime with the records of the persistent
|
|
82
|
+
* store (`load` is called only then). They are used as the carried records are: each is checked
|
|
83
|
+
* when it is used, and the next generation carries it.
|
|
84
|
+
*/
|
|
85
|
+
seed(load: () => ClosureStore): void;
|
|
86
|
+
/** The record of a closure digest, recorded, refreshed or carried in this generation. */
|
|
87
|
+
recorded(digest: string): ClosureRecord | undefined;
|
|
88
|
+
/** The whole-program `semantic` digest of the previous candidate (from its aggregate artifact). */
|
|
89
|
+
setBase(digest: string | undefined): void;
|
|
90
|
+
/**
|
|
91
|
+
* The closure dependency of one query, or undefined when its footprint cannot state one (the
|
|
92
|
+
* caller then records the global reference).
|
|
93
|
+
*/
|
|
94
|
+
record(state: Snapshot, key: string, footprint: Footprint): SemanticClosureDependency | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The current digest of a recorded closure, or undefined when it cannot be recomputed (no
|
|
97
|
+
* record, and a program other than the previous candidate's).
|
|
98
|
+
*/
|
|
99
|
+
refresh(state: Snapshot, dependency: SemanticClosureDependency): string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* `verify`: whether the closure held in this generation only by its shapes (its type closures
|
|
102
|
+
* changed), so the content reused on it is rendered again and compared.
|
|
103
|
+
*/
|
|
104
|
+
narrowed(dependency: SemanticClosureDependency): boolean;
|
|
105
|
+
/** Whether the program equals the previous candidate's, so every recorded closure holds. */
|
|
106
|
+
holds(state: Snapshot | undefined): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The records the next generation of this runtime refreshes against, with the file order of
|
|
109
|
+
* `state`'s program (the one they hold on); without it the next generation cannot use them.
|
|
110
|
+
*/
|
|
111
|
+
retained(state?: Pick<Snapshot, 'project'>): ClosureStore;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The file order of the snapshot's current program: its source file names in program order, one
|
|
115
|
+
* array per program. A program the patch or a restructuring re-created is a new program.
|
|
116
|
+
*/
|
|
117
|
+
export declare function programOrder(state: Pick<Snapshot, 'project'>): readonly string[];
|
|
118
|
+
/**
|
|
119
|
+
* Whether every pair of files that both orders contain is in the same relative order in both:
|
|
120
|
+
* files added or removed reorder nothing, two surviving files that swapped places do.
|
|
121
|
+
*/
|
|
122
|
+
export declare function sameRelativeOrder(before: readonly string[], after: readonly string[]): boolean;
|
|
123
|
+
/** The whole-program `semantic` digest recorded by a candidate's aggregate artifact. */
|
|
124
|
+
export declare function programDigestOf(artifacts: ReadonlyArray<{
|
|
125
|
+
identity: {
|
|
126
|
+
role: string;
|
|
127
|
+
};
|
|
128
|
+
dependencies: Dependency[];
|
|
129
|
+
}>): string | undefined;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { DeclarationDescriptor, JsonValue, SemanticClosureDependency, SemanticFragment, SemanticFragmentRequest, SemanticProgramRetention, SemanticProgramSynchronization, SemanticService, ServiceResult } from '../contracts.js';
|
|
2
|
+
import { type RecorderMode } from '../kernel/footprint.js';
|
|
3
|
+
import { type ProgramWatchFacts } from './program-retention.js';
|
|
4
|
+
import { type RetainedSemanticState, type SynchronizationPath } from './program-state.js';
|
|
5
|
+
import { type MarkdownRenderer } from './rendering.js';
|
|
6
|
+
import { type ClosureRecord, type ClosureStore, type ShapeClosureMode } from './semantic-closure.js';
|
|
7
|
+
/**
|
|
8
|
+
* The semantic service: one TypeScript program per generation, and the queries over it.
|
|
9
|
+
*
|
|
10
|
+
* Module map:
|
|
11
|
+
* - `program-builder.ts`: builds the Project of a discovery snapshot (program lifecycle);
|
|
12
|
+
* - `program-observations.ts`: per-importer and global program tracking, and their aggregate;
|
|
13
|
+
* - `program-retention.ts`: the retention key, the re-verification state and the reuse check;
|
|
14
|
+
* - `program-state.ts`: the typed state (snapshot, `ProgramMirror`, `RetainedProgram`);
|
|
15
|
+
* - `api-enumeration.ts`: the declarations of an API entry (queries);
|
|
16
|
+
* - `fragments.ts`: JSDoc fragments and API templates (rendering).
|
|
17
|
+
* This facade orchestrates `synchronize`, runs every query in its recorder scope, and hands the
|
|
18
|
+
* retained program to the next generation.
|
|
19
|
+
*/
|
|
20
|
+
export { declarationIdentity } from './api-enumeration.js';
|
|
21
|
+
export type { RetainedSemanticState, SemanticRetention, SynchronizationPath, } from './program-state.js';
|
|
22
|
+
export interface SemanticServiceOptions {
|
|
23
|
+
/** Caller retains synchronize provenance and resolves query references through it. */
|
|
24
|
+
dependencyMode?: 'full' | 'scope-reference';
|
|
25
|
+
templateRoot?: string;
|
|
26
|
+
markdown?: MarkdownRenderer;
|
|
27
|
+
/** Discovery-local evaluated JSON hook; never exposes live values, Nodes, or functions. */
|
|
28
|
+
readGuideValues?: (entryId: string) => ServiceResult<JsonValue>;
|
|
29
|
+
/**
|
|
30
|
+
* The footprint recorder: `on` attaches each query's recorded footprint to its result out of
|
|
31
|
+
* band (`footprintOf`), `verify` also fails a query that reads a node outside it.
|
|
32
|
+
* Defaults to `NGDOC_SEMANTIC_RECORDER` (on unless `0`). Results are identical in every mode.
|
|
33
|
+
*/
|
|
34
|
+
recorder?: RecorderMode;
|
|
35
|
+
/**
|
|
36
|
+
* The incremental program: `on` patches the content edits of program files into a
|
|
37
|
+
* retained program instead of synchronizing a new one; `verify` also synchronizes a cold program
|
|
38
|
+
* after every patch, keeps the patched one only when the two are equal, and otherwise uses the
|
|
39
|
+
* cold one and warns `SEMANTIC_PATCH_MISMATCH`. Defaults to `NGDOC_INCREMENTAL_PROGRAM` (on unless
|
|
40
|
+
* `0`). Only a synchronization that is handed a retained program can patch it.
|
|
41
|
+
*/
|
|
42
|
+
incrementalProgram?: IncrementalProgramMode;
|
|
43
|
+
/**
|
|
44
|
+
* Shape closures (`semantic-closure.ts`): `on` follows the files of a closure by
|
|
45
|
+
* their content and declaration-shape closures; `verify` also reports every closure that
|
|
46
|
+
* holds only by its shapes as narrowed (`closureNarrowed`). Defaults to `NGDOC_SHAPE_CLOSURE` (on
|
|
47
|
+
* unless `0`). Only scoped generations record closures.
|
|
48
|
+
*/
|
|
49
|
+
shapeClosure?: ShapeClosureMode;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the queries of one synchronization that depend on the whole program share one
|
|
52
|
+
* tracking of it (`fragments.ts`, `trackWholeProgram`). Defaults to `NGDOC_TRACKED_PROGRAM_REUSE`
|
|
53
|
+
* (on unless `0`); off, every such query tracks the program again. Results are identical.
|
|
54
|
+
*/
|
|
55
|
+
trackedProgramReuse?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export type IncrementalProgramMode = 'off' | 'on' | 'verify';
|
|
58
|
+
/** Warns that a patched program differed from a cold synchronization (`verify` only). */
|
|
59
|
+
export declare const SEMANTIC_PATCH_MISMATCH = "SEMANTIC_PATCH_MISMATCH";
|
|
60
|
+
export declare class SemanticServiceImpl implements SemanticService, SemanticProgramRetention {
|
|
61
|
+
private readonly options;
|
|
62
|
+
private snapshot?;
|
|
63
|
+
private revision;
|
|
64
|
+
private disposed;
|
|
65
|
+
private readonly recorder;
|
|
66
|
+
/** The rendering helpers every query uses, bound to this service's options. */
|
|
67
|
+
private readonly context;
|
|
68
|
+
/** Recorded semantic closures; on only for scoped development generations. */
|
|
69
|
+
private readonly closures;
|
|
70
|
+
private scoped;
|
|
71
|
+
private readonly incremental;
|
|
72
|
+
/** The taken program a failed patch hands back (the port's `patched-failed`). */
|
|
73
|
+
private handedBack?;
|
|
74
|
+
/**
|
|
75
|
+
* Queries started and not yet returned. A query that never returns was terminated: a template
|
|
76
|
+
* action runs a query inside the template's `vm` render, whose watchdog terminates the render
|
|
77
|
+
* without running any `finally` block. The TypeScript checker, the recorder and the Project may
|
|
78
|
+
* then hold the state of a half-done query.
|
|
79
|
+
*/
|
|
80
|
+
private running;
|
|
81
|
+
/** A query of this program was terminated: it is never retained, and answers no more queries. */
|
|
82
|
+
private interrupted;
|
|
83
|
+
constructor(options?: SemanticServiceOptions);
|
|
84
|
+
/** The recorder's mode and, when it asked for recording but the probe failed, why it is off. */
|
|
85
|
+
recording(): {
|
|
86
|
+
mode: RecorderMode;
|
|
87
|
+
unavailable?: string;
|
|
88
|
+
};
|
|
89
|
+
private lastSynchronization?;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the next synchronization's queries record `semantic-closure` dependencies instead of
|
|
92
|
+
* the global `semantic-reference` (a scoped development generation). Only the `scope-reference`
|
|
93
|
+
* dependency mode records closures.
|
|
94
|
+
*/
|
|
95
|
+
scopeClosures(enabled: boolean): void;
|
|
96
|
+
/** The previous candidate's whole-program digest, which confirms closures without a record. */
|
|
97
|
+
closureBase(digest: string | undefined): void;
|
|
98
|
+
/**
|
|
99
|
+
* After `synchronize`: seeds a generation whose runtime carries no closure records with the
|
|
100
|
+
* records of the persistent store (`compiler/closure-store.ts`); `load` runs only then.
|
|
101
|
+
*/
|
|
102
|
+
seedClosures(load: () => ClosureStore): void;
|
|
103
|
+
/**
|
|
104
|
+
* The record of a closure digest this generation holds, for the persistent store, with the file
|
|
105
|
+
* order of this generation's program: without it a restored record confirms no closure after an
|
|
106
|
+
* edit (`SemanticClosures`).
|
|
107
|
+
*/
|
|
108
|
+
closureRecord(digest: string): ClosureRecord | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* The current digest of a recorded closure (the refresher's source), or undefined when it cannot
|
|
111
|
+
* be recomputed, which refreshes it as changed.
|
|
112
|
+
*/
|
|
113
|
+
refreshClosure(dependency: SemanticClosureDependency): string | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* The current digest of the whole program a `semantic-reference` names, for a scoped generation,
|
|
116
|
+
* whose descriptors do not carry the reference (a query whose footprint could not state its
|
|
117
|
+
* closure records it instead). Undefined when closures are off or the scope is another.
|
|
118
|
+
*/
|
|
119
|
+
refreshReference(dependency: {
|
|
120
|
+
scopeId: string;
|
|
121
|
+
}): string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Shape closures in `verify` mode: whether the closure held in this generation only by its
|
|
124
|
+
* declaration shapes, so the content reused on it must be rendered again and compared.
|
|
125
|
+
*/
|
|
126
|
+
closureNarrowed(dependency: SemanticClosureDependency): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Whether every closure recorded against the previous candidate still holds without a refresh:
|
|
129
|
+
* the program equals that candidate's (always true when closures are off).
|
|
130
|
+
*/
|
|
131
|
+
closuresHold(): boolean;
|
|
132
|
+
/** How the last `synchronize` obtained its Project (instrumentation and tests). */
|
|
133
|
+
synchronization(): SynchronizationPath | undefined;
|
|
134
|
+
/** The retention port's view of the last `synchronize`. */
|
|
135
|
+
programSynchronization(): SemanticProgramSynchronization | undefined;
|
|
136
|
+
synchronize(request: Parameters<SemanticService['synchronize']>[0], signal: AbortSignal): Promise<ServiceResult<null>>;
|
|
137
|
+
/** Publishes a kept (reused or patched) retained program to this generation's queries. */
|
|
138
|
+
private keep;
|
|
139
|
+
/**
|
|
140
|
+
* Patches the retained program (`patchProgram`). A refused or throwing patch leaves a Project
|
|
141
|
+
* that must not be kept; in `verify` mode a patch that differs from a cold synchronization of the
|
|
142
|
+
* same tree is refused as a mismatch.
|
|
143
|
+
*/
|
|
144
|
+
private patch;
|
|
145
|
+
/** A FULL synchronization: a new Project, made retainable when `key` is given. */
|
|
146
|
+
private build;
|
|
147
|
+
enumerateApi(entryId: string): ServiceResult<DeclarationDescriptor[]>;
|
|
148
|
+
describeGuide(entryId: string): ServiceResult<import("../contracts.js").GuideSemantics>;
|
|
149
|
+
renderFragment(request: SemanticFragmentRequest): ServiceResult<SemanticFragment>;
|
|
150
|
+
/**
|
|
151
|
+
* Forgets the declarations this generation enumerated so far. A full attempt enumerates every
|
|
152
|
+
* API entry again, in entry order, and each entry's routes are disambiguated only against the
|
|
153
|
+
* declarations of earlier entries: the targeted path's admission enumerated all of them first.
|
|
154
|
+
*/
|
|
155
|
+
forgetDeclarations(): void;
|
|
156
|
+
/**
|
|
157
|
+
* The current Project for the next development generation, or undefined when this service did
|
|
158
|
+
* not synchronize for retention, has no successful synchronization, or a query changed the
|
|
159
|
+
* Project's source files (the next generation's cold Project would not contain them).
|
|
160
|
+
*/
|
|
161
|
+
retain(): RetainedSemanticState | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* The current program's private observations as JSON (`watchFacts`), which a later process
|
|
164
|
+
* checks before it trusts a candidate built on this program without building it again (the fast
|
|
165
|
+
* start). Undefined when {@link retain} would retain nothing, or a listing cannot vouch for its
|
|
166
|
+
* directory.
|
|
167
|
+
*/
|
|
168
|
+
programWatchFacts(): ProgramWatchFacts | undefined;
|
|
169
|
+
dispose(): Promise<void>;
|
|
170
|
+
/** Resource counters for host diagnostics/tests; no compiler objects escape. */
|
|
171
|
+
inspect(): {
|
|
172
|
+
projects: number;
|
|
173
|
+
declarations: number;
|
|
174
|
+
};
|
|
175
|
+
private check;
|
|
176
|
+
private markdown;
|
|
177
|
+
/**
|
|
178
|
+
* Runs one query in its own recorder scope. The recorded footprint is attached to the returned
|
|
179
|
+
* result out of band; the result itself is exactly what it was without the recorder.
|
|
180
|
+
*/
|
|
181
|
+
private run;
|
|
182
|
+
/** Marks the program interrupted when a query never returned, and resets the recorder. */
|
|
183
|
+
private noteInterruption;
|
|
184
|
+
private query;
|
|
185
|
+
}
|
|
186
|
+
export declare function createSemanticService(options?: SemanticServiceOptions): SemanticServiceImpl;
|