@ng-doc/builder 22.0.0-beta.2 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/README.md +19 -28
  2. package/application/index.js +2 -2
  3. package/application/index.js.map +1 -1
  4. package/application/schema.json +1 -2
  5. package/builders.json +23 -13
  6. package/classes/observable-map.d.ts +1 -0
  7. package/classes/observable-map.js +14 -3
  8. package/classes/observable-map.js.map +1 -1
  9. package/classes/observable-set.js +2 -1
  10. package/classes/observable-set.js.map +1 -1
  11. package/dev-server/index.js +5 -3
  12. package/dev-server/index.js.map +1 -1
  13. package/engine/builders/api-list/api-list-component.builder.js +4 -4
  14. package/engine/builders/api-list/api-list-component.builder.js.map +1 -1
  15. package/engine/builders/api-list/api-page-template.builder.js +2 -2
  16. package/engine/builders/api-list/api-page-template.builder.js.map +1 -1
  17. package/engine/builders/global/keywords.builder.d.ts +1 -4
  18. package/engine/builders/global/keywords.builder.js +5 -9
  19. package/engine/builders/global/keywords.builder.js.map +1 -1
  20. package/engine/builders/global/search-indexes.builder.js +1 -1
  21. package/engine/builders/global/search-indexes.builder.js.map +1 -1
  22. package/engine/builders/helpers/create-entry-metadata.js +2 -1
  23. package/engine/builders/helpers/create-entry-metadata.js.map +1 -1
  24. package/engine/builders/helpers/create-import-path.js.map +1 -1
  25. package/engine/builders/helpers/get-entry-relative-path.js.map +1 -1
  26. package/engine/builders/helpers/get-playground-metadata.js +7 -1
  27. package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
  28. package/engine/builders/page/demo-assets.builder.js +10 -5
  29. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  30. package/engine/builders/page/playground.builder.js +1 -0
  31. package/engine/builders/page/playground.builder.js.map +1 -1
  32. package/engine/builders/shared/content.builder.js +5 -3
  33. package/engine/builders/shared/content.builder.js.map +1 -1
  34. package/engine/builders/shared/page-component.builder.js +16 -6
  35. package/engine/builders/shared/page-component.builder.js.map +1 -1
  36. package/engine/builders/shared/page-wrapper.builder.js +10 -5
  37. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  38. package/engine/core/operators/distinct-pending.js.map +1 -1
  39. package/engine/core/operators/factory.js +1 -4
  40. package/engine/core/operators/factory.js.map +1 -1
  41. package/engine/core/operators/merge-factory.js +19 -17
  42. package/engine/core/operators/merge-factory.js.map +1 -1
  43. package/engine/core/operators/when-builders-done.js.map +1 -1
  44. package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
  45. package/engine/core/triggers/on-dependencies-change.js +2 -2
  46. package/engine/core/triggers/on-dependencies-change.js.map +1 -1
  47. package/generator/artifacts/index.d.ts +317 -0
  48. package/generator/bootstrap/bin.d.ts +18 -0
  49. package/generator/bootstrap/bin.js +7298 -0
  50. package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
  51. package/generator/bootstrap/cli.d.ts +42 -0
  52. package/generator/bootstrap/cli.js +7147 -0
  53. package/generator/bootstrap/constants.d.ts +4 -0
  54. package/generator/bootstrap/index.d.ts +111 -0
  55. package/generator/bootstrap/index.js +5034 -0
  56. package/generator/bootstrap/prerender-command.d.ts +31 -0
  57. package/generator/bootstrap/process-tree.d.ts +49 -0
  58. package/generator/build-metafile.json +12009 -0
  59. package/generator/build-provenance.json +121 -0
  60. package/generator/compiler/assemble.d.ts +41 -0
  61. package/generator/compiler/classify.d.ts +161 -0
  62. package/generator/compiler/closure-store.d.ts +55 -0
  63. package/generator/compiler/common.d.ts +32 -0
  64. package/generator/compiler/describe.d.ts +21 -0
  65. package/generator/compiler/dry-run.d.ts +108 -0
  66. package/generator/compiler/fast-start.d.ts +104 -0
  67. package/generator/compiler/fold.d.ts +116 -0
  68. package/generator/compiler/index.d.ts +131 -0
  69. package/generator/compiler/index.js +19009 -0
  70. package/generator/compiler/link.d.ts +38 -0
  71. package/generator/compiler/memo.d.ts +44 -0
  72. package/generator/compiler/plan.d.ts +116 -0
  73. package/generator/compiler/progress.d.ts +54 -0
  74. package/generator/compiler/render.d.ts +27 -0
  75. package/generator/compiler/retention.d.ts +181 -0
  76. package/generator/compiler/semantic-closure.d.ts +46 -0
  77. package/generator/compiler/targeted.d.ts +280 -0
  78. package/generator/content/code-snippet.d.ts +20 -0
  79. package/generator/content/content-compiler.d.ts +122 -0
  80. package/generator/content/format-cache.d.ts +108 -0
  81. package/generator/content/highlight-cache.d.ts +115 -0
  82. package/generator/content/html-pipeline.d.ts +179 -0
  83. package/generator/content/html-pool.d.ts +245 -0
  84. package/generator/content/html-worker.js +2181 -0
  85. package/generator/content-module-ids.d.ts +8 -0
  86. package/generator/contracts.d.ts +1102 -0
  87. package/generator/contracts.js +15 -0
  88. package/generator/discovery/index.d.ts +79 -0
  89. package/generator/graph/index.d.ts +211 -0
  90. package/generator/graph/unit-index.d.ts +216 -0
  91. package/generator/kernel/canonical.d.ts +57 -0
  92. package/generator/kernel/flags.d.ts +51 -0
  93. package/generator/kernel/footprint.d.ts +88 -0
  94. package/generator/kernel/observations.d.ts +68 -0
  95. package/generator/kernel/paths.d.ts +22 -0
  96. package/generator/kernel/runtime-identity.d.ts +11 -0
  97. package/generator/outputs/index.d.ts +80 -0
  98. package/generator/package.json +3 -0
  99. package/generator/progress/ci.d.ts +22 -0
  100. package/generator/progress/detect.d.ts +60 -0
  101. package/generator/progress/events.d.ts +126 -0
  102. package/generator/progress/format.d.ts +83 -0
  103. package/generator/progress/gate.d.ts +49 -0
  104. package/generator/progress/host.d.ts +29 -0
  105. package/generator/progress/lines.d.ts +42 -0
  106. package/generator/progress/live.d.ts +115 -0
  107. package/generator/progress/model.d.ts +85 -0
  108. package/generator/progress/reporter.d.ts +87 -0
  109. package/generator/progress/settings.d.ts +60 -0
  110. package/generator/semantic/angular.d.ts +29 -0
  111. package/generator/semantic/api-enumeration.d.ts +19 -0
  112. package/generator/semantic/api-summary.d.ts +33 -0
  113. package/generator/semantic/dependencies.d.ts +20 -0
  114. package/generator/semantic/derived-classes.d.ts +58 -0
  115. package/generator/semantic/documentation-cache.d.ts +23 -0
  116. package/generator/semantic/formatting.d.ts +27 -0
  117. package/generator/semantic/fragments.d.ts +37 -0
  118. package/generator/semantic/owned-roots.d.ts +59 -0
  119. package/generator/semantic/program-builder.d.ts +55 -0
  120. package/generator/semantic/program-index.d.ts +124 -0
  121. package/generator/semantic/program-inputs.d.ts +26 -0
  122. package/generator/semantic/program-observations.d.ts +158 -0
  123. package/generator/semantic/program-retention.d.ts +147 -0
  124. package/generator/semantic/program-state.d.ts +196 -0
  125. package/generator/semantic/program-verify.d.ts +22 -0
  126. package/generator/semantic/recorder.d.ts +89 -0
  127. package/generator/semantic/rendering.d.ts +34 -0
  128. package/generator/semantic/semantic-closure.d.ts +129 -0
  129. package/generator/semantic/semantic-service.d.ts +186 -0
  130. package/generator/semantic/type-text.d.ts +5 -0
  131. package/generator/session/build-session.d.ts +206 -0
  132. package/generator/session/input-verification.d.ts +38 -0
  133. package/generator/session/parcel-event-source.d.ts +22 -0
  134. package/generator/session/progress.d.ts +72 -0
  135. package/generator/session/unchanged-saves.d.ts +63 -0
  136. package/generator/session/watch-inputs.d.ts +6 -0
  137. package/generator/session/watch-signals.d.ts +10 -0
  138. package/generator/templates/api/base.html.nunj +26 -0
  139. package/generator/templates/api/class-declaration.html.nunj +59 -0
  140. package/generator/templates/api/details/class-declaration.html.nunj +47 -0
  141. package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
  142. package/generator/templates/api/details/function-declaration.html.nunj +14 -0
  143. package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
  144. package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
  145. package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
  146. package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
  147. package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
  148. package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
  149. package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
  150. package/generator/templates/api/details.html.nunj +9 -0
  151. package/generator/templates/api/enum-declaration.html.nunj +12 -0
  152. package/generator/templates/api/function-declaration.html.nunj +35 -0
  153. package/generator/templates/api/interface-declaration.html.nunj +37 -0
  154. package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
  155. package/generator/templates/api/variable-declaration.html.nunj +8 -0
  156. package/generator/templates/api-header.html.nunj +11 -0
  157. package/generator/templates/api-list.ts.nunj +22 -0
  158. package/generator/templates/api-page-content.html.nunj +1 -0
  159. package/generator/templates/api-scope.ts.nunj +22 -0
  160. package/generator/templates/category.ts.nunj +22 -0
  161. package/generator/templates/code.html.nunj +3 -0
  162. package/generator/templates/context.ts.nunj +55 -0
  163. package/generator/templates/demo-app.ts.nunj +37 -0
  164. package/generator/templates/demo-assets.ts.nunj +25 -0
  165. package/generator/templates/demo-routes.ts.nunj +23 -0
  166. package/generator/templates/helpers/accessor.html.nunj +76 -0
  167. package/generator/templates/helpers/accessors.html.nunj +7 -0
  168. package/generator/templates/helpers/badge.html.nunj +4 -0
  169. package/generator/templates/helpers/call-signature.html.nunj +70 -0
  170. package/generator/templates/helpers/code.html.nunj +3 -0
  171. package/generator/templates/helpers/constructor.html.nunj +32 -0
  172. package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
  173. package/generator/templates/helpers/decorators.html.nunj +11 -0
  174. package/generator/templates/helpers/members.html.nunj +29 -0
  175. package/generator/templates/helpers/method.html.nunj +89 -0
  176. package/generator/templates/helpers/methods.html.nunj +7 -0
  177. package/generator/templates/helpers/modifier.html.nunj +4 -0
  178. package/generator/templates/helpers/no-content.html.nunj +3 -0
  179. package/generator/templates/helpers/overload.html.nunj +57 -0
  180. package/generator/templates/helpers/parameters.html.nunj +44 -0
  181. package/generator/templates/helpers/properties.html.nunj +61 -0
  182. package/generator/templates/helpers/status.html.nunj +33 -0
  183. package/generator/templates/helpers/tag.html.nunj +4 -0
  184. package/generator/templates/helpers/type.html.nunj +11 -0
  185. package/generator/templates/index.ts.nunj +7 -0
  186. package/generator/templates/page-header.html.nunj +5 -0
  187. package/generator/templates/page-wrapper.ts.nunj +69 -0
  188. package/generator/templates/page.ts.nunj +104 -0
  189. package/generator/templates/parts/examples.html.nunj +11 -0
  190. package/generator/templates/parts/member-examples.html.nunj +12 -0
  191. package/generator/templates/parts/member-remarks.html.nunj +8 -0
  192. package/generator/templates/parts/page-tags.html.nunj +10 -0
  193. package/generator/templates/parts/remarks.html.nunj +10 -0
  194. package/generator/templates/parts/see-also.html.nunj +23 -0
  195. package/generator/templates/parts/usage-notes.html.nunj +8 -0
  196. package/generator/templates/playgrounds.ts.nunj +63 -0
  197. package/generator/templates/routes.ts.nunj +53 -0
  198. package/generator/templates/symbol/decorators.html.nunj +12 -0
  199. package/generator/templates/symbol/details.html.nunj +62 -0
  200. package/generator/templates/symbol/extended-by.html.nunj +17 -0
  201. package/generator/templates/symbol/header.html.nunj +22 -0
  202. package/generator/templates/symbol/members.html.nunj +303 -0
  203. package/generator/templates/symbol/page.html.nunj +76 -0
  204. package/generator/templates/symbol/see-also.html.nunj +16 -0
  205. package/generator/vite/angular/ANALOG-LICENSE +21 -0
  206. package/generator/vite/angular/analog-provenance.json +880 -0
  207. package/generator/vite/angular/index.d.ts +14 -0
  208. package/generator/vite/angular/index.js +7300 -0
  209. package/generator/vite/angular-compatibility.d.ts +6 -0
  210. package/generator/vite/angular-composition.d.ts +68 -0
  211. package/generator/vite/angular-version.d.ts +38 -0
  212. package/generator/vite/application-builder.js +336 -0
  213. package/generator/vite/application-builder.schema.json +46 -0
  214. package/generator/vite/application.d.ts +105 -0
  215. package/generator/vite/assets.d.ts +11 -0
  216. package/generator/vite/bounded-close.d.ts +33 -0
  217. package/generator/vite/component-updates.d.ts +21 -0
  218. package/generator/vite/configuration.d.ts +3 -0
  219. package/generator/vite/demo-application.d.ts +34 -0
  220. package/generator/vite/dev-server-builder.js +339 -0
  221. package/generator/vite/dev-server-builder.schema.json +27 -0
  222. package/generator/vite/dev-styles.d.ts +65 -0
  223. package/generator/vite/diagnostics.d.ts +4 -0
  224. package/generator/vite/external-probes.d.ts +40 -0
  225. package/generator/vite/host-updates.d.ts +212 -0
  226. package/generator/vite/index.d.ts +13 -0
  227. package/generator/vite/index.js +11949 -0
  228. package/generator/vite/lease.d.ts +6 -0
  229. package/generator/vite/lifecycle.d.ts +120 -0
  230. package/generator/vite/mime.d.ts +2 -0
  231. package/generator/vite/missing-paths.d.ts +44 -0
  232. package/generator/vite/options.d.ts +87 -0
  233. package/generator/vite/output-watch.d.ts +41 -0
  234. package/generator/vite/paths.d.ts +7 -0
  235. package/generator/vite/plugin.d.ts +3 -0
  236. package/generator/vite/prerender-entry.js +465 -0
  237. package/generator/vite/prerender-runtime.d.ts +79 -0
  238. package/generator/vite/prerender.d.ts +29 -0
  239. package/generator/vite/production.d.ts +66 -0
  240. package/generator/vite/progress.d.ts +33 -0
  241. package/generator/vite/restore-theme.js +13 -0
  242. package/generator/vite/route-inventory.d.ts +24 -0
  243. package/generator/vite/ssr-renderer-control.d.ts +1 -0
  244. package/generator/vite/ssr-renderer-entry.js +444 -0
  245. package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
  246. package/generator/vite/ssr-renderer.d.ts +74 -0
  247. package/generator/vite/theme-index.d.ts +13 -0
  248. package/generator/vite/tsconfig-paths.d.ts +64 -0
  249. package/generator/vite/vite-event-source.d.ts +198 -0
  250. package/generator/vite/vite-version.d.ts +26 -0
  251. package/generator/vite/watch-inputs.d.ts +39 -0
  252. package/generator/worker/entry.d.ts +1 -0
  253. package/generator/worker/entry.js +614 -0
  254. package/generator/worker/index.d.ts +156 -0
  255. package/generator/worker/index.js +1030 -0
  256. package/generator/worker/protocol.d.ts +160 -0
  257. package/helpers/angular/get-component-decorator.js +6 -6
  258. package/helpers/angular/get-component-decorator.js.map +1 -1
  259. package/helpers/angular/get-directive-decorator.js +3 -3
  260. package/helpers/angular/get-directive-decorator.js.map +1 -1
  261. package/helpers/angular/get-pipe-decorator.js +3 -3
  262. package/helpers/angular/get-pipe-decorator.js.map +1 -1
  263. package/helpers/build-indexes.js +5 -2
  264. package/helpers/build-indexes.js.map +1 -1
  265. package/helpers/construct-page-keyword.js +2 -1
  266. package/helpers/construct-page-keyword.js.map +1 -1
  267. package/helpers/extract-selectors.d.ts +1 -1
  268. package/helpers/extract-selectors.js +5 -3
  269. package/helpers/extract-selectors.js.map +1 -1
  270. package/helpers/filter-useless-members.d.ts +1 -1
  271. package/helpers/format-cache.d.ts +34 -0
  272. package/helpers/format-cache.js +26 -0
  273. package/helpers/format-cache.js.map +1 -0
  274. package/helpers/format-code.d.ts +2 -1
  275. package/helpers/format-code.js +20 -4
  276. package/helpers/format-code.js.map +1 -1
  277. package/helpers/import-fresh-esm.js.map +1 -1
  278. package/helpers/index.d.ts +2 -0
  279. package/helpers/index.js +2 -0
  280. package/helpers/index.js.map +1 -1
  281. package/helpers/keyword-heading-title.d.ts +7 -0
  282. package/helpers/keyword-heading-title.js +21 -0
  283. package/helpers/keyword-heading-title.js.map +1 -0
  284. package/helpers/markdown-to-html.js +3 -3
  285. package/helpers/markdown-to-html.js.map +1 -1
  286. package/helpers/navigation-title-order.d.ts +8 -0
  287. package/helpers/navigation-title-order.js +15 -0
  288. package/helpers/navigation-title-order.js.map +1 -0
  289. package/helpers/playground/get-playground-inputs.js +8 -4
  290. package/helpers/playground/get-playground-inputs.js.map +1 -1
  291. package/helpers/playground/get-playground-template-inputs.js +2 -1
  292. package/helpers/playground/get-playground-template-inputs.js.map +1 -1
  293. package/helpers/presentation.d.ts +7 -7
  294. package/helpers/presentation.js +23 -23
  295. package/helpers/presentation.js.map +1 -1
  296. package/helpers/print.js +32 -5
  297. package/helpers/print.js.map +1 -1
  298. package/helpers/process-snippets.d.ts +1 -1
  299. package/helpers/process-snippets.js +3 -3
  300. package/helpers/process-snippets.js.map +1 -1
  301. package/helpers/snippets-from-asset.d.ts +1 -1
  302. package/helpers/snippets-from-asset.js +2 -2
  303. package/helpers/snippets-from-asset.js.map +1 -1
  304. package/helpers/sort-navigation-entities.js +2 -1
  305. package/helpers/sort-navigation-entities.js.map +1 -1
  306. package/helpers/stable-generated-id.d.ts +2 -0
  307. package/helpers/stable-generated-id.js +12 -0
  308. package/helpers/stable-generated-id.js.map +1 -0
  309. package/helpers/text-order.d.ts +8 -0
  310. package/helpers/text-order.js +26 -0
  311. package/helpers/text-order.js.map +1 -0
  312. package/helpers/to-template-string.d.ts +5 -1
  313. package/helpers/to-template-string.js +7 -2
  314. package/helpers/to-template-string.js.map +1 -1
  315. package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
  316. package/helpers/typescript/member/get-inherited-parent.js +2 -2
  317. package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
  318. package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
  319. package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
  320. package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
  321. package/helpers/typescript/property/get-property-assignment.js.map +1 -1
  322. package/interfaces/code-block-options.d.ts +5 -0
  323. package/interfaces/configuration.d.ts +84 -1
  324. package/package.json +87 -29
  325. package/parsers/helpers/number.d.ts +1 -1
  326. package/parsers/helpers/number.js +2 -2
  327. package/parsers/helpers/number.js.map +1 -1
  328. package/parsers/helpers/param-value.d.ts +1 -1
  329. package/parsers/helpers/param-value.js +2 -2
  330. package/parsers/helpers/param-value.js.map +1 -1
  331. package/parsers/helpers/param.js +3 -3
  332. package/parsers/helpers/param.js.map +1 -1
  333. package/parsers/parse-code-block-params.d.ts +11 -2
  334. package/parsers/parse-code-block-params.js +50 -18
  335. package/parsers/parse-code-block-params.js.map +1 -1
  336. package/parsers/parse-snippet.js +10 -10
  337. package/parsers/parse-snippet.js.map +1 -1
  338. package/schematics/collection.json +34 -23
  339. package/schematics/migrate-to-vite/analyze.d.ts +76 -0
  340. package/schematics/migrate-to-vite/analyze.js +859 -0
  341. package/schematics/migrate-to-vite/analyze.js.map +1 -0
  342. package/schematics/migrate-to-vite/index.d.ts +9 -0
  343. package/schematics/migrate-to-vite/index.js +585 -0
  344. package/schematics/migrate-to-vite/index.js.map +1 -0
  345. package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
  346. package/schematics/migrate-to-vite/legacy-folder.js +340 -0
  347. package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
  348. package/schematics/migrate-to-vite/report.d.ts +32 -0
  349. package/schematics/migrate-to-vite/report.js +97 -0
  350. package/schematics/migrate-to-vite/report.js.map +1 -0
  351. package/schematics/migrate-to-vite/schema.d.ts +13 -0
  352. package/schematics/migrate-to-vite/schema.js +3 -0
  353. package/schematics/migrate-to-vite/schema.js.map +1 -0
  354. package/schematics/migrate-to-vite/schema.json +31 -0
  355. package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
  356. package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
  357. package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
  358. package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
  359. package/schematics/migrate-to-vite/setup/index.js +13 -0
  360. package/schematics/migrate-to-vite/setup/index.js.map +1 -0
  361. package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
  362. package/schematics/migrate-to-vite/setup/json-file.js +115 -0
  363. package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
  364. package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
  365. package/schematics/migrate-to-vite/setup/source.js +202 -0
  366. package/schematics/migrate-to-vite/setup/source.js.map +1 -0
  367. package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
  368. package/schematics/migrate-to-vite/setup/targets.js +48 -0
  369. package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
  370. package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
  371. package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
  372. package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
  373. package/schematics/migrate-to-vite/setup/workspace.d.ts +105 -0
  374. package/schematics/migrate-to-vite/setup/workspace.js +245 -0
  375. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
  376. package/schematics/migrate-to-vite/state.d.ts +65 -0
  377. package/schematics/migrate-to-vite/state.js +92 -0
  378. package/schematics/migrate-to-vite/state.js.map +1 -0
  379. package/schematics/migrate-to-vite/testing/fixtures.d.ts +30 -0
  380. package/schematics/migrate-to-vite/testing/fixtures.js +306 -0
  381. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
  382. package/schematics/migrate-to-vite/update-note.d.ts +6 -0
  383. package/schematics/migrate-to-vite/update-note.js +23 -0
  384. package/schematics/migrate-to-vite/update-note.js.map +1 -0
  385. package/schematics/migration.json +5 -0
  386. package/schematics/migrations/standalone-pages/index.js +7 -6
  387. package/schematics/migrations/standalone-pages/index.js.map +1 -1
  388. package/schematics/vite-setup/index.d.ts +24 -0
  389. package/schematics/vite-setup/index.js +212 -0
  390. package/schematics/vite-setup/index.js.map +1 -0
  391. package/schematics/vite-setup/schema.d.ts +7 -0
  392. package/schematics/vite-setup/schema.js +3 -0
  393. package/schematics/vite-setup/schema.js.map +1 -0
  394. package/schematics/vite-setup/schema.json +19 -0
  395. package/scripts/restore-theme.js +9 -2
  396. package/templates/api/class-declaration.html.nunj +5 -3
  397. package/templates/context.ts.nunj +3 -0
  398. package/templates/demo-app.ts.nunj +37 -0
  399. package/templates/demo-routes.ts.nunj +23 -0
  400. package/templates/helpers/badge.html.nunj +1 -1
  401. package/templates/helpers/status.html.nunj +4 -8
  402. package/templates/index.ts.nunj +5 -0
  403. package/templates/page-wrapper.ts.nunj +30 -2
  404. package/templates/page.ts.nunj +33 -1
  405. package/templates/parts/page-tags.html.nunj +1 -1
  406. package/templates/playgrounds.ts.nunj +8 -9
  407. package/templates/routes.ts.nunj +10 -1
  408. package/templates/symbol/decorators.html.nunj +12 -0
  409. package/templates/symbol/details.html.nunj +62 -0
  410. package/templates/symbol/extended-by.html.nunj +17 -0
  411. package/templates/symbol/header.html.nunj +22 -0
  412. package/templates/symbol/members.html.nunj +303 -0
  413. package/templates/symbol/page.html.nunj +76 -0
  414. package/templates/symbol/see-also.html.nunj +16 -0
  415. package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
  416. package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
  417. package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
  418. package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
  419. package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
  420. package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
  421. package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
  422. package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
  423. package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
  424. package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
  425. package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
  426. package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
  427. package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
  428. package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
  429. package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
  430. package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
  431. package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
  432. package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
  433. package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
  434. package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
  435. package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
  436. package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
  437. package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
  438. package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
  439. package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
  440. package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
  441. package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
