@ng-doc/builder 22.0.0-beta.2 → 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 +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/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/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/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 +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/package.json +86 -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 +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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Dependency } from '../contracts.js';
|
|
2
|
+
export { contentDigest } from './canonical.js';
|
|
3
|
+
export { readText } from './observations.js';
|
|
4
|
+
/**
|
|
5
|
+
* Recorded footprints: the one recorder of every cross-file read a phase call makes. This leaf
|
|
6
|
+
* module holds the stage-neutral part (scopes, footprints and the files channel) that the semantic
|
|
7
|
+
* service and the content compiler share; file reads and their digests come from
|
|
8
|
+
* `observations.ts`, and the TypeScript channels live in `semantic/recorder.ts`.
|
|
9
|
+
*
|
|
10
|
+
* Footprints are attached to phase results out of band (a WeakMap keyed by the result object).
|
|
11
|
+
* In a scoped development generation the semantic service turns each query's footprint into its
|
|
12
|
+
* `semantic-closure` dependency (`semantic/semantic-closure.ts`); nothing else reads them.
|
|
13
|
+
*/
|
|
14
|
+
/** The phase calls that each get one recorder scope. */
|
|
15
|
+
export type FootprintScopeKind = 'enumerateApi' | 'describeGuide' | 'renderFragment' | 'entry-doc' | 'content-describe' | 'content-compile' | 'link' | 'capture';
|
|
16
|
+
/** How a file entered `R(scope)`; kept only in verify mode (attribution for tests and gaps). */
|
|
17
|
+
export type FootprintChannel = 'checker' | 'symbol-docs' | 'language-service' | 'lookup' | 'node-factory' | 'merge';
|
|
18
|
+
export interface Footprint {
|
|
19
|
+
readonly scope: FootprintScopeKind;
|
|
20
|
+
/** The unit/IR the scope ran for (entry id, declaration id or path, content id). */
|
|
21
|
+
readonly key: string;
|
|
22
|
+
/** `R(scope)`: the source files the semantic channels touched, sorted. */
|
|
23
|
+
readonly files: readonly string[];
|
|
24
|
+
/** The files channel: every read, probe and glob, as read identities, sorted. */
|
|
25
|
+
readonly reads: readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* False when part of the call's semantic side recorded nothing (recording off or unavailable for
|
|
28
|
+
* a query it made, or a nested footprint that is itself incomplete). An incomplete footprint
|
|
29
|
+
* states no dependency set at all: `files` is then a lower bound, never "depends on nothing".
|
|
30
|
+
* Scoped semantic invalidation treats it like a unit without a recorded `R`.
|
|
31
|
+
*/
|
|
32
|
+
readonly complete: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The classes whose derived-class list (the API "See Also" section) the scope read, as
|
|
35
|
+
* `path#start` identities, sorted. The list depends on heritage clauses anywhere in the program,
|
|
36
|
+
* which `files` cannot state, so it is part of the scope's semantic closure. Present only when
|
|
37
|
+
* the scope read one.
|
|
38
|
+
*/
|
|
39
|
+
readonly derived?: readonly string[];
|
|
40
|
+
/** Verify mode only: the files each channel recorded. */
|
|
41
|
+
readonly channels?: Readonly<Partial<Record<FootprintChannel, readonly string[]>>>;
|
|
42
|
+
}
|
|
43
|
+
/** `NGDOC_SEMANTIC_RECORDER`: `0`/`off`/`false`/`no` turns recording off, `verify` adds the gap assertion. */
|
|
44
|
+
export declare const SEMANTIC_RECORDER_ENV = "NGDOC_SEMANTIC_RECORDER";
|
|
45
|
+
export type RecorderMode = 'off' | 'on' | 'verify';
|
|
46
|
+
/** The recorder mode from an explicit value or the environment; recording is on by default. */
|
|
47
|
+
export declare function recorderMode(value?: string | undefined): RecorderMode;
|
|
48
|
+
/** The files-channel identity of a physical dependency; undefined for non-physical kinds. */
|
|
49
|
+
export declare function readIdentity(dependency: Dependency): string | undefined;
|
|
50
|
+
/** One open recorder scope: `R` (files), the files channel (reads) and, in verify mode, gaps. */
|
|
51
|
+
export declare class FootprintScope {
|
|
52
|
+
readonly kind: FootprintScopeKind;
|
|
53
|
+
readonly key: string;
|
|
54
|
+
readonly verify: boolean;
|
|
55
|
+
readonly files: Set<string>;
|
|
56
|
+
readonly reads: Set<string>;
|
|
57
|
+
/** Classes whose derived-class list was read (see {@link Footprint.derived}). */
|
|
58
|
+
readonly derived: Set<string>;
|
|
59
|
+
/** Verify mode: per-channel attribution. */
|
|
60
|
+
readonly channels?: Map<FootprintChannel, Set<string>>;
|
|
61
|
+
/** Verify mode: hooked reads on nodes whose file was not in `R` when read. */
|
|
62
|
+
readonly gaps: string[];
|
|
63
|
+
private incomplete;
|
|
64
|
+
constructor(kind: FootprintScopeKind, key: string, verify?: boolean);
|
|
65
|
+
/** Adds a file to `R`. */
|
|
66
|
+
record(file: string, channel: FootprintChannel): void;
|
|
67
|
+
/** Adds a class whose derived-class list the scope read. */
|
|
68
|
+
recordDerived(identity: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Marks the footprint incomplete: the scope made a read whose answer depends on files it cannot
|
|
71
|
+
* name (a whole-program reference search), so its files are only a lower bound.
|
|
72
|
+
*/
|
|
73
|
+
unscoped(): void;
|
|
74
|
+
/** Adds one files-channel observation. */
|
|
75
|
+
observe(dependency: Dependency): void;
|
|
76
|
+
/** Adds every files-channel observation of a dependency list. */
|
|
77
|
+
observeAll(dependencies: readonly Dependency[]): void;
|
|
78
|
+
/**
|
|
79
|
+
* Replays a nested or cached footprint into this scope. A missing (`undefined`) or incomplete one
|
|
80
|
+
* makes this scope incomplete: the call it stands for recorded nothing, or not everything.
|
|
81
|
+
*/
|
|
82
|
+
merge(footprint: Footprint | undefined): void;
|
|
83
|
+
seal(): Footprint;
|
|
84
|
+
}
|
|
85
|
+
/** Attaches a footprint to a phase result out of band; the result object is returned unchanged. */
|
|
86
|
+
export declare function attachFootprint<T extends object>(result: T, footprint: Footprint): T;
|
|
87
|
+
/** The footprint recorded for a phase result, if it was produced with recording on. */
|
|
88
|
+
export declare function footprintOf(result: object | undefined): Footprint | undefined;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Dependency } from '../contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* The files recorder shared by discovery and the semantic service: every read, existence probe and
|
|
4
|
+
* glob a phase makes, recorded as dependencies in the one digest domain (`kernel/canonical.ts`).
|
|
5
|
+
* The content compiler and the semantic footprints record through {@link readText} as well, so a
|
|
6
|
+
* path read by several phases always has one digest for the same bytes.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The digest recorded for a path that one recorder saw with two different contents: no single
|
|
10
|
+
* digest describes what was used, so it never verifies and every consumer is recomputed.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CONFLICTING_CONTENT_DIGEST = "conflicting-reads";
|
|
13
|
+
export interface ObservationRecorderOptions {
|
|
14
|
+
/**
|
|
15
|
+
* A recorder that also receives everything this one records; this one then keeps its own subset
|
|
16
|
+
* (for example the configuration's inputs) and shares the parent's bytes.
|
|
17
|
+
*/
|
|
18
|
+
readonly parent?: ObservationRecorder;
|
|
19
|
+
/**
|
|
20
|
+
* Read each file once: every later read returns the same bytes, so all consumers use, and the
|
|
21
|
+
* recorded digest describes, exactly those bytes. Only for a recorder that lives for one phase
|
|
22
|
+
* call; a long-lived one would keep serving old bytes.
|
|
23
|
+
*/
|
|
24
|
+
readonly cacheBytes?: boolean;
|
|
25
|
+
/** Turns a path into its recorded form; the identity by default. */
|
|
26
|
+
readonly normalize?: (file: string) => string;
|
|
27
|
+
/** Receives every observation added after construction (a footprint's files channel). */
|
|
28
|
+
readonly observer?: (dependency: Dependency) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A set of dependencies with at most one per identity, listed in code-unit order of the identity.
|
|
32
|
+
* A later observation of an identity replaces the earlier one, except that two contents of one
|
|
33
|
+
* path record {@link CONFLICTING_CONTENT_DIGEST}.
|
|
34
|
+
*/
|
|
35
|
+
export declare class ObservationRecorder {
|
|
36
|
+
private readonly values;
|
|
37
|
+
private ordered?;
|
|
38
|
+
private readonly parent?;
|
|
39
|
+
private readonly bytes?;
|
|
40
|
+
private readonly normalize;
|
|
41
|
+
private readonly observer?;
|
|
42
|
+
constructor(initial?: readonly Dependency[], options?: ObservationRecorderOptions);
|
|
43
|
+
add(dependency: Dependency): void;
|
|
44
|
+
/** Records whether the file exists and, when it does, its content. */
|
|
45
|
+
observeFile(file: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Records the file's existence and the digest of exactly the bytes returned. Undefined when the
|
|
48
|
+
* file does not exist; a read error propagates.
|
|
49
|
+
*/
|
|
50
|
+
readFile(file: string): Buffer | undefined;
|
|
51
|
+
/** {@link readFile} decoded as UTF-8; a missing file throws like `readFileSync`. */
|
|
52
|
+
readText(file: string): string;
|
|
53
|
+
/** The recorded dependencies, in code-unit order of their identities. */
|
|
54
|
+
all(): Dependency[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A synchronous read decoded as UTF-8 (as `readFileSync(path, 'utf8')`), with the content digest
|
|
58
|
+
* of its bytes; throws what `readFileSync` throws.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readText(path: string): {
|
|
61
|
+
text: string;
|
|
62
|
+
digest: string;
|
|
63
|
+
};
|
|
64
|
+
/** The asynchronous {@link readText}; rejects with what `readFile` rejects with. */
|
|
65
|
+
export declare function readTextFile(path: string): Promise<{
|
|
66
|
+
text: string;
|
|
67
|
+
digest: string;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
/**
|
|
3
|
+
* The path rules of the platform a path belongs to. Production code always uses the running
|
|
4
|
+
* platform's (`node:path`); tests pass `path.win32` to check Windows spellings on any host.
|
|
5
|
+
*/
|
|
6
|
+
export type PathRules = Pick<typeof path, 'resolve'>;
|
|
7
|
+
/**
|
|
8
|
+
* The engine's spelling of a host path: absolute, resolved and with forward slashes, so
|
|
9
|
+
* `D:\a\docs\page.md` is recorded as `D:/a/docs/page.md` and a POSIX path is unchanged.
|
|
10
|
+
*
|
|
11
|
+
* Every path a dependency, a watch input or another DTO carries takes this form, whatever produced
|
|
12
|
+
* it (`session/watch-inputs.ts` rejects any other), so the paths a generation records, and the
|
|
13
|
+
* outputs derived from them, are the same on every operating system. A path built with `node:path`
|
|
14
|
+
* (`resolve`, `join`, `fileURLToPath`) has native separators and must pass through here before it
|
|
15
|
+
* is recorded.
|
|
16
|
+
*/
|
|
17
|
+
export declare function hostPath(file: string, rules?: PathRules): string;
|
|
18
|
+
/**
|
|
19
|
+
* A relative path (an output path, a glob or a path inside a root) with forward slashes. Unlike
|
|
20
|
+
* {@link hostPath} it does not resolve the path.
|
|
21
|
+
*/
|
|
22
|
+
export declare function forwardSlashes(value: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resolved version of every package in {@link RUNTIME_PACKAGES} (`null` when it does not
|
|
3
|
+
* resolve), in that order. Read once per process: a package upgraded while it runs is not the code
|
|
4
|
+
* it loaded, and the next process reads the new versions.
|
|
5
|
+
*/
|
|
6
|
+
export declare function runtimePackages(): Readonly<Record<string, string | null>>;
|
|
7
|
+
/**
|
|
8
|
+
* The version of each package of `list` as Node's resolution finds it from `from` upwards, or from
|
|
9
|
+
* the directory of the package named second (`null` when it does not resolve or names none).
|
|
10
|
+
*/
|
|
11
|
+
export declare function packageVersions(list: ReadonlyArray<readonly [string, string?]>, from: string): Record<string, string | null>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ApiDescriptor, ApiListRecord, ContentDescriptor, DeclarationDescriptor, Dependency, Diagnostic, EntryDescriptor, FileOutput, GeneratorConfiguration, GuideDescriptor, GuideSemantics, KeywordExport, LinkedContent, PageArtifact, RouteRecord, ServiceResult } from '../contracts.js';
|
|
2
|
+
export interface PageAssemblyRequest {
|
|
3
|
+
/** Authoritative compiler artifact ID, required when a descriptor plan is supplied. */
|
|
4
|
+
ownerId?: string;
|
|
5
|
+
configuration: GeneratorConfiguration;
|
|
6
|
+
entry: GuideDescriptor | ApiDescriptor;
|
|
7
|
+
declaration?: DeclarationDescriptor;
|
|
8
|
+
content: LinkedContent[];
|
|
9
|
+
/**
|
|
10
|
+
* The compiler's descriptor plan; assembly without a plan may omit it. Every descriptor must
|
|
11
|
+
* have its linked content in `content`.
|
|
12
|
+
*/
|
|
13
|
+
contentDescriptors?: ContentDescriptor[];
|
|
14
|
+
semantics?: GuideSemantics;
|
|
15
|
+
metadata?: RouteRecord['metadata'];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A digest of every page-assembly input except the linked content, which callers compare
|
|
19
|
+
* directly, plus the structural template observations. `assemblePage` is a pure function of
|
|
20
|
+
* its request and the template files, so equal keys and equal content assemble identically.
|
|
21
|
+
* Returns undefined when an input has no exact JSON identity; callers must then assemble.
|
|
22
|
+
*/
|
|
23
|
+
export declare function pageAssemblyKey(request: Omit<PageAssemblyRequest, 'content'>, templates: Dependency[]): string | undefined;
|
|
24
|
+
export interface PageAssembly {
|
|
25
|
+
outputs: FileOutput[];
|
|
26
|
+
routes: RouteRecord[];
|
|
27
|
+
apiList: ApiListRecord[];
|
|
28
|
+
diagnostics: Diagnostic[];
|
|
29
|
+
}
|
|
30
|
+
export interface AggregateRequest {
|
|
31
|
+
configuration: GeneratorConfiguration;
|
|
32
|
+
artifacts: PageArtifact[];
|
|
33
|
+
entries: EntryDescriptor[];
|
|
34
|
+
keywords: KeywordExport[];
|
|
35
|
+
}
|
|
36
|
+
export interface AggregateAssembly {
|
|
37
|
+
outputs: FileOutput[];
|
|
38
|
+
diagnostics: Diagnostic[];
|
|
39
|
+
}
|
|
40
|
+
export interface OutputAssembler {
|
|
41
|
+
templateDependencies(): Promise<ServiceResult<null>>;
|
|
42
|
+
assemblePage(request: PageAssemblyRequest): PageAssembly;
|
|
43
|
+
aggregate(request: AggregateRequest): AggregateAssembly;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The kind the API list and the search palette show for a declaration, such as `Component`.
|
|
47
|
+
* @param declaration - The declaration.
|
|
48
|
+
*/
|
|
49
|
+
export declare function apiListType(declaration: DeclarationDescriptor): string;
|
|
50
|
+
export declare class OutputAssemblerImpl implements OutputAssembler {
|
|
51
|
+
private readonly templateRoot;
|
|
52
|
+
constructor(options?: {
|
|
53
|
+
templateRoot?: string;
|
|
54
|
+
});
|
|
55
|
+
templateDependencies(): Promise<ServiceResult<null>>;
|
|
56
|
+
assemblePage(request: PageAssemblyRequest): PageAssembly;
|
|
57
|
+
aggregate(request: AggregateRequest): AggregateAssembly;
|
|
58
|
+
private guide;
|
|
59
|
+
private apiEntry;
|
|
60
|
+
private apiDeclaration;
|
|
61
|
+
private apiLists;
|
|
62
|
+
private addContentSource;
|
|
63
|
+
private renderOutput;
|
|
64
|
+
}
|
|
65
|
+
export declare function createOutputAssembler(options?: {
|
|
66
|
+
templateRoot?: string;
|
|
67
|
+
}): OutputAssembler;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CiVendor } from './detect.js';
|
|
2
|
+
/**
|
|
3
|
+
* CI vendor extras. None of them changes the text of a line.
|
|
4
|
+
* - Azure `##vso[task.setprogress]` and TeamCity `progressMessage` are hidden progress signals and
|
|
5
|
+
* are on by default (decided); they follow the LINES cadence.
|
|
6
|
+
* - GitHub groups, GitLab sections and the GitHub step summary are opt-in with
|
|
7
|
+
* `NGDOC_PROGRESS_SECTIONS=1` (decided).
|
|
8
|
+
*/
|
|
9
|
+
/** TeamCity service-message escaping. */
|
|
10
|
+
export declare function escapeTeamCity(text: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Free text (routes, reasons, project names) must never start a CI service message: Azure and
|
|
13
|
+
* TeamCity act on `##vso[`, `##[` and `##teamcity[` in any log line.
|
|
14
|
+
*/
|
|
15
|
+
export declare const neutralizeServiceMessages: (text: string) => string;
|
|
16
|
+
/** The hidden progress line for `vendor`, or `undefined` when the vendor has none. */
|
|
17
|
+
export declare function ciProgressMessage(vendor: CiVendor | undefined, text: string, percent: number | undefined): string | undefined;
|
|
18
|
+
/** Opens a collapsible group; the summary line is printed after `sectionEnd`, so it stays visible. */
|
|
19
|
+
export declare function sectionStart(vendor: CiVendor | undefined, title: string, nowMs: number): string | undefined;
|
|
20
|
+
export declare function sectionEnd(vendor: CiVendor | undefined, nowMs: number): string | undefined;
|
|
21
|
+
/** Appends one markdown line to `$GITHUB_STEP_SUMMARY`. Failures are ignored: it is decoration. */
|
|
22
|
+
export declare function appendStepSummary(env: NodeJS.ProcessEnv, text: string, append?: (file: string, data: string) => void): boolean;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ProgressSetting } from './settings.js';
|
|
2
|
+
/** CI vendors the reporter distinguishes (same set as Nx `isCI()`). */
|
|
3
|
+
export type CiVendor = 'github' | 'gitlab' | 'azure' | 'teamcity' | 'buildkite' | 'jenkins' | 'circleci' | 'generic';
|
|
4
|
+
/**
|
|
5
|
+
* `live`: one line redrawn in place. `lines`: append-only ASCII lines. `summary`: final lines only.
|
|
6
|
+
* `json`: the events themselves, one JSON line each. `off`: nothing.
|
|
7
|
+
*/
|
|
8
|
+
export type ProgressStyle = 'live' | 'lines' | 'summary' | 'json' | 'off';
|
|
9
|
+
/** The terminal the live line would draw on (normally `process.stderr`). */
|
|
10
|
+
export interface ProgressStream {
|
|
11
|
+
isTTY?: boolean;
|
|
12
|
+
columns?: number;
|
|
13
|
+
hasColors?: () => boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DetectOptions {
|
|
16
|
+
setting: ProgressSetting;
|
|
17
|
+
env?: NodeJS.ProcessEnv;
|
|
18
|
+
stream?: ProgressStream;
|
|
19
|
+
platform?: NodeJS.Platform;
|
|
20
|
+
/**
|
|
21
|
+
* Another writer shares the terminal: the Vite dev server after it listens, the CLI after it
|
|
22
|
+
* spawns a host.
|
|
23
|
+
*/
|
|
24
|
+
foreign?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ProgressEnvironment {
|
|
27
|
+
setting: ProgressSetting;
|
|
28
|
+
style: ProgressStyle;
|
|
29
|
+
/** `verbose`: LINES plus phase timings, the FULL-pass reason and background notices. */
|
|
30
|
+
verbose: boolean;
|
|
31
|
+
ci?: CiVendor;
|
|
32
|
+
tty: boolean;
|
|
33
|
+
dumb: boolean;
|
|
34
|
+
color: boolean;
|
|
35
|
+
unicode: boolean;
|
|
36
|
+
/** Live text is cut to `columns - 1`. */
|
|
37
|
+
columns: number;
|
|
38
|
+
/** Running as an Nx task. */
|
|
39
|
+
nxTask: boolean;
|
|
40
|
+
/** Nx TUI or `--output-style=stream*`: several tasks share the screen; no in-place redraw. */
|
|
41
|
+
nxShared: boolean;
|
|
42
|
+
/** Nx prefixes every line (`project: …`), which breaks CI commands. */
|
|
43
|
+
nxPrefix: boolean;
|
|
44
|
+
/** Invisible Azure/TeamCity progress service messages. */
|
|
45
|
+
ciAssist: boolean;
|
|
46
|
+
/** Opt-in GitHub/GitLab groups and step summary. */
|
|
47
|
+
sections: boolean;
|
|
48
|
+
/** LINES heartbeat: 15 s on CI, 5 s under Nx shared output, 10 s otherwise. */
|
|
49
|
+
heartbeatMs: number;
|
|
50
|
+
foreign: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** The Nx 23 task PTY reports the whole terminal, not the pane: keep live text short under Nx. */
|
|
53
|
+
export declare const NX_TASK_COLUMNS = 56;
|
|
54
|
+
export declare function detectCi(env: NodeJS.ProcessEnv): CiVendor | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Chooses the output style. In-place redraw needs a TTY that NgDoc owns: not CI (Buildkite runs a
|
|
57
|
+
* PTY), not Nx shared output (the task PTY reports the whole terminal width, so redrawn lines
|
|
58
|
+
* pile up in a pane), and no foreign writer. A single Nx task on a TTY does get the live line.
|
|
59
|
+
*/
|
|
60
|
+
export declare function detectProgressEnvironment(options: DetectOptions): ProgressEnvironment;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { CompilationProgressUpdate, Diagnostic, Generation } from '../contracts.js';
|
|
2
|
+
export type { CompilationPhase } from '../contracts.js';
|
|
3
|
+
/** Every phase a generation can report: the compilation's (compiler and worker) and the commit. */
|
|
4
|
+
export type ProgressPhase = CompilationProgressUpdate['phase'] | 'commit';
|
|
5
|
+
/** Declared execution order. A phase may be skipped but never goes backwards. */
|
|
6
|
+
export declare const PROGRESS_PHASES: readonly ProgressPhase[];
|
|
7
|
+
/**
|
|
8
|
+
* Phases reported outside the compiler: the worker runtime's start and result transfer, and the
|
|
9
|
+
* session's commit. Only compiler phases make the output show steps.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SESSION_PHASES: ReadonlySet<ProgressPhase>;
|
|
12
|
+
/** Why a generation runs. It selects how much the reporter prints. */
|
|
13
|
+
export type ProgressTrigger =
|
|
14
|
+
/** `buildOnce`: the initial development build or a production build. Full progress. */
|
|
15
|
+
'build'
|
|
16
|
+
/** A filesystem generation, including the first watch generation when the baseline is not reused. */
|
|
17
|
+
| 'watch'
|
|
18
|
+
/** A watcher rescan or a reconcile-origin generation. */
|
|
19
|
+
| 'rescan'
|
|
20
|
+
/** A generation started by an idle sweep for missed changes. Background. */
|
|
21
|
+
| 'follow-up'
|
|
22
|
+
/** The idle FULL confirmation after a targeted pass failed. Background. */
|
|
23
|
+
| 'confirmation'
|
|
24
|
+
/** The idle audit that repairs generated files changed outside NgDoc. Background. */
|
|
25
|
+
| 'audit';
|
|
26
|
+
export declare const PROGRESS_TRIGGERS: readonly ProgressTrigger[];
|
|
27
|
+
/** Background work is hidden unless it fails, runs longer than 2 s, or clears a reported error. */
|
|
28
|
+
export declare const BACKGROUND_TRIGGERS: ReadonlySet<ProgressTrigger>;
|
|
29
|
+
/** `restored`: a start published its recorded candidate without compiling (the fast start). */
|
|
30
|
+
export type ProgressPass = 'targeted' | 'full' | 'restored';
|
|
31
|
+
export type ProgressState = 'start' | 'advance' | 'end';
|
|
32
|
+
/**
|
|
33
|
+
* `superseded`: the generation committed, was adopted and a newer one follows (a `success` with
|
|
34
|
+
* `superseded: true` in `BuildResult`). `cancelled`: nothing was committed.
|
|
35
|
+
*/
|
|
36
|
+
export type ProgressStatus = 'success' | 'superseded' | 'failure' | 'cancelled';
|
|
37
|
+
export interface ProgressCounts {
|
|
38
|
+
/** Pages (units) in the candidate. */
|
|
39
|
+
pages: number;
|
|
40
|
+
/** Unique pages rebuilt in this generation (`whyRebuilt` owners). */
|
|
41
|
+
rebuilt: number;
|
|
42
|
+
errors: number;
|
|
43
|
+
warnings: number;
|
|
44
|
+
/** Output files written, removed and left unchanged by the commit. */
|
|
45
|
+
written?: number;
|
|
46
|
+
removed?: number;
|
|
47
|
+
unchanged?: number;
|
|
48
|
+
/** At most three routes of rebuilt pages, for the per-edit line. */
|
|
49
|
+
routes?: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface ProgressStartedEvent {
|
|
52
|
+
kind: 'progress-started';
|
|
53
|
+
generation: Generation;
|
|
54
|
+
seq: 0;
|
|
55
|
+
trigger: ProgressTrigger;
|
|
56
|
+
mode: 'development' | 'production';
|
|
57
|
+
/** File changes (or requested ids) behind the generation. */
|
|
58
|
+
changes: number;
|
|
59
|
+
elapsedMs: 0;
|
|
60
|
+
}
|
|
61
|
+
export interface ProgressUpdateEvent {
|
|
62
|
+
kind: 'progress';
|
|
63
|
+
generation: Generation;
|
|
64
|
+
/** Strictly increasing within the generation; assigned by the session. */
|
|
65
|
+
seq: number;
|
|
66
|
+
phase: ProgressPhase;
|
|
67
|
+
state: ProgressState;
|
|
68
|
+
/** Non-decreasing within `(pass, phase)`; never above `total`. */
|
|
69
|
+
completed?: number;
|
|
70
|
+
/** Fixed at `start`. */
|
|
71
|
+
total?: number;
|
|
72
|
+
/** Render: units reused from the previous IR or the cache. */
|
|
73
|
+
reused?: number;
|
|
74
|
+
/** A change to `full` may restart the phase sequence once per generation. */
|
|
75
|
+
pass?: ProgressPass;
|
|
76
|
+
/** On a pass change to `full`: a short, user-safe reason. */
|
|
77
|
+
reason?: string;
|
|
78
|
+
/** Session clock (`performance.now()`), milliseconds since `progress-started`. */
|
|
79
|
+
elapsedMs: number;
|
|
80
|
+
}
|
|
81
|
+
export interface ProgressSettledEvent {
|
|
82
|
+
kind: 'progress-settled';
|
|
83
|
+
generation: Generation;
|
|
84
|
+
seq: number;
|
|
85
|
+
status: ProgressStatus;
|
|
86
|
+
elapsedMs: number;
|
|
87
|
+
/** Milliseconds per phase that ran (last pass). */
|
|
88
|
+
phases: Partial<Record<ProgressPhase, number>>;
|
|
89
|
+
pass?: ProgressPass;
|
|
90
|
+
reason?: string;
|
|
91
|
+
counts: ProgressCounts;
|
|
92
|
+
}
|
|
93
|
+
/** Work outside a generation: the input check after start (`reobserve`) and the warm-up (`prime`). */
|
|
94
|
+
export interface ProgressActivityEvent {
|
|
95
|
+
kind: 'progress-activity';
|
|
96
|
+
activity: 'checking-inputs' | 'warming-up';
|
|
97
|
+
state: 'start' | 'end';
|
|
98
|
+
/** Only on `end`: the activity failed. */
|
|
99
|
+
failed?: boolean;
|
|
100
|
+
/** Only on `end`: other work stopped the activity before it finished. */
|
|
101
|
+
stopped?: boolean;
|
|
102
|
+
elapsedMs: number;
|
|
103
|
+
}
|
|
104
|
+
/** Advisory only: never influences results, commits, retention, watch inputs or caching. */
|
|
105
|
+
export type ProgressEvent = ProgressStartedEvent | ProgressUpdateEvent | ProgressSettledEvent | ProgressActivityEvent;
|
|
106
|
+
/**
|
|
107
|
+
* Free text from the session (routes, reasons) and hosts (project names) as one safe line: C0 and
|
|
108
|
+
* C1 controls (newlines, escape sequences) and the Unicode line separators become spaces, so the
|
|
109
|
+
* text can neither start a new log line (`::error::`) nor drive the terminal (OSC, cursor moves).
|
|
110
|
+
*/
|
|
111
|
+
export declare const plainText: (text: string) => string;
|
|
112
|
+
/** A consumer of progress events (`SessionOptions.onProgress`). */
|
|
113
|
+
export type ProgressSink = (event: ProgressEvent) => void | Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Warning code for a progress consumer that threw or rejected. Reported once per session and never
|
|
116
|
+
* stops the watch: progress is advisory and must never change a build's outcome.
|
|
117
|
+
*/
|
|
118
|
+
export declare const SESSION_PROGRESS_FAILED = "SESSION_PROGRESS_FAILED";
|
|
119
|
+
/** The `SESSION_PROGRESS_FAILED` diagnostic. Its severity is always `warning`. */
|
|
120
|
+
export declare function progressFailure(error: unknown): Diagnostic;
|
|
121
|
+
/**
|
|
122
|
+
* Wraps a progress consumer so that it can never throw into its caller. The first synchronous
|
|
123
|
+
* exception or rejection is reported once through `report` (as `SESSION_PROGRESS_FAILED`); later
|
|
124
|
+
* failures are swallowed. Events keep flowing to the consumer, and nothing else changes.
|
|
125
|
+
*/
|
|
126
|
+
export declare function guardProgressSink(sink: ProgressSink, report: (diagnostic: Diagnostic) => void): (event: ProgressEvent) => void;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ProgressActivityEvent, ProgressSettledEvent, ProgressTrigger } from './events.js';
|
|
2
|
+
import type { GenerationView } from './model.js';
|
|
3
|
+
/**
|
|
4
|
+
* All user-facing text. Lines are ASCII-only; the live line may use a spinner and a
|
|
5
|
+
* bar. Colour is decoration only and is applied by `paint`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PREFIX = "NgDoc:";
|
|
8
|
+
/**
|
|
9
|
+
* `0.9s`, `9.8s`, `21s`, `1m 05s`. `coarse` drops the tenths, so a redrawn line changes at most
|
|
10
|
+
* once per second because of the clock.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatDuration(ms: number, coarse?: boolean): string;
|
|
13
|
+
export declare const plural: (n: number, noun: string) => string;
|
|
14
|
+
export declare const paint: (text: string, code: number, enabled: boolean) => string;
|
|
15
|
+
export interface StepTextOptions {
|
|
16
|
+
/** Live line: `preparing: detail` and no percentage parentheses change. */
|
|
17
|
+
live?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Totals only (`rendering 664 pages`): for the one line printed when a step starts, where a
|
|
20
|
+
* count of zero would only say the step began. Live lines and heartbeats show `312/664`.
|
|
21
|
+
*/
|
|
22
|
+
totals?: boolean;
|
|
23
|
+
/** `false` leaves out the percentage, for consumers that show it on their own. */
|
|
24
|
+
percent?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** The step and its counts, without prefix or timing: `[2/4] rendering 312/664 pages (48%)`. */
|
|
27
|
+
export declare function stepText(view: GenerationView, options?: StepTextOptions): string;
|
|
28
|
+
/** Compact text for the Nx TUI and stream styles, where a pane may be about 46 columns wide. */
|
|
29
|
+
export declare function compactText(view: GenerationView, elapsedMs: number, totals?: boolean): string;
|
|
30
|
+
/**
|
|
31
|
+
* LINES mode: `NgDoc: [2/4] rendering 664 pages (35%), 6.9s elapsed` when a step starts (`totals`),
|
|
32
|
+
* `NgDoc: [2/4] rendering 312/664 pages (48%), 16s elapsed` on a heartbeat.
|
|
33
|
+
*/
|
|
34
|
+
export declare function stepLine(view: GenerationView, elapsedMs: number, totals?: boolean): string;
|
|
35
|
+
/** The first line of a LINES build: `NgDoc: generating documentation for docs (production)`. */
|
|
36
|
+
export declare function startLine(view: GenerationView, project?: string, compact?: boolean): string;
|
|
37
|
+
export interface LiveTextOptions {
|
|
38
|
+
frame: number;
|
|
39
|
+
unicode: boolean;
|
|
40
|
+
/** Terminal columns; the text never exceeds `columns - 1`, so it never wraps. */
|
|
41
|
+
columns: number;
|
|
42
|
+
/** Draw the bar when it fits (not under Nx). */
|
|
43
|
+
bar: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** `⠼ NgDoc [2/4] rendering 312/664 pages (48%) · 9.4s ━━━━━━━━──────────`. */
|
|
46
|
+
export declare function liveText(body: string, elapsedMs: number, fraction: number | undefined, options: LiveTextOptions): string;
|
|
47
|
+
/** Cuts `text` to at most `width` code points. */
|
|
48
|
+
export declare function truncate(text: string, width: number, unicode: boolean): string;
|
|
49
|
+
/** `analyze 4.7s, render 5.1s, link 2.0s, write 4.4s`, for the groups that ran. */
|
|
50
|
+
export declare function timingText(phases: ProgressSettledEvent['phases']): string;
|
|
51
|
+
/** The build summary: every build ends with exactly one line, `OK` or `FAILED`. */
|
|
52
|
+
export declare function buildSummary(event: ProgressSettledEvent, color: boolean): string;
|
|
53
|
+
/** The work an edit did: `1 of 664 pages (/route, +2)`, `664 pages`, `3 files`; `undefined` when nothing changed. */
|
|
54
|
+
export declare function editWork(event: ProgressSettledEvent): string | undefined;
|
|
55
|
+
/** `NgDoc: updated 1 of 664 pages in 0.9s (/getting-started/installation)`; `undefined` for an unchanged save. */
|
|
56
|
+
export declare function editLine(event: ProgressSettledEvent): string | undefined;
|
|
57
|
+
/** A build that succeeded after a reported failure: one line that says both. */
|
|
58
|
+
export declare const resolvedBuildLine: (event: ProgressSettledEvent, color: boolean) => string;
|
|
59
|
+
/** An edit or background run that printed a notice and was then cancelled (nothing committed). */
|
|
60
|
+
export declare const cancelledLine: (what: string, event: ProgressSettledEvent) => string;
|
|
61
|
+
/** An edit that completed without changing a page or a file. */
|
|
62
|
+
export declare const noChangesLine: (event: ProgressSettledEvent) => string;
|
|
63
|
+
/** The first success after a reported failure: `NgDoc: error resolved; updated 1 of 664 pages …`. */
|
|
64
|
+
export declare function resolvedLine(event: ProgressSettledEvent): string;
|
|
65
|
+
/** `NgDoc: update failed (1 error above); the site keeps the last good version`. */
|
|
66
|
+
export declare function editFailureLine(event: ProgressSettledEvent, what?: string): string;
|
|
67
|
+
/** The notice for an edit still running after 2 s. */
|
|
68
|
+
export declare function slowEditLine(view: GenerationView): string;
|
|
69
|
+
export declare const backgroundLabel: (trigger: ProgressTrigger) => string;
|
|
70
|
+
export declare const backgroundNotice: (trigger: ProgressTrigger) => string;
|
|
71
|
+
/** `NgDoc: checking generated files finished in 3.4s; updated 2 files`. */
|
|
72
|
+
export declare function backgroundDone(trigger: ProgressTrigger, event: ProgressSettledEvent): string;
|
|
73
|
+
export declare const activityLabel: (activity: ProgressActivityEvent["activity"]) => string;
|
|
74
|
+
export declare const activityNotice: (activity: ProgressActivityEvent["activity"]) => string;
|
|
75
|
+
export declare function activityDone(event: ProgressActivityEvent, durationMs: number): string;
|
|
76
|
+
export declare const SUPERSEDED_LINE = "NgDoc: superseded by newer changes";
|
|
77
|
+
export declare const RESTARTING_LINE = "NgDoc: inputs changed, restarting";
|
|
78
|
+
/** Verbose: `NgDoc: phases (full pass: tsconfig.json changed): boot 0.8s, discovery 0.3s, …`. */
|
|
79
|
+
export declare function phasesLine(event: ProgressSettledEvent): string | undefined;
|
|
80
|
+
/** Verbose, on a targeted → FULL restart. */
|
|
81
|
+
export declare const restartLine: (view: GenerationView) => string;
|
|
82
|
+
/** One line naming the engine switches that are set. */
|
|
83
|
+
export declare const switchesLine: (switches: readonly string[]) => string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Generation } from '../contracts.js';
|
|
2
|
+
import type { ProgressEvent } from './events.js';
|
|
3
|
+
import type { ProgressClock } from './reporter.js';
|
|
4
|
+
/**
|
|
5
|
+
* How long a settled generation waits for its host at most. Hosts release every generation whose
|
|
6
|
+
* result they handled; this bound only keeps a host that missed one from silencing progress.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SETTLE_HOLD_MS = 10000;
|
|
9
|
+
export interface SettleGateOptions {
|
|
10
|
+
clock?: ProgressClock;
|
|
11
|
+
holdMs?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Keeps a generation's result line behind the host's own output for that generation.
|
|
15
|
+
*
|
|
16
|
+
* The session reports `progress-settled` before it hands the result to the host, and the host
|
|
17
|
+
* prints the result's diagnostics after that. The gate holds each `progress-settled` event, and
|
|
18
|
+
* every event after it in order, until the host calls `release(generation)` once it has printed
|
|
19
|
+
* what it prints for that result. So `FAILED … (2 errors, see above)` follows the errors, and an
|
|
20
|
+
* edit line follows the host's own log. Order is never changed. A generation that the host
|
|
21
|
+
* released before its settle arrived passes through at once, and after `holdMs` held events are
|
|
22
|
+
* forwarded anyway. A host that could not publish a committed result releases it as failed, and
|
|
23
|
+
* its line becomes the failure line.
|
|
24
|
+
*/
|
|
25
|
+
export declare class SettleGate {
|
|
26
|
+
private readonly target;
|
|
27
|
+
private readonly queue;
|
|
28
|
+
/** Released generations, and whether the host failed to publish each. */
|
|
29
|
+
private readonly released;
|
|
30
|
+
private readonly clock;
|
|
31
|
+
private readonly holdMs;
|
|
32
|
+
private timer;
|
|
33
|
+
private disposed;
|
|
34
|
+
constructor(target: (event: ProgressEvent) => void, options?: SettleGateOptions);
|
|
35
|
+
/** The session's `onProgress`. */
|
|
36
|
+
readonly sink: (event: ProgressEvent) => void;
|
|
37
|
+
/**
|
|
38
|
+
* The host has printed its output for `generation`'s result; `failed` when it could not publish
|
|
39
|
+
* a committed result. Releasing a generation that never settles (a reused result, a generation
|
|
40
|
+
* without progress) is harmless.
|
|
41
|
+
*/
|
|
42
|
+
release(generation: Generation, failed?: boolean): void;
|
|
43
|
+
/** Forwards everything still held, then stops. */
|
|
44
|
+
dispose(): void;
|
|
45
|
+
private flush;
|
|
46
|
+
private expire;
|
|
47
|
+
private forward;
|
|
48
|
+
private cancelTimer;
|
|
49
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Generation } from '../contracts.js';
|
|
2
|
+
import type { ProgressEvent, ProgressSink } from './events.js';
|
|
3
|
+
import type { ForeignMode, ProgressReporter, ProgressReporterOptions } from './reporter.js';
|
|
4
|
+
export interface HostProgressOptions extends ProgressReporterOptions {
|
|
5
|
+
/** Another consumer the host was given (`SessionOptions.onProgress`); it receives every event. */
|
|
6
|
+
forward?: ProgressSink;
|
|
7
|
+
/**
|
|
8
|
+
* The host's warning channel. When the writer throws, progress stops and this receives one
|
|
9
|
+
* `[SESSION_PROGRESS_FAILED] …` line; its own failures are contained.
|
|
10
|
+
*/
|
|
11
|
+
warn?: (message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A host's progress: the reporter behind a {@link SettleGate}. The host passes `sink` as the
|
|
15
|
+
* session's `onProgress`, calls `release(generation)` once it has printed a result's own output
|
|
16
|
+
* (its diagnostics), and `setForeign` once another writer shares the terminal.
|
|
17
|
+
*/
|
|
18
|
+
export interface HostProgress {
|
|
19
|
+
readonly reporter: ProgressReporter;
|
|
20
|
+
readonly sink: (event: ProgressEvent) => void;
|
|
21
|
+
/** `failed`: the host could not publish the result; its line becomes the failure line. */
|
|
22
|
+
release(generation: Generation, failed?: boolean): void;
|
|
23
|
+
/** Clears the live line before the host prints its own output (see `ProgressReporter.interrupt`). */
|
|
24
|
+
interrupt(): void;
|
|
25
|
+
setForeign(mode?: ForeignMode): void;
|
|
26
|
+
/** Prints what is still held, then clears the live line and stops. */
|
|
27
|
+
dispose(): void;
|
|
28
|
+
}
|
|
29
|
+
export declare function createHostProgress(options: HostProgressOptions): HostProgress;
|