@@ -0,0 +1,121 @@
1
+ {
2
+ "compilerVersion": "0.0.1",
3
+ "toolchainDigest": "d3b66d41f47865fb003a881897f703f6b49568eefa8f301d410768b97f5647e2",
4
+ "sourceDigest": "1a038ca999385c919ea565f867343af2f42f244061951c14649d551b1082c31d",
5
+ "lockfileDigest": "de382fb15a8f808000ec7fba99c68f6b8329faa07755202f04ac25d0f1c8ef64",
6
+ "tuple": {
7
+ "@angular-devkit/architect": "0.2202.1",
8
+ "@angular-devkit/core": "22.2.1",
9
+ "@microsoft/tsdoc": "0.15.1",
10
+ "@ng-doc/core": "0.0.0",
11
+ "@ng-doc/utils": "0.0.0",
12
+ "@orama/orama": "2.0.17",
13
+ "@orama/plugin-parsedoc": "2.0.17",
14
+ "@parcel/watcher": "2.6.0",
15
+ "@prettier/sync": "0.5.2",
16
+ "@shikijs/rehype": "4.5.0",
17
+ "cosmiconfig": "8.2.0",
18
+ "cosmiconfig-typescript-loader": "5.0.0",
19
+ "css-what": "6.1.0",
20
+ "esbuild": "0.27.2",
21
+ "fast-glob": "3.3.3",
22
+ "find-cache-dir": "3.3.2",
23
+ "github-slugger": "2.0.0",
24
+ "gray-matter": "4.0.3",
25
+ "hast-util-has-property": "3.0.0",
26
+ "hast-util-heading-rank": "3.0.0",
27
+ "hast-util-is-element": "3.0.0",
28
+ "hast-util-to-string": "3.0.0",
29
+ "jsonc-parser": "3.3.1",
30
+ "magic-string": "0.30.21",
31
+ "marked": "12.0.1",
32
+ "minimatch": "9.0.9",
33
+ "ng-morph": "4.9.0",
34
+ "nunjucks": "3.2.4",
35
+ "obug": "2.1.3",
36
+ "oxc-parser": "0.121.0",
37
+ "parsimmon": "1.18.1",
38
+ "posthtml-parser": "0.11.0",
39
+ "posthtml-render": "3.0.0",
40
+ "prettier": "3.2.5",
41
+ "rehype": "13.0.1",
42
+ "rehype-minify-whitespace": "6.0.0",
43
+ "rehype-parse": "9.0.0",
44
+ "rehype-stringify": "10.0.1",
45
+ "rxjs": "7.8.2",
46
+ "shiki": "4.5.0",
47
+ "stringify-entities": "4.0.4",
48
+ "tinyglobby": "0.2.17",
49
+ "ts-morph": "28.0.0",
50
+ "tslib": "2.8.1",
51
+ "typescript": "6.0.3",
52
+ "unified": "11.0.5",
53
+ "unist-util-filter": "5.0.1",
54
+ "unist-util-visit": "5.0.0",
55
+ "unist-util-visit-parents": "6.0.2"
56
+ },
57
+ "runtimeExternals": [
58
+ "@angular-devkit/architect",
59
+ "@angular/compiler",
60
+ "@angular/compiler-cli",
61
+ "@microsoft/tsdoc",
62
+ "@orama/plugin-parsedoc",
63
+ "@parcel/watcher",
64
+ "@prettier/sync",
65
+ "@shikijs/rehype",
66
+ "css-what",
67
+ "esbuild",
68
+ "fast-glob",
69
+ "github-slugger",
70
+ "gray-matter",
71
+ "hast-util-has-property",
72
+ "hast-util-heading-rank",
73
+ "hast-util-is-element",
74
+ "hast-util-to-string",
75
+ "magic-string",
76
+ "marked",
77
+ "minimatch",
78
+ "nunjucks",
79
+ "obug",
80
+ "oxc-parser",
81
+ "parsimmon",
82
+ "posthtml-parser",
83
+ "posthtml-render",
84
+ "rehype",
85
+ "rehype-minify-whitespace",
86
+ "rehype-parse",
87
+ "rehype-stringify",
88
+ "rxjs",
89
+ "shiki",
90
+ "stringify-entities",
91
+ "tinyglobby",
92
+ "ts-morph",
93
+ "typescript",
94
+ "unified",
95
+ "unist-util-filter",
96
+ "unist-util-visit",
97
+ "unist-util-visit-parents",
98
+ "vite"
99
+ ],
100
+ "angularCompatibility": {
101
+ "format": "ng-doc-analog-2.8.0-resources-v1",
102
+ "upstream": {
103
+ "name": "@analogjs/vite-plugin-angular",
104
+ "version": "2.8.0",
105
+ "license": "MIT"
106
+ },
107
+ "sourceInventorySha256": "59d7bbf119ca438674d11d3e1123b589f238d0d03ff34de9e46b284e0b7d0dc7",
108
+ "patchedSources": [
109
+ {
110
+ "path": "lib/angular-vite-plugin.js",
111
+ "sha256": "0d60401c25875de0aa06aeb991b8e27324f40cb51403dc061cc1c07db47fee5f",
112
+ "patchedSha256": "8a4b18a6ca06183a483b324d61b9d49863556ffeab0ff02f10253a187ead403e"
113
+ },
114
+ {
115
+ "path": "lib/encapsulate-component-styles-plugin.js",
116
+ "sha256": "6dd369d15c54ed8070eb10d3876bdf2b4e8ceb60be39275c7acd497c50a7c1d0",
117
+ "patchedSha256": "03c38e8443e7c41ab49f035d88fd7560f98acffbc1c212b7957fe82f5294a64d"
118
+ }
119
+ ]
120
+ }
121
+ }
@@ -0,0 +1,41 @@
1
+ import type { ArtifactSnapshot, DiscoverySnapshot, PageArtifact } from '../contracts.js';
2
+ import { type Unit } from './common.js';
3
+ import type { KeywordPlan, LinkOutcome } from './link.js';
4
+ import { type GenerationPlan } from './plan.js';
5
+ import type { ReplayScope } from './targeted.js';
6
+ /** `whyRebuilt` of previous owners that discovery no longer produces. */
7
+ export declare function recordRemovedOwners(plan: GenerationPlan, units: Unit[]): void;
8
+ /**
9
+ * Assembly phase: per unit its outputs, routes and API list (from the assembly memo when it
10
+ * provably holds), then the artifact with its revision (the previous one when value-equal) and
11
+ * its `whyRebuilt` reasons.
12
+ *
13
+ * On the targeted path (`scope`), a replayed unit outside the link set is not assembled again:
14
+ * its assembly inputs (entry, declaration, descriptors, semantics, metadata, linked content and
15
+ * the output templates) are those of its previous page, so the assembler would return that page's
16
+ * outputs, routes and API list, and its retained record holds what assembling emitted. A settled
17
+ * unit (its previous artifact was already built from the reuse projection) keeps that artifact;
18
+ * any other still gets its artifact and revision computed here, exactly as below.
19
+ */
20
+ export declare function assembleUnits(plan: GenerationPlan, units: Unit[], linked: LinkOutcome, scope?: ReplayScope): PageArtifact[];
21
+ /** The site-wide outputs of the assembled pages. */
22
+ export interface SiteAggregate {
23
+ outputs: PageArtifact['outputs'];
24
+ }
25
+ /** Aggregate phase: the global outputs (routes, context, indexes, keywords). */
26
+ export declare function aggregateUnits(plan: GenerationPlan, artifacts: PageArtifact[], keywordPlan: KeywordPlan): SiteAggregate;
27
+ /**
28
+ * The candidate snapshot: appends the aggregate artifact to `artifacts`, reports outputs of
29
+ * unchanged owners that are missing on disk, and validates the semantic scope references.
30
+ */
31
+ export declare function candidateSnapshot(plan: GenerationPlan, artifacts: PageArtifact[], keywordPlan: KeywordPlan, site: SiteAggregate): ArtifactSnapshot;
32
+ /**
33
+ * The snapshot of a generation's artifacts (the aggregate last) and its discovery: what a
34
+ * generation publishes, and what the fast start restores from the cache (`./fast-start`).
35
+ */
36
+ export declare function snapshotOf(projectId: string, found: DiscoverySnapshot, artifacts: PageArtifact[]): ArtifactSnapshot;
37
+ /**
38
+ * Writes the artifact cache (skipping entries the memo proves current) and its index. `unchanged`:
39
+ * the targeted path's unchanged artifacts, whose cache facts the memo already carries.
40
+ */
41
+ export declare function writeCache(plan: GenerationPlan, artifacts: PageArtifact[], unchanged?: (artifact: PageArtifact) => boolean): Promise<void>;
@@ -0,0 +1,161 @@
1
+ import type { EntryDescriptor, FileChange, KeywordExport } from '../contracts.js';
2
+ import { type UnitIndex } from '../graph/unit-index.js';
3
+ /**
4
+ * The change classifier and the affected closure of the targeted rebuild. Pure functions over a
5
+ * committed build's {@link UnitIndex}: the targeted path (`./targeted`) goes FULL on anything they
6
+ * do not classify as content, an evaluated entry input, a program input or a structural change it
7
+ * can scope (see {@link classifyChanges}), and `verify` checks their closure against the full
8
+ * generation.
9
+ */
10
+ export type ChangeClass = 'config-toolchain' | 'structural' | 'entry' | 'semantic' | 'content' | 'unknown';
11
+ export interface PathClassification {
12
+ path: string;
13
+ /** The event kind as reported; ignored by the classification (see `classifyPath`). */
14
+ kind: FileChange['kind'];
15
+ class: ChangeClass;
16
+ detail: string;
17
+ /** An `entry` or `semantic` path that is an input of the TypeScript program. */
18
+ program?: true;
19
+ /**
20
+ * A structural (or unknown) path the structural class may scope: it moves the entry set, a
21
+ * discovery or program glob, or the program's file set, which a targeted generation observes
22
+ * again in full (discovery, the program's root membership, the entry diff), never a
23
+ * content-level glob. An unknown path must be read by the generation's fresh discovery, program
24
+ * or rebuilt units (`PathPass.unknown`).
25
+ */
26
+ scoped?: true;
27
+ }
28
+ export interface PathPass {
29
+ classes: PathClassification[];
30
+ /** Why the generation must be FULL, or undefined when every path may be targeted. */
31
+ full?: string;
32
+ /**
33
+ * Set when the candidates exceed the dirty threshold. A performance rule, not a correctness
34
+ * one: a targeted generation that large would cost about as much as a full one, so it runs in
35
+ * full; the dry run still checks the closure.
36
+ */
37
+ threshold?: string;
38
+ /** Candidate units (owner IDs) and descriptor/IR IDs. */
39
+ units: Set<string>;
40
+ descriptors: Set<string>;
41
+ /**
42
+ * Unknown paths a targeted attempt takes (the structural class): each must be read by this
43
+ * generation's discovery, its program or a unit it rebuilds, or the generation runs FULL.
44
+ */
45
+ unknown: string[];
46
+ /**
47
+ * Whether a generation may keep its keyword loaders' last results instead of running them:
48
+ * the preconditions hold and every path may be targeted (no path is config/toolchain,
49
+ * structural or unknown). The loaders and the files they import are configuration inputs, so a
50
+ * targeted path never reaches them; and a generation that then publishes anything but a targeted
51
+ * result runs discovery again without the pin. It must be decided before discovery runs
52
+ * (discovery invokes the loaders), which is why it comes from the path pass and not from the
53
+ * later equality check (`TargetedGeneration.pin`).
54
+ */
55
+ pin: boolean;
56
+ }
57
+ /** What the path pass may send down the targeted path besides content edits. */
58
+ export interface PathPassOptions {
59
+ /**
60
+ * Program inputs (`semantic` paths, and `entry` paths the program also reads), and the
61
+ * structural class (`PathClassification.scoped`, which changes the program's root membership):
62
+ * only a generation whose units record semantic closures can refresh a replayed unit's program
63
+ * facts, so without them such a change goes FULL here rather than after discovery.
64
+ */
65
+ program: boolean;
66
+ }
67
+ /**
68
+ * The dirty threshold: above it a targeted generation would not pay off. The unit share applies
69
+ * only beyond a small floor: on a small site a full generation costs little either way, and a
70
+ * shared include there reaches a large share of the units.
71
+ */
72
+ export declare const DIRTY_UNIT_SHARE = 0.2;
73
+ export declare const DIRTY_UNIT_FLOOR = 8;
74
+ export declare const DIRTY_DESCRIPTORS = 200;
75
+ /** Whether `units` candidates of `owners` units with `descriptors` descriptors exceed the threshold. */
76
+ export declare function dirty(units: number, owners: number, descriptors: number): boolean;
77
+ /**
78
+ * Classifies one changed path by the current state of the filesystem, never by the event kind:
79
+ * an atomic save (an editor's safe write, a backup rename) may report `delete` and `create` of one
80
+ * path in different batches, and the `delete` of a file that exists again is an ordinary edit.
81
+ * A path may have several roles (a page module is usually a program input too). First match wins:
82
+ *
83
+ * 1. config/toolchain: a program configuration file; a path with the configuration, header
84
+ * template or structural output template role;
85
+ * 2. entry: a description module, or an input of an entry's evaluated closure, that still exists
86
+ * and moves no discovery, content-level or program glob (discovery evaluates it again, and the
87
+ * fresh-discovery check decides which entries changed);
88
+ * 3. structural: a description module or an evaluated entry input that no longer exists, a
89
+ * discovery or content-level glob whose membership changed, an ancestor directory of a
90
+ * recorded path, a guide's markdown file that no longer exists;
91
+ * 4. semantic: a program input, or a program glob whose membership changed;
92
+ * 5. content: a path a unit recorded (descriptor, unit or observed level);
93
+ * 6. unknown: anything else.
94
+ *
95
+ * Every structural path but a content-level glob change, a program glob change, a program input
96
+ * that no longer exists, and an unknown path are `scoped`: the structural class takes them.
97
+ */
98
+ export declare function classifyPath(index: UnitIndex, change: FileChange): PathClassification;
99
+ /**
100
+ * The path pass: classifies every changed path, then applies the dirty threshold to the
101
+ * candidates. The candidates are the units that recorded a changed path; the targeted path adds,
102
+ * after discovery and the program synchronization, every entry whose descriptor or evaluated value
103
+ * changed (or that was added), every unit whose semantic closure changed, and every API
104
+ * declaration whose enumeration changed. `precondition` is the first failed precondition, if any;
105
+ * the paths are still classified for the record.
106
+ */
107
+ export declare function classifyChanges(index: UnitIndex, changes: FileChange[], precondition?: string, options?: PathPassOptions): PathPass;
108
+ /** What the generation's own (fresh) discovery and keyword set say, for the closure. */
109
+ export interface FreshBuild {
110
+ configurationDigest: string;
111
+ entries: EntryDescriptor[];
112
+ keywords: KeywordExport[];
113
+ }
114
+ export interface Closure {
115
+ /** Set when the fresh-discovery equality check fails: the generation is FULL. */
116
+ full?: string;
117
+ /** Entries whose descriptor or evaluated value changed (their units are candidates). */
118
+ entries: Set<string>;
119
+ /** The keyword diff K: keys whose binding changed, appeared or disappeared. */
120
+ keys: string[];
121
+ /** One-hop consumers of K that are not candidates themselves. */
122
+ consumers: Set<string>;
123
+ /** Candidates ∪ consumers: the units the targeted path would re-describe, render or relink. */
124
+ units: Set<string>;
125
+ }
126
+ /** What the fresh-discovery equality check found: a FULL reason, or the entries that changed. */
127
+ export interface DiscoveryChanges {
128
+ full?: string;
129
+ /** Entries whose descriptor (any field, its dependencies included) differs from the base's. */
130
+ entries: Set<string>;
131
+ /** With `structural`: entries of the fresh discovery the base has no entry for. */
132
+ added: Set<string>;
133
+ /** With `structural`: entries of the base the fresh discovery no longer has. */
134
+ removed: Set<string>;
135
+ }
136
+ /**
137
+ * The fresh-discovery equality check: the configuration digest and the entry set must equal the
138
+ * retained ones, and every entry must keep its kind. An entry whose descriptor differs in any other
139
+ * way (its title, route or data, its markdown files and their digests, the inputs of its evaluated
140
+ * closure, its evaluated value) is reported as changed: its units are described again, and every
141
+ * other unit replays exactly what the full path would build for it, since a unit's describe,
142
+ * render and assembly read no other entry's descriptor (the site-wide outputs, which do, are
143
+ * aggregated in full). This also covers what no event reported, for example a file a page module
144
+ * reads through a computed `require`. The live guide values `describeGuide` reads (playground
145
+ * controls from the evaluated page) are compared by the targeted path itself.
146
+ *
147
+ * With `structural` (the structural class) the entry set may differ: an entry the base does not
148
+ * have is `added`, one the fresh discovery no longer has is `removed`, and an entry whose kind
149
+ * changed is changed (its units change identity: the old ones are removed, the new ones added).
150
+ * Breadcrumbs, routes and parents are descriptor fields, so a moved page and the descendants of an
151
+ * edited category are changed entries.
152
+ */
153
+ export declare function discoveryChanges(index: UnitIndex, fresh: Pick<FreshBuild, 'configurationDigest' | 'entries'>, structural?: boolean): DiscoveryChanges;
154
+ /** The keys whose binding differs between the retained and the fresh keyword set (K). */
155
+ export declare function keywordDiff(index: UnitIndex, keywords: KeywordExport[]): string[];
156
+ /**
157
+ * The affected closure of a targeted generation: the path pass's candidates and the units of every
158
+ * changed entry, plus the one-hop consumers of K. One hop is enough because exports come only from
159
+ * entries and IR, which relinking does not change.
160
+ */
161
+ export declare function affectedClosure(index: UnitIndex, pass: PathPass, fresh: FreshBuild): Closure;
@@ -0,0 +1,55 @@
1
+ import { type CompilationRequest, type DiscoverySnapshot, type PageArtifact } from '../contracts.js';
2
+ import type { ClosureRecord, ClosureStore } from '../semantic/semantic-closure.js';
3
+ import type { CompilationOptions } from './index.js';
4
+ import type { ScopedSemanticMode } from './semantic-closure.js';
5
+ /**
6
+ * The persistent store of semantic closure records, beside the artifact cache.
7
+ *
8
+ * A closure record (`R` and the derived-class identities of one query) lives in the runtime that
9
+ * recorded it. The startup generation of a development server runs in a one-shot runtime, and a
10
+ * restart restores its artifacts from the cache, so the long-lived runtime that serves the edits
11
+ * would start without records: its first program edit would refresh every closure as changed and
12
+ * rebuild every semantic unit. Each development generation that writes the cache therefore also
13
+ * writes the records of every closure its candidate holds, and a runtime that carries no records
14
+ * is seeded from them (`SemanticClosures.seed`).
15
+ *
16
+ * A stored record is a fact that is checked every time it is used, as a carried one is: the
17
+ * closure digest covers the record's files and derived identities, so a record recomputes to its
18
+ * dependency's digest only when it is that digest's record and the closure holds. A missing,
19
+ * stale or corrupt store therefore only makes units render again; it never changes output.
20
+ *
21
+ * The store is kept only where the targeted rebuild and scoped semantic invalidation are on, for
22
+ * development generations with incremental reuse and the cache enabled: `NGDOC_TARGETED_REBUILD=0`
23
+ * (and `NGDOC_SCOPED_SEMANTIC=0`, the reference path, production) neither reads nor writes it.
24
+ *
25
+ * A start restored from a cache written without a store (or with a store another compiler,
26
+ * schema or configuration wrote) writes an almost empty one: its reused IRs have no records. Its
27
+ * first program edit then rebuilds the semantic units, as without the store, and the store holds
28
+ * their records from then on.
29
+ */
30
+ /** What a store must have been written by to be read: the compiler, schema and configuration. */
31
+ export interface ClosureStoreIdentity {
32
+ compilerVersion: string;
33
+ toolchainDigest: string;
34
+ configurationDigest: string;
35
+ }
36
+ /**
37
+ * The store of a generation, or undefined when it keeps none: a development generation with
38
+ * incremental reuse, the cache, scoped semantic invalidation and the targeted rebuild on.
39
+ */
40
+ export declare function closureStorePath(options: CompilationOptions, request: CompilationRequest, configuration: DiscoverySnapshot['configuration'], scopedSemantic: ScopedSemanticMode): string | undefined;
41
+ /** Reads a store. Absent, unreadable, invalid or of another compiler, schema or configuration: empty. */
42
+ export declare function loadClosureStore(file: string, identity: ClosureStoreIdentity): ClosureStore;
43
+ /**
44
+ * Writes the records of every closure the artifacts hold (their dependencies and their IRs'),
45
+ * as far as `record` knows them. Best effort, atomically replaced: a store that is not written only
46
+ * makes a later runtime render again.
47
+ */
48
+ export declare function saveClosureStore(file: string, identity: ClosureStoreIdentity, artifacts: readonly PageArtifact[], record: (digest: string) => ClosureRecord | undefined): Promise<void>;
49
+ /**
50
+ * Removes the temporary files a save of `file` left behind when its process was killed. A
51
+ * temporary file younger than {@link STALE_TEMPORARY_MS} may belong to a save in progress.
52
+ */
53
+ export declare function sweepTemporaries(file: string): Promise<void>;
54
+ /** Forgets what this process read or wrote (tests). */
55
+ export declare function resetClosureStores(): void;
@@ -0,0 +1,32 @@
1
+ import type { ArtifactIdentity, ContentDescriptor, ContentIR, DeclarationDescriptor, DeferredContentRequest, Dependency, Diagnostic, EntryDescriptor, GuideSemantics, KeywordExport, PageArtifact, RouteRecord } from '../contracts.js';
2
+ import { canonicalJson, dependencyIdentity, digestOf } from '../kernel/canonical.js';
3
+ import type { UnitRecord } from './fold.js';
4
+ /** One page shell, category or API declaration of the current discovery. */
5
+ export interface Unit {
6
+ id: string;
7
+ identity: ArtifactIdentity;
8
+ entry: EntryDescriptor;
9
+ declaration?: DeclarationDescriptor;
10
+ requests: DeferredContentRequest[];
11
+ descriptors: ContentDescriptor[];
12
+ dependencies: Dependency[];
13
+ ir: ContentIR[];
14
+ previous?: PageArtifact;
15
+ inputDigest: string;
16
+ ownerInputDigest: string;
17
+ metadata?: RouteRecord['metadata'];
18
+ semantics?: GuideSemantics;
19
+ /** What this unit's phases emitted, replayed by `fold`. */
20
+ record: UnitRecord;
21
+ }
22
+ /** Canonical JSON (`kernel/canonical.ts`): code-unit key order, `undefined` members omitted. */
23
+ export declare const stable: typeof canonicalJson;
24
+ /** The one value digest: `sha256` of the canonical JSON. */
25
+ export declare const hash: typeof digestOf;
26
+ export declare const diagnostic: (code: string, message: string, severity?: Diagnostic["severity"]) => Diagnostic;
27
+ export declare const dependencyKey: typeof dependencyIdentity;
28
+ export declare const uniqueDependencies: (values: Dependency[]) => Dependency[];
29
+ export declare function sameValue(left: unknown, right: unknown): boolean;
30
+ export declare function inputDigest(unit: Unit, dependencies: Dependency[]): string;
31
+ export declare function unitExports(unit: Unit): KeywordExport[];
32
+ export declare function sameStrings(left: string[], right: string[]): boolean;
@@ -0,0 +1,21 @@
1
+ import type { DeclarationDescriptor, EntryDescriptor, ServiceResult } from '../contracts.js';
2
+ import { type Unit } from './common.js';
3
+ import type { GenerationPlan } from './plan.js';
4
+ /** How the targeted path has an API entry described (`TargetedGeneration.describing`). */
5
+ export interface DescribePlan {
6
+ /** The entry's enumeration of this generation, used instead of enumerating it again. */
7
+ enumerated: ServiceResult<DeclarationDescriptor[]>;
8
+ /**
9
+ * Appends the retained unit of `declaration` (undefined: the entry's own unit) instead of
10
+ * describing it, and says whether it did. The entry's own unit holds the enumeration's record.
11
+ */
12
+ replay?(declaration: DeclarationDescriptor | undefined): boolean;
13
+ }
14
+ /**
15
+ * Describe phase of one discovered entry: its page shell or category unit and, for an API entry,
16
+ * one unit per declaration, each with its content requests, descriptors and dependencies. Every
17
+ * completed unit is appended to `units`; what each step emits is recorded on the unit's record
18
+ * (the entry's `enumerateApi` on its first unit). With `described` (the targeted path), an API
19
+ * entry takes the given enumeration, and the units it replays are appended in their place.
20
+ */
21
+ export declare function describeEntry(plan: GenerationPlan, entry: EntryDescriptor, units: Unit[], described?: DescribePlan): Promise<void>;
@@ -0,0 +1,108 @@
1
+ import type { ArtifactSnapshot, CompilationRequest } from '../contracts.js';
2
+ import type { PathPass } from './classify.js';
3
+ import { type TargetedGeneration, changedArtifacts } from './targeted.js';
4
+ /**
5
+ * The targeted rebuild's report: one record per development generation that retains a program
6
+ * while the targeted rebuild is on (`CompilationOptions.targetedRebuild`, resolved by bootstrap
7
+ * from `NGDOC_TARGETED_REBUILD`). It says which path the generation took and why, and with
8
+ * `verify` what the comparison with the full generation found.
9
+ *
10
+ * A file the report appends one JSON line per generation to (optional; for harnesses).
11
+ */
12
+ export declare const TARGETED_REBUILD_TRACE_ENV = "NGDOC_TARGETED_REBUILD_TRACE";
13
+ /** The code a difference between the targeted and the full generation is reported under. */
14
+ export declare const TARGETED_MISMATCH = "COMPILATION_TARGETED_MISMATCH";
15
+ /** One generation's path, and with `verify` its check against the full generation. */
16
+ export interface DryRunRecord {
17
+ generation: number;
18
+ base: string | null;
19
+ revision: string | null;
20
+ /** `content`: the targeted path compiled this generation; `full`: it did not (with `reason`). */
21
+ path: 'content' | 'full';
22
+ /** Which compilation the result came from. */
23
+ published: 'targeted' | 'full';
24
+ reason?: string;
25
+ pin: boolean;
26
+ /** Whether discovery kept the keyword loaders' last results, and whether it ran again without. */
27
+ loaders?: 'pinned' | 'refreshed';
28
+ /** The structural class: the entries this generation added and removed. */
29
+ entries?: {
30
+ added: string[];
31
+ removed: string[];
32
+ };
33
+ /** The dirty threshold was exceeded (the generation ran FULL). */
34
+ threshold?: string;
35
+ classes: PathPass['classes'];
36
+ /** Changes of earlier generations against this base that did not commit, added to its own. */
37
+ pending: number;
38
+ /** Paths the stat sweep found changed without an event. */
39
+ swept: string[];
40
+ candidates: {
41
+ units: number;
42
+ descriptors: number;
43
+ };
44
+ /** The keyword diff K and its one-hop consumers. */
45
+ keys: string[];
46
+ /** Whether K came from the candidates' exports or from every key (global/remote keywords changed). */
47
+ keysFrom?: 'candidates' | 'all';
48
+ consumers: number;
49
+ /** Units linked and assembled by the targeted path (content path only). */
50
+ closure: string[];
51
+ /** `verify`: units whose artifact revision the full generation changed. */
52
+ actual: string[];
53
+ /** `verify`: changed units outside the closure. */
54
+ misses: string[];
55
+ /** |closure \ actual| (`verify`, content path only). */
56
+ superset: number;
57
+ /**
58
+ * `verify`: the first JSON path where the targeted and the full results differ. The full
59
+ * result is published and the difference is reported under {@link TARGETED_MISMATCH}.
60
+ */
61
+ mismatch?: string;
62
+ timings: {
63
+ sweepMs: number;
64
+ classifyMs: number;
65
+ admitMs: number;
66
+ targetedMs: number;
67
+ fullMs: number;
68
+ retainMs: number;
69
+ };
70
+ error?: string;
71
+ }
72
+ export interface DryRunReport {
73
+ counters: {
74
+ generations: number;
75
+ /** Generations the targeted path compiled (content) or not (full). */
76
+ content: number;
77
+ full: number;
78
+ /** `verify` generations with misses or a mismatch. */
79
+ misses: number;
80
+ mismatches: number;
81
+ noCandidate: number;
82
+ errors: number;
83
+ };
84
+ last?: DryRunRecord;
85
+ }
86
+ /**
87
+ * What the targeted rebuild did in this runtime. The long-lived worker runtime reads it through
88
+ * the compilation module (an optional export beside `createCompilationService`) to return each new
89
+ * record with its reply, since the worker's own stderr goes nowhere.
90
+ */
91
+ export declare function targetedDryRun(): DryRunReport;
92
+ export declare function resetTargetedDryRun(): void;
93
+ /** Units whose artifact changed between two snapshots (the aggregate artifact excluded). */
94
+ export declare const changedUnits: typeof changedArtifacts;
95
+ /** The first JSON path at which two JSON values differ (`$` when their types differ). */
96
+ export declare function firstDifference(left: unknown, right: unknown, at?: string): string | undefined;
97
+ /** Writes the record of one generation (see {@link DryRunRecord}). */
98
+ export declare function reportGeneration(input: {
99
+ request: CompilationRequest;
100
+ targeted: TargetedGeneration;
101
+ published: 'targeted' | 'full';
102
+ candidate: ArtifactSnapshot | undefined;
103
+ /** `verify`, when both compilations returned a candidate: the full one. */
104
+ full?: ArtifactSnapshot;
105
+ mismatch?: string;
106
+ timings: Pick<DryRunRecord['timings'], 'targetedMs' | 'fullMs' | 'retainMs'>;
107
+ error?: string;
108
+ }): void;
@@ -0,0 +1,104 @@
1
+ import { type CompilationRequest, type CompilationResult, type DiscoverySnapshot, type PageArtifact } from '../contracts.js';
2
+ import { type ProgramWatchFacts } from '../semantic/program-retention.js';
3
+ import type { Contribution } from './fold.js';
4
+ import type { CompilationOptions } from './index.js';
5
+ /**
6
+ * The fast start: a development start whose recorded inputs all re-read identically publishes the
7
+ * candidate of the generation that recorded them, without building the TypeScript program or
8
+ * rendering, linking and assembling anything.
9
+ *
10
+ * Every development generation that writes the artifact cache also writes, beside it, a record of
11
+ * its result: the candidate's revision, the result's dependencies and diagnostics, the digest of
12
+ * its discovery (the snapshot and what discovery recorded), and the private observations of its
13
+ * program (`ProgramWatchFacts`). A start (a development `buildOnce`, which has no previous
14
+ * snapshot) runs discovery as always, so user modules are evaluated and keyword loaders refresh,
15
+ * and then takes the record only when all of this holds:
16
+ *
17
+ * - the record was written by this compiler, schema, options and engine switches, in a process
18
+ * with the same runtime (`runtimeIdentity`: Node, ICU, the default locale, TypeScript and the
19
+ * versions of the packages that shape output);
20
+ * - discovery produced exactly the recorded snapshot, dependencies and diagnostics;
21
+ * - every recorded physical dependency (content by its bytes' digest, existence, glob membership)
22
+ * and every private observation of the program re-reads identically: the program a
23
+ * synchronization would build now is then the recorded one, so every semantic digest the
24
+ * candidate holds is current;
25
+ * - the artifact cache holds every artifact of the recorded candidate, each equal to its revision.
26
+ *
27
+ * The candidate is then the recorded one, assembled from the cache entries and the fresh discovery
28
+ * exactly as a generation assembles it, and the result's dependencies are exact: each was the
29
+ * digest of the bytes the recorded generation compiled, and those bytes are unchanged. Anything
30
+ * else (no record, another engine, a changed or unreadable input, an incomplete cache) is a reason,
31
+ * and the generation goes on as without the fast start. The long-lived runtime builds the program
32
+ * afterwards in its warm-up, so the first edit still compiles only what it reaches.
33
+ *
34
+ * `NGDOC_FAST_START=0` (or `CompilationOptions.fastStart: false`) turns it off, together with the
35
+ * reuse of the cache index's links and assemblies on a start after edits (`restoredReuse`).
36
+ * `verify` restores and then compiles from scratch (the reference path's options, no previous
37
+ * artifacts, no memo or closure store), publishes that result and reports
38
+ * `COMPILATION_FAST_START_MISMATCH` when the two candidates differ: a compile that reused the
39
+ * cache could not see an input that both the record and the cached artifacts lack.
40
+ */
41
+ /** The warning a `verify` start reports when the restored candidate differs from the compiled one. */
42
+ export declare const FAST_START_MISMATCH = "COMPILATION_FAST_START_MISMATCH";
43
+ /**
44
+ * Whether a start may reuse the links, assemblies and revisions of the cache index's artifacts,
45
+ * as a generation reuses those of the session's snapshot (`GenerationPlan.sessionPrevious`), when
46
+ * each of them is {@link intact}.
47
+ */
48
+ export declare function restoredReuse(options: CompilationOptions): boolean;
49
+ /**
50
+ * The fast start's mode for this request, or undefined: only a development generation without a
51
+ * previous snapshot or watched changes (a start) with incremental reuse may take it.
52
+ */
53
+ export declare function fastStartMode(options: CompilationOptions, request: CompilationRequest): 'on' | 'verify' | undefined;
54
+ /** Where a generation of this request keeps its record, or undefined when it keeps none. */
55
+ export declare function fastStartPath(options: CompilationOptions, request: CompilationRequest, configuration: DiscoverySnapshot['configuration']): string | undefined;
56
+ /** Every engine switch but this one (`verify` and `on` record the same thing), as read now. */
57
+ export declare function engineSwitches(): Array<[string, string]>;
58
+ /**
59
+ * What the process that compiles brings to a generation besides the options: the Node and ICU
60
+ * versions and the default locale (`localeCompare` and `Intl` without a locale depend on them),
61
+ * the TypeScript that ts-morph runs, and the resolved versions of the packages that shape output
62
+ * (`runtimePackages`). Read once per process: a package upgraded while it runs is not the code it
63
+ * loaded, and the next process reads the new versions.
64
+ */
65
+ export declare function runtimeIdentity(): Record<string, unknown>;
66
+ /**
67
+ * Writes the record of a generation's published result. Best effort and atomic: a record that is
68
+ * not written only makes the next start compile.
69
+ */
70
+ export declare function saveFastStart(file: string, input: {
71
+ options: CompilationOptions;
72
+ /** The engine switches as the compilation service read them when it was created. */
73
+ switches: ReadonlyArray<[string, string]>;
74
+ found: DiscoverySnapshot;
75
+ discovery: readonly Contribution[];
76
+ result: CompilationResult;
77
+ program: ProgramWatchFacts;
78
+ }): Promise<void>;
79
+ /** The outcome of {@link restoreFastStart}: the restored result, or why there is none. */
80
+ export type FastStart = {
81
+ result: CompilationResult;
82
+ } | {
83
+ reason: string;
84
+ };
85
+ /**
86
+ * The recorded result, when every recorded input holds (see the module comment), or the reason
87
+ * the start compiles.
88
+ */
89
+ export declare function restoreFastStart(input: {
90
+ file: string;
91
+ options: CompilationOptions;
92
+ /** The engine switches as the compilation service read them when it was created. */
93
+ switches: ReadonlyArray<[string, string]>;
94
+ found: DiscoverySnapshot;
95
+ discovery: readonly Contribution[];
96
+ signal: AbortSignal;
97
+ }): Promise<FastStart>;
98
+ /**
99
+ * Whether a restored artifact is the one its revision names. The cache vouches for an entry by its
100
+ * identity and fingerprint only; an entry damaged in place may still parse.
101
+ */
102
+ export declare function intact(artifact: PageArtifact): boolean;
103
+ /** Forgets what this process read or wrote, and the runtime identity it read (tests). */
104
+ export declare function resetFastStarts(): void;