@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.
Files changed (421) 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/page/demo-assets.builder.js +8 -5
  27. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  28. package/engine/builders/page/playground.builder.js +1 -0
  29. package/engine/builders/page/playground.builder.js.map +1 -1
  30. package/engine/builders/shared/content.builder.js +3 -3
  31. package/engine/builders/shared/content.builder.js.map +1 -1
  32. package/engine/builders/shared/page-component.builder.js +16 -6
  33. package/engine/builders/shared/page-component.builder.js.map +1 -1
  34. package/engine/builders/shared/page-wrapper.builder.js +8 -5
  35. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  36. package/engine/core/operators/distinct-pending.js.map +1 -1
  37. package/engine/core/operators/factory.js +1 -4
  38. package/engine/core/operators/factory.js.map +1 -1
  39. package/engine/core/operators/merge-factory.js +19 -17
  40. package/engine/core/operators/merge-factory.js.map +1 -1
  41. package/engine/core/operators/when-builders-done.js.map +1 -1
  42. package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
  43. package/engine/core/triggers/on-dependencies-change.js +2 -2
  44. package/engine/core/triggers/on-dependencies-change.js.map +1 -1
  45. package/generator/artifacts/index.d.ts +317 -0
  46. package/generator/bootstrap/bin.d.ts +18 -0
  47. package/generator/bootstrap/bin.js +7274 -0
  48. package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
  49. package/generator/bootstrap/cli.d.ts +42 -0
  50. package/generator/bootstrap/cli.js +7123 -0
  51. package/generator/bootstrap/constants.d.ts +4 -0
  52. package/generator/bootstrap/index.d.ts +111 -0
  53. package/generator/bootstrap/index.js +5020 -0
  54. package/generator/bootstrap/prerender-command.d.ts +31 -0
  55. package/generator/bootstrap/process-tree.d.ts +49 -0
  56. package/generator/build-metafile.json +11701 -0
  57. package/generator/build-provenance.json +119 -0
  58. package/generator/compiler/assemble.d.ts +41 -0
  59. package/generator/compiler/classify.d.ts +161 -0
  60. package/generator/compiler/closure-store.d.ts +55 -0
  61. package/generator/compiler/common.d.ts +32 -0
  62. package/generator/compiler/describe.d.ts +21 -0
  63. package/generator/compiler/dry-run.d.ts +108 -0
  64. package/generator/compiler/fast-start.d.ts +104 -0
  65. package/generator/compiler/fold.d.ts +116 -0
  66. package/generator/compiler/index.d.ts +111 -0
  67. package/generator/compiler/index.js +17759 -0
  68. package/generator/compiler/link.d.ts +38 -0
  69. package/generator/compiler/memo.d.ts +44 -0
  70. package/generator/compiler/plan.d.ts +92 -0
  71. package/generator/compiler/progress.d.ts +54 -0
  72. package/generator/compiler/render.d.ts +27 -0
  73. package/generator/compiler/retention.d.ts +181 -0
  74. package/generator/compiler/semantic-closure.d.ts +46 -0
  75. package/generator/compiler/targeted.d.ts +280 -0
  76. package/generator/content/content-compiler.d.ts +118 -0
  77. package/generator/content/highlight-cache.d.ts +139 -0
  78. package/generator/content/html-pipeline.d.ts +170 -0
  79. package/generator/content/html-pool.d.ts +239 -0
  80. package/generator/content/html-worker.js +1598 -0
  81. package/generator/content-module-ids.d.ts +8 -0
  82. package/generator/contracts.d.ts +1063 -0
  83. package/generator/contracts.js +15 -0
  84. package/generator/discovery/index.d.ts +77 -0
  85. package/generator/graph/index.d.ts +211 -0
  86. package/generator/graph/unit-index.d.ts +216 -0
  87. package/generator/kernel/canonical.d.ts +57 -0
  88. package/generator/kernel/flags.d.ts +49 -0
  89. package/generator/kernel/footprint.d.ts +88 -0
  90. package/generator/kernel/observations.d.ts +68 -0
  91. package/generator/kernel/paths.d.ts +22 -0
  92. package/generator/kernel/runtime-identity.d.ts +11 -0
  93. package/generator/outputs/index.d.ts +67 -0
  94. package/generator/package.json +3 -0
  95. package/generator/progress/ci.d.ts +22 -0
  96. package/generator/progress/detect.d.ts +60 -0
  97. package/generator/progress/events.d.ts +126 -0
  98. package/generator/progress/format.d.ts +83 -0
  99. package/generator/progress/gate.d.ts +49 -0
  100. package/generator/progress/host.d.ts +29 -0
  101. package/generator/progress/lines.d.ts +42 -0
  102. package/generator/progress/live.d.ts +115 -0
  103. package/generator/progress/model.d.ts +85 -0
  104. package/generator/progress/reporter.d.ts +87 -0
  105. package/generator/progress/settings.d.ts +60 -0
  106. package/generator/semantic/angular.d.ts +9 -0
  107. package/generator/semantic/api-enumeration.d.ts +19 -0
  108. package/generator/semantic/api-summary.d.ts +33 -0
  109. package/generator/semantic/dependencies.d.ts +20 -0
  110. package/generator/semantic/derived-classes.d.ts +58 -0
  111. package/generator/semantic/documentation-cache.d.ts +23 -0
  112. package/generator/semantic/fragments.d.ts +28 -0
  113. package/generator/semantic/owned-roots.d.ts +59 -0
  114. package/generator/semantic/program-builder.d.ts +55 -0
  115. package/generator/semantic/program-index.d.ts +124 -0
  116. package/generator/semantic/program-inputs.d.ts +26 -0
  117. package/generator/semantic/program-observations.d.ts +158 -0
  118. package/generator/semantic/program-retention.d.ts +147 -0
  119. package/generator/semantic/program-state.d.ts +196 -0
  120. package/generator/semantic/program-verify.d.ts +22 -0
  121. package/generator/semantic/recorder.d.ts +89 -0
  122. package/generator/semantic/rendering.d.ts +34 -0
  123. package/generator/semantic/semantic-closure.d.ts +129 -0
  124. package/generator/semantic/semantic-service.d.ts +186 -0
  125. package/generator/semantic/type-text.d.ts +5 -0
  126. package/generator/session/build-session.d.ts +206 -0
  127. package/generator/session/input-verification.d.ts +38 -0
  128. package/generator/session/parcel-event-source.d.ts +22 -0
  129. package/generator/session/progress.d.ts +72 -0
  130. package/generator/session/unchanged-saves.d.ts +63 -0
  131. package/generator/session/watch-inputs.d.ts +6 -0
  132. package/generator/session/watch-signals.d.ts +10 -0
  133. package/generator/templates/api/base.html.nunj +26 -0
  134. package/generator/templates/api/class-declaration.html.nunj +57 -0
  135. package/generator/templates/api/details/class-declaration.html.nunj +47 -0
  136. package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
  137. package/generator/templates/api/details/function-declaration.html.nunj +14 -0
  138. package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
  139. package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
  140. package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
  141. package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
  142. package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
  143. package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
  144. package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
  145. package/generator/templates/api/details.html.nunj +9 -0
  146. package/generator/templates/api/enum-declaration.html.nunj +12 -0
  147. package/generator/templates/api/function-declaration.html.nunj +35 -0
  148. package/generator/templates/api/interface-declaration.html.nunj +37 -0
  149. package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
  150. package/generator/templates/api/variable-declaration.html.nunj +8 -0
  151. package/generator/templates/api-header.html.nunj +11 -0
  152. package/generator/templates/api-list.ts.nunj +22 -0
  153. package/generator/templates/api-page-content.html.nunj +1 -0
  154. package/generator/templates/api-scope.ts.nunj +22 -0
  155. package/generator/templates/category.ts.nunj +22 -0
  156. package/generator/templates/code.html.nunj +3 -0
  157. package/generator/templates/context.ts.nunj +55 -0
  158. package/generator/templates/demo-assets.ts.nunj +25 -0
  159. package/generator/templates/helpers/accessor.html.nunj +76 -0
  160. package/generator/templates/helpers/accessors.html.nunj +7 -0
  161. package/generator/templates/helpers/badge.html.nunj +4 -0
  162. package/generator/templates/helpers/call-signature.html.nunj +70 -0
  163. package/generator/templates/helpers/code.html.nunj +3 -0
  164. package/generator/templates/helpers/constructor.html.nunj +32 -0
  165. package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
  166. package/generator/templates/helpers/decorators.html.nunj +11 -0
  167. package/generator/templates/helpers/members.html.nunj +29 -0
  168. package/generator/templates/helpers/method.html.nunj +89 -0
  169. package/generator/templates/helpers/methods.html.nunj +7 -0
  170. package/generator/templates/helpers/modifier.html.nunj +4 -0
  171. package/generator/templates/helpers/no-content.html.nunj +3 -0
  172. package/generator/templates/helpers/overload.html.nunj +57 -0
  173. package/generator/templates/helpers/parameters.html.nunj +44 -0
  174. package/generator/templates/helpers/properties.html.nunj +61 -0
  175. package/generator/templates/helpers/status.html.nunj +33 -0
  176. package/generator/templates/helpers/tag.html.nunj +4 -0
  177. package/generator/templates/helpers/type.html.nunj +11 -0
  178. package/generator/templates/index.ts.nunj +2 -0
  179. package/generator/templates/page-header.html.nunj +5 -0
  180. package/generator/templates/page-wrapper.ts.nunj +64 -0
  181. package/generator/templates/page.ts.nunj +97 -0
  182. package/generator/templates/parts/examples.html.nunj +11 -0
  183. package/generator/templates/parts/member-examples.html.nunj +12 -0
  184. package/generator/templates/parts/member-remarks.html.nunj +8 -0
  185. package/generator/templates/parts/page-tags.html.nunj +10 -0
  186. package/generator/templates/parts/remarks.html.nunj +10 -0
  187. package/generator/templates/parts/see-also.html.nunj +23 -0
  188. package/generator/templates/parts/usage-notes.html.nunj +8 -0
  189. package/generator/templates/playgrounds.ts.nunj +63 -0
  190. package/generator/templates/routes.ts.nunj +49 -0
  191. package/generator/templates/symbol/decorators.html.nunj +12 -0
  192. package/generator/templates/symbol/details.html.nunj +62 -0
  193. package/generator/templates/symbol/extended-by.html.nunj +17 -0
  194. package/generator/templates/symbol/header.html.nunj +22 -0
  195. package/generator/templates/symbol/members.html.nunj +301 -0
  196. package/generator/templates/symbol/page.html.nunj +76 -0
  197. package/generator/templates/symbol/see-also.html.nunj +16 -0
  198. package/generator/vite/angular/ANALOG-LICENSE +21 -0
  199. package/generator/vite/angular/analog-provenance.json +880 -0
  200. package/generator/vite/angular/index.d.ts +14 -0
  201. package/generator/vite/angular/index.js +7300 -0
  202. package/generator/vite/angular-compatibility.d.ts +6 -0
  203. package/generator/vite/angular-composition.d.ts +68 -0
  204. package/generator/vite/angular-version.d.ts +38 -0
  205. package/generator/vite/application-builder.js +331 -0
  206. package/generator/vite/application-builder.schema.json +46 -0
  207. package/generator/vite/application.d.ts +91 -0
  208. package/generator/vite/assets.d.ts +11 -0
  209. package/generator/vite/bounded-close.d.ts +33 -0
  210. package/generator/vite/component-updates.d.ts +21 -0
  211. package/generator/vite/configuration.d.ts +3 -0
  212. package/generator/vite/dev-server-builder.js +334 -0
  213. package/generator/vite/dev-server-builder.schema.json +27 -0
  214. package/generator/vite/dev-styles.d.ts +65 -0
  215. package/generator/vite/diagnostics.d.ts +4 -0
  216. package/generator/vite/external-probes.d.ts +40 -0
  217. package/generator/vite/host-updates.d.ts +145 -0
  218. package/generator/vite/index.d.ts +13 -0
  219. package/generator/vite/index.js +11589 -0
  220. package/generator/vite/lease.d.ts +6 -0
  221. package/generator/vite/lifecycle.d.ts +119 -0
  222. package/generator/vite/mime.d.ts +2 -0
  223. package/generator/vite/missing-paths.d.ts +44 -0
  224. package/generator/vite/options.d.ts +87 -0
  225. package/generator/vite/output-watch.d.ts +41 -0
  226. package/generator/vite/paths.d.ts +7 -0
  227. package/generator/vite/plugin.d.ts +3 -0
  228. package/generator/vite/prerender-entry.js +395 -0
  229. package/generator/vite/prerender-runtime.d.ts +66 -0
  230. package/generator/vite/prerender.d.ts +27 -0
  231. package/generator/vite/production.d.ts +66 -0
  232. package/generator/vite/progress.d.ts +33 -0
  233. package/generator/vite/restore-theme.js +13 -0
  234. package/generator/vite/route-inventory.d.ts +24 -0
  235. package/generator/vite/ssr-renderer-control.d.ts +1 -0
  236. package/generator/vite/ssr-renderer-entry.js +444 -0
  237. package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
  238. package/generator/vite/ssr-renderer.d.ts +74 -0
  239. package/generator/vite/theme-index.d.ts +13 -0
  240. package/generator/vite/tsconfig-paths.d.ts +64 -0
  241. package/generator/vite/vite-event-source.d.ts +198 -0
  242. package/generator/vite/vite-version.d.ts +26 -0
  243. package/generator/vite/watch-inputs.d.ts +39 -0
  244. package/generator/worker/entry.d.ts +1 -0
  245. package/generator/worker/entry.js +614 -0
  246. package/generator/worker/index.d.ts +156 -0
  247. package/generator/worker/index.js +1030 -0
  248. package/generator/worker/protocol.d.ts +160 -0
  249. package/helpers/angular/get-component-decorator.js +6 -6
  250. package/helpers/angular/get-component-decorator.js.map +1 -1
  251. package/helpers/angular/get-directive-decorator.js +3 -3
  252. package/helpers/angular/get-directive-decorator.js.map +1 -1
  253. package/helpers/angular/get-pipe-decorator.js +3 -3
  254. package/helpers/angular/get-pipe-decorator.js.map +1 -1
  255. package/helpers/build-indexes.js +5 -2
  256. package/helpers/build-indexes.js.map +1 -1
  257. package/helpers/construct-page-keyword.js +2 -1
  258. package/helpers/construct-page-keyword.js.map +1 -1
  259. package/helpers/extract-selectors.d.ts +1 -1
  260. package/helpers/extract-selectors.js +5 -3
  261. package/helpers/extract-selectors.js.map +1 -1
  262. package/helpers/filter-useless-members.d.ts +1 -1
  263. package/helpers/format-code.d.ts +2 -1
  264. package/helpers/format-code.js +13 -4
  265. package/helpers/format-code.js.map +1 -1
  266. package/helpers/import-fresh-esm.js.map +1 -1
  267. package/helpers/index.d.ts +2 -0
  268. package/helpers/index.js +2 -0
  269. package/helpers/index.js.map +1 -1
  270. package/helpers/keyword-heading-title.d.ts +7 -0
  271. package/helpers/keyword-heading-title.js +21 -0
  272. package/helpers/keyword-heading-title.js.map +1 -0
  273. package/helpers/markdown-to-html.js +3 -3
  274. package/helpers/markdown-to-html.js.map +1 -1
  275. package/helpers/navigation-title-order.d.ts +8 -0
  276. package/helpers/navigation-title-order.js +15 -0
  277. package/helpers/navigation-title-order.js.map +1 -0
  278. package/helpers/playground/get-playground-inputs.js +8 -4
  279. package/helpers/playground/get-playground-inputs.js.map +1 -1
  280. package/helpers/playground/get-playground-template-inputs.js +2 -1
  281. package/helpers/playground/get-playground-template-inputs.js.map +1 -1
  282. package/helpers/presentation.d.ts +7 -7
  283. package/helpers/presentation.js +23 -23
  284. package/helpers/presentation.js.map +1 -1
  285. package/helpers/print.js +32 -5
  286. package/helpers/print.js.map +1 -1
  287. package/helpers/process-snippets.d.ts +1 -1
  288. package/helpers/process-snippets.js +3 -3
  289. package/helpers/process-snippets.js.map +1 -1
  290. package/helpers/snippets-from-asset.d.ts +1 -1
  291. package/helpers/snippets-from-asset.js +2 -2
  292. package/helpers/snippets-from-asset.js.map +1 -1
  293. package/helpers/sort-navigation-entities.js +2 -1
  294. package/helpers/sort-navigation-entities.js.map +1 -1
  295. package/helpers/stable-generated-id.d.ts +2 -0
  296. package/helpers/stable-generated-id.js +12 -0
  297. package/helpers/stable-generated-id.js.map +1 -0
  298. package/helpers/text-order.d.ts +8 -0
  299. package/helpers/text-order.js +26 -0
  300. package/helpers/text-order.js.map +1 -0
  301. package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
  302. package/helpers/typescript/member/get-inherited-parent.js +2 -2
  303. package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
  304. package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
  305. package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
  306. package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
  307. package/helpers/typescript/property/get-property-assignment.js.map +1 -1
  308. package/package.json +86 -29
  309. package/parsers/helpers/number.d.ts +1 -1
  310. package/parsers/helpers/number.js +2 -2
  311. package/parsers/helpers/number.js.map +1 -1
  312. package/parsers/helpers/param-value.d.ts +1 -1
  313. package/parsers/helpers/param-value.js +2 -2
  314. package/parsers/helpers/param-value.js.map +1 -1
  315. package/parsers/helpers/param.js +3 -3
  316. package/parsers/helpers/param.js.map +1 -1
  317. package/parsers/parse-code-block-params.d.ts +1 -1
  318. package/parsers/parse-code-block-params.js +22 -16
  319. package/parsers/parse-code-block-params.js.map +1 -1
  320. package/parsers/parse-snippet.js +10 -10
  321. package/parsers/parse-snippet.js.map +1 -1
  322. package/schematics/collection.json +34 -23
  323. package/schematics/migrate-to-vite/analyze.d.ts +76 -0
  324. package/schematics/migrate-to-vite/analyze.js +816 -0
  325. package/schematics/migrate-to-vite/analyze.js.map +1 -0
  326. package/schematics/migrate-to-vite/index.d.ts +9 -0
  327. package/schematics/migrate-to-vite/index.js +585 -0
  328. package/schematics/migrate-to-vite/index.js.map +1 -0
  329. package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
  330. package/schematics/migrate-to-vite/legacy-folder.js +340 -0
  331. package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
  332. package/schematics/migrate-to-vite/report.d.ts +32 -0
  333. package/schematics/migrate-to-vite/report.js +97 -0
  334. package/schematics/migrate-to-vite/report.js.map +1 -0
  335. package/schematics/migrate-to-vite/schema.d.ts +13 -0
  336. package/schematics/migrate-to-vite/schema.js +3 -0
  337. package/schematics/migrate-to-vite/schema.js.map +1 -0
  338. package/schematics/migrate-to-vite/schema.json +31 -0
  339. package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
  340. package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
  341. package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
  342. package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
  343. package/schematics/migrate-to-vite/setup/index.js +13 -0
  344. package/schematics/migrate-to-vite/setup/index.js.map +1 -0
  345. package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
  346. package/schematics/migrate-to-vite/setup/json-file.js +115 -0
  347. package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
  348. package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
  349. package/schematics/migrate-to-vite/setup/source.js +202 -0
  350. package/schematics/migrate-to-vite/setup/source.js.map +1 -0
  351. package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
  352. package/schematics/migrate-to-vite/setup/targets.js +48 -0
  353. package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
  354. package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
  355. package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
  356. package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
  357. package/schematics/migrate-to-vite/setup/workspace.d.ts +100 -0
  358. package/schematics/migrate-to-vite/setup/workspace.js +225 -0
  359. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
  360. package/schematics/migrate-to-vite/state.d.ts +65 -0
  361. package/schematics/migrate-to-vite/state.js +92 -0
  362. package/schematics/migrate-to-vite/state.js.map +1 -0
  363. package/schematics/migrate-to-vite/testing/fixtures.d.ts +18 -0
  364. package/schematics/migrate-to-vite/testing/fixtures.js +279 -0
  365. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
  366. package/schematics/migrate-to-vite/update-note.d.ts +6 -0
  367. package/schematics/migrate-to-vite/update-note.js +23 -0
  368. package/schematics/migrate-to-vite/update-note.js.map +1 -0
  369. package/schematics/migration.json +5 -0
  370. package/schematics/migrations/standalone-pages/index.js +7 -6
  371. package/schematics/migrations/standalone-pages/index.js.map +1 -1
  372. package/schematics/vite-setup/index.d.ts +20 -0
  373. package/schematics/vite-setup/index.js +206 -0
  374. package/schematics/vite-setup/index.js.map +1 -0
  375. package/schematics/vite-setup/schema.d.ts +7 -0
  376. package/schematics/vite-setup/schema.js +3 -0
  377. package/schematics/vite-setup/schema.js.map +1 -0
  378. package/schematics/vite-setup/schema.json +19 -0
  379. package/scripts/restore-theme.js +9 -2
  380. package/templates/context.ts.nunj +3 -0
  381. package/templates/helpers/badge.html.nunj +1 -1
  382. package/templates/helpers/status.html.nunj +4 -8
  383. package/templates/page-wrapper.ts.nunj +24 -1
  384. package/templates/page.ts.nunj +25 -0
  385. package/templates/parts/page-tags.html.nunj +1 -1
  386. package/templates/playgrounds.ts.nunj +8 -9
  387. package/templates/routes.ts.nunj +6 -1
  388. package/templates/symbol/decorators.html.nunj +12 -0
  389. package/templates/symbol/details.html.nunj +62 -0
  390. package/templates/symbol/extended-by.html.nunj +17 -0
  391. package/templates/symbol/header.html.nunj +22 -0
  392. package/templates/symbol/members.html.nunj +301 -0
  393. package/templates/symbol/page.html.nunj +76 -0
  394. package/templates/symbol/see-also.html.nunj +16 -0
  395. package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
  396. package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
  397. package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
  398. package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
  399. package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
  400. package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
  401. package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
  402. package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
  403. package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
  404. package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
  405. package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
  406. package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
  407. package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
  408. package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
  409. package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
  410. package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
  411. package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
  412. package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
  413. package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
  414. package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
  415. package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
  416. package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
  417. package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
  418. package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
  419. package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
  420. package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
  421. package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
@@ -0,0 +1,100 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ /** A JSON value as it appears in `angular.json` or `project.json`. */
3
+ export type JsonLike = string | number | boolean | null | JsonLike[] | {
4
+ [key: string]: JsonLike | undefined;
5
+ };
6
+ /** A JSON object as it appears in `angular.json` or `project.json`. */
7
+ export interface JsonRecord {
8
+ [key: string]: JsonLike | undefined;
9
+ }
10
+ /** One target of a project, with the key its builder is stored under (`builder` or `executor`). */
11
+ export interface WorkspaceTarget extends JsonRecord {
12
+ builder?: string;
13
+ executor?: string;
14
+ options?: JsonRecord;
15
+ configurations?: {
16
+ [name: string]: JsonRecord | undefined;
17
+ };
18
+ defaultConfiguration?: string;
19
+ }
20
+ /**
21
+ * A project of an Angular CLI (`angular.json`) or Nx (`project.json`) workspace, read without the
22
+ * devkit workspace API so that both layouts, and Nx's `executor` key, are handled the same way.
23
+ */
24
+ export interface WorkspaceProject {
25
+ name: string;
26
+ /** The project root, workspace-relative and POSIX (`''` for the workspace root). */
27
+ root: string;
28
+ /** The source root, workspace-relative and POSIX. */
29
+ sourceRoot: string;
30
+ /** `angular.json` or the project's `project.json`. */
31
+ file: string;
32
+ /** The JSON path of the project's target map inside `file`. */
33
+ targetsPath: string[];
34
+ targets: {
35
+ [name: string]: WorkspaceTarget | undefined;
36
+ };
37
+ /** The `i18n` block of the project, if any. */
38
+ i18n?: JsonLike;
39
+ }
40
+ /** The builder or executor of a target. */
41
+ export declare function targetBuilder(target: WorkspaceTarget | undefined): string | undefined;
42
+ /** The key a target stores its builder under: `builder` (angular.json) or `executor` (Nx). */
43
+ export declare function builderKey(target: WorkspaceTarget): 'builder' | 'executor';
44
+ /**
45
+ * Reads every project of the workspace.
46
+ *
47
+ * - An Angular CLI workspace (no `nx.json`): the projects of `angular.json`, or of the
48
+ * `project.json` files when there is no `angular.json`.
49
+ * - An Nx workspace: the `project.json` files first, then the `angular.json` projects that no
50
+ * `project.json` declares. Under `nx g`, Nx shows Angular devkit schematics a virtual
51
+ * `angular.json` built from every `project.json`, and writing it makes Nx rewrite all of them
52
+ * (reordered keys, its own layout, no final newline), including unrelated projects. Reading a
53
+ * project from its own `project.json` keeps every write in that one file, as a text edit.
54
+ * @param tree - The workspace tree.
55
+ */
56
+ export declare function readWorkspaceProjects(tree: Tree): WorkspaceProject[];
57
+ /**
58
+ * The options a target runs with for a configuration: its `options` with the configuration's
59
+ * values over them (a shallow merge, as Architect does).
60
+ */
61
+ export declare function resolveTargetOptions(target: WorkspaceTarget, configuration: string | undefined): JsonRecord;
62
+ /** Parses `project:target[:configuration]`; an empty project means the current one. */
63
+ export declare function parseTargetString(value: string): {
64
+ project: string;
65
+ target: string;
66
+ configuration?: string;
67
+ } | undefined;
68
+ /** A target with its `buildTarget` option set, or removed (with `options` when that empties it). */
69
+ export declare function withBuildTarget(target: WorkspaceTarget, buildTarget: string | undefined): WorkspaceTarget;
70
+ /**
71
+ * Writes a target as a whole, replacing an existing one. A new target is inserted right after
72
+ * the target named by `anchor`, or right before `anchor.before`, when that target exists, so a
73
+ * renamed target stays next to its replacement.
74
+ * @param tree - The workspace tree.
75
+ * @param project - The project.
76
+ * @param name - The target.
77
+ * @param value - The target, or undefined to remove it.
78
+ * @param anchor - The target to insert a new target after, or `{ before }` to insert it before.
79
+ */
80
+ export declare function writeTarget(tree: Tree, project: WorkspaceProject, name: string, value: WorkspaceTarget | undefined, anchor?: string | {
81
+ before: string;
82
+ }): void;
83
+ /**
84
+ * Updates an existing target to a value with the smallest text edits: only the values that differ
85
+ * are written, so the rest of the target keeps the layout and key order of the user's file.
86
+ * Writes the whole target when it does not exist.
87
+ * @param tree - The workspace tree.
88
+ * @param project - The project.
89
+ * @param name - The target.
90
+ * @param value - The target as it should be.
91
+ */
92
+ export declare function updateTarget(tree: Tree, project: WorkspaceProject, name: string, value: WorkspaceTarget): void;
93
+ /**
94
+ * Renames a target by rewriting its key, so the target keeps its text and its place.
95
+ * @param tree - The workspace tree.
96
+ * @param project - The project.
97
+ * @param from - The current name.
98
+ * @param to - The new name, which no target may have.
99
+ */
100
+ export declare function renameTarget(tree: Tree, project: WorkspaceProject, from: string, to: string): void;
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.targetBuilder = targetBuilder;
4
+ exports.builderKey = builderKey;
5
+ exports.readWorkspaceProjects = readWorkspaceProjects;
6
+ exports.resolveTargetOptions = resolveTargetOptions;
7
+ exports.parseTargetString = parseTargetString;
8
+ exports.withBuildTarget = withBuildTarget;
9
+ exports.writeTarget = writeTarget;
10
+ exports.updateTarget = updateTarget;
11
+ exports.renameTarget = renameTarget;
12
+ const path_1 = require("path");
13
+ const json_file_1 = require("./json-file");
14
+ function normalize(value) {
15
+ const normalized = path_1.posix.normalize((value ?? '').replace(/\\/g, '/')).replace(/^\.\/?|\/$/g, '');
16
+ return normalized === '.' ? '' : normalized;
17
+ }
18
+ function isRecord(value) {
19
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
20
+ }
21
+ /** The builder or executor of a target. */
22
+ function targetBuilder(target) {
23
+ return target?.builder ?? target?.executor;
24
+ }
25
+ /** The key a target stores its builder under: `builder` (angular.json) or `executor` (Nx). */
26
+ function builderKey(target) {
27
+ return target.executor !== undefined && target.builder === undefined ? 'executor' : 'builder';
28
+ }
29
+ function projectFromJson(name, value, file, basePath, fallbackRoot) {
30
+ const root = normalize(typeof value['root'] === 'string' ? value['root'] : fallbackRoot);
31
+ const targetsKey = isRecord(value['architect']) ? 'architect' : 'targets';
32
+ const targets = isRecord(value[targetsKey]) ? value[targetsKey] : {};
33
+ return {
34
+ name,
35
+ root,
36
+ sourceRoot: normalize(typeof value['sourceRoot'] === 'string' ? value['sourceRoot'] : path_1.posix.join(root, 'src')),
37
+ file,
38
+ targetsPath: [...basePath, targetsKey],
39
+ targets: targets,
40
+ ...(value['i18n'] === undefined ? {} : { i18n: value['i18n'] }),
41
+ };
42
+ }
43
+ function findProjectJsonFiles(tree) {
44
+ const found = [];
45
+ const visit = (directory) => {
46
+ const entry = tree.getDir(directory);
47
+ for (const file of entry.subfiles) {
48
+ if (file === 'project.json')
49
+ found.push(path_1.posix.join(directory, file).replace(/^\//, ''));
50
+ }
51
+ for (const sub of entry.subdirs) {
52
+ if (sub === 'node_modules' || sub.startsWith('.') || sub === 'dist')
53
+ continue;
54
+ visit(path_1.posix.join(directory, sub));
55
+ }
56
+ };
57
+ visit('/');
58
+ return found.sort();
59
+ }
60
+ /**
61
+ * The projects of `angular.json`, or none when there is no `angular.json`.
62
+ * @param tree - The workspace tree.
63
+ */
64
+ function readAngularJsonProjects(tree) {
65
+ if (!tree.exists('angular.json'))
66
+ return [];
67
+ const projects = new json_file_1.JsonFile(tree, 'angular.json').get(['projects']);
68
+ if (!isRecord(projects))
69
+ return [];
70
+ return Object.entries(projects)
71
+ .filter((entry) => isRecord(entry[1]))
72
+ .map(([name, value]) => projectFromJson(name, value, 'angular.json', ['projects', name], ''));
73
+ }
74
+ /**
75
+ * The projects of the `project.json` files.
76
+ * @param tree - The workspace tree.
77
+ * @param namesByRoot - Project names by root, for a `project.json` without a `name`.
78
+ */
79
+ function readProjectJsonProjects(tree, namesByRoot) {
80
+ return findProjectJsonFiles(tree).flatMap((file) => {
81
+ const value = new json_file_1.JsonFile(tree, file).get([]);
82
+ if (!isRecord(value))
83
+ return [];
84
+ const root = path_1.posix.dirname(file) === '.' ? '' : path_1.posix.dirname(file);
85
+ const name = typeof value['name'] === 'string'
86
+ ? value['name']
87
+ : namesByRoot.get(root) ?? path_1.posix.basename(root);
88
+ return [projectFromJson(name, value, file, [], root)];
89
+ });
90
+ }
91
+ /**
92
+ * Reads every project of the workspace.
93
+ *
94
+ * - An Angular CLI workspace (no `nx.json`): the projects of `angular.json`, or of the
95
+ * `project.json` files when there is no `angular.json`.
96
+ * - An Nx workspace: the `project.json` files first, then the `angular.json` projects that no
97
+ * `project.json` declares. Under `nx g`, Nx shows Angular devkit schematics a virtual
98
+ * `angular.json` built from every `project.json`, and writing it makes Nx rewrite all of them
99
+ * (reordered keys, its own layout, no final newline), including unrelated projects. Reading a
100
+ * project from its own `project.json` keeps every write in that one file, as a text edit.
101
+ * @param tree - The workspace tree.
102
+ */
103
+ function readWorkspaceProjects(tree) {
104
+ const angular = readAngularJsonProjects(tree);
105
+ if (!tree.exists('nx.json')) {
106
+ return tree.exists('angular.json') ? angular : readProjectJsonProjects(tree, new Map());
107
+ }
108
+ // A `project.json` without a name is named by Nx, which the virtual `angular.json` shows.
109
+ const projects = readProjectJsonProjects(tree, new Map(angular.map((project) => [project.root, project.name])));
110
+ const names = new Set(projects.map((project) => project.name));
111
+ const roots = new Set(projects.map((project) => project.root));
112
+ return [
113
+ ...projects,
114
+ ...angular.filter((project) => !names.has(project.name) && !roots.has(project.root)),
115
+ ];
116
+ }
117
+ /**
118
+ * The options a target runs with for a configuration: its `options` with the configuration's
119
+ * values over them (a shallow merge, as Architect does).
120
+ */
121
+ function resolveTargetOptions(target, configuration) {
122
+ const configured = configuration ? target.configurations?.[configuration] : undefined;
123
+ return { ...(target.options ?? {}), ...(configured ?? {}) };
124
+ }
125
+ /** Parses `project:target[:configuration]`; an empty project means the current one. */
126
+ function parseTargetString(value) {
127
+ const match = /^([^:\s]*):([^:\s]*)(?::([^\s]+))?$/.exec(value);
128
+ if (!match)
129
+ return undefined;
130
+ return {
131
+ project: match[1],
132
+ target: match[2],
133
+ ...(match[3] === undefined ? {} : { configuration: match[3] }),
134
+ };
135
+ }
136
+ /** A target with its `buildTarget` option set, or removed (with `options` when that empties it). */
137
+ function withBuildTarget(target, buildTarget) {
138
+ const options = { ...(target.options ?? {}) };
139
+ if (buildTarget === undefined)
140
+ delete options['buildTarget'];
141
+ else
142
+ options['buildTarget'] = buildTarget;
143
+ const { options: _previous, ...rest } = target;
144
+ return Object.keys(options).length ? { ...rest, options } : rest;
145
+ }
146
+ /**
147
+ * Writes a target as a whole, replacing an existing one. A new target is inserted right after
148
+ * the target named by `anchor`, or right before `anchor.before`, when that target exists, so a
149
+ * renamed target stays next to its replacement.
150
+ * @param tree - The workspace tree.
151
+ * @param project - The project.
152
+ * @param name - The target.
153
+ * @param value - The target, or undefined to remove it.
154
+ * @param anchor - The target to insert a new target after, or `{ before }` to insert it before.
155
+ */
156
+ function writeTarget(tree, project, name, value, anchor) {
157
+ const json = new json_file_1.JsonFile(tree, project.file);
158
+ const path = [...project.targetsPath, name];
159
+ if (value === undefined) {
160
+ json.remove(path);
161
+ return;
162
+ }
163
+ const names = Object.keys(json.get(project.targetsPath) ?? {});
164
+ const exists = names.includes(name);
165
+ const index = anchor === undefined
166
+ ? -1
167
+ : typeof anchor === 'string'
168
+ ? names.indexOf(anchor) + (names.includes(anchor) ? 1 : 0)
169
+ : names.indexOf(anchor.before);
170
+ json.modify(path, value, exists || index < 0 ? undefined : () => index);
171
+ }
172
+ /**
173
+ * Applies the differences between two values as edits to the values that changed, so everything
174
+ * else keeps its text and order. A new property is appended to its object.
175
+ * @param json - The file.
176
+ * @param path - The path of both values.
177
+ * @param before - The value in the file.
178
+ * @param after - The value to write.
179
+ */
180
+ function applyDifferences(json, path, before, after) {
181
+ for (const key of Object.keys(before)) {
182
+ if (after[key] === undefined)
183
+ json.modify([...path, key], undefined);
184
+ }
185
+ for (const [key, value] of Object.entries(after)) {
186
+ if (value === undefined)
187
+ continue;
188
+ const current = before[key];
189
+ if (isRecord(current) && isRecord(value)) {
190
+ applyDifferences(json, [...path, key], current, value);
191
+ }
192
+ else if (JSON.stringify(current) !== JSON.stringify(value)) {
193
+ json.modify([...path, key], value, false);
194
+ }
195
+ }
196
+ }
197
+ /**
198
+ * Updates an existing target to a value with the smallest text edits: only the values that differ
199
+ * are written, so the rest of the target keeps the layout and key order of the user's file.
200
+ * Writes the whole target when it does not exist.
201
+ * @param tree - The workspace tree.
202
+ * @param project - The project.
203
+ * @param name - The target.
204
+ * @param value - The target as it should be.
205
+ */
206
+ function updateTarget(tree, project, name, value) {
207
+ const json = new json_file_1.JsonFile(tree, project.file);
208
+ const path = [...project.targetsPath, name];
209
+ const current = json.get(path);
210
+ if (isRecord(current))
211
+ applyDifferences(json, path, current, value);
212
+ else
213
+ writeTarget(tree, project, name, value);
214
+ }
215
+ /**
216
+ * Renames a target by rewriting its key, so the target keeps its text and its place.
217
+ * @param tree - The workspace tree.
218
+ * @param project - The project.
219
+ * @param from - The current name.
220
+ * @param to - The new name, which no target may have.
221
+ */
222
+ function renameTarget(tree, project, from, to) {
223
+ new json_file_1.JsonFile(tree, project.file).rename([...project.targetsPath, from], to);
224
+ }
225
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../libs/builder/schematics/migrate-to-vite/setup/workspace.ts"],"names":[],"mappings":";;AAyDA,sCAEC;AAGD,gCAEC;AAoFD,sDAgBC;AAMD,oDAMC;AAGD,8CAUC;AAGD,0CASC;AAYD,kCAsBC;AAuCD,oCAWC;AASD,oCAOC;AA5SD,+BAA6B;AAE7B,2CAAiD;AA4CjD,SAAS,SAAS,CAAC,KAAyB;IAC1C,MAAM,UAAU,GAAG,YAAK,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACjG,OAAO,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC9C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,2CAA2C;AAC3C,SAAgB,aAAa,CAAC,MAAmC;IAC/D,OAAO,MAAM,EAAE,OAAO,IAAI,MAAM,EAAE,QAAQ,CAAC;AAC7C,CAAC;AAED,8FAA8F;AAC9F,SAAgB,UAAU,CAAC,MAAuB;IAChD,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG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AAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,YAAY,CAC1B,IAAU,EACV,OAAyB,EACzB,IAAY,EACZ,KAAsB;IAEtB,MAAM,IAAI,GAAG,IAAI,oBAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,QAAQ,CAAC,OAAO,CAAC;QAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;;QAC/D,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,IAAU,EACV,OAAyB,EACzB,IAAY,EACZ,EAAU;IAEV,IAAI,oBAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ import { Retarget } from './analyze';
3
+ import { LegacyTargetEdit } from './legacy-folder';
4
+ /**
5
+ * What a migration changed, kept next to the report so that `--revert` can undo exactly that and
6
+ * a second run can tell its own files from files the user wrote. Everything is plain, sorted JSON,
7
+ * so the same migration always writes the same bytes.
8
+ */
9
+ export interface MigrationState {
10
+ schemaVersion: 1;
11
+ project: string;
12
+ /** The build target, and the name its original was kept under. */
13
+ build: {
14
+ name: string;
15
+ legacy: string;
16
+ };
17
+ /** The serve target, and the name its original was kept under. */
18
+ serve?: {
19
+ name: string;
20
+ legacy: string;
21
+ };
22
+ retargets: Retarget[];
23
+ /** Files the migration created, with the SHA-256 of the content it wrote. */
24
+ created: {
25
+ [file: string]: string;
26
+ };
27
+ /** Files the migration changed, with the SHA-256 of the content it wrote; originals are in `backup/`. */
28
+ modified: {
29
+ [file: string]: string;
30
+ };
31
+ /** Dependencies the migration added to package.json. */
32
+ dependencies: {
33
+ [name: string]: string;
34
+ };
35
+ /** The generated folder the legacy engine wrote and the new engine owns. */
36
+ generatedFolder?: string;
37
+ /** Whether the migration deleted the legacy engine's files in `generatedFolder`. */
38
+ legacyOutputDeleted?: boolean;
39
+ /** The new engine's cache folder, deleted by `--revert`. */
40
+ cacheFolder?: string;
41
+ /** Target name to the hash of the Vite target the migration wrote, to tell later edits apart. */
42
+ targetHashes?: {
43
+ [name: string]: string;
44
+ };
45
+ /**
46
+ * The generated folder of the kept legacy targets, and the values of those targets the migration
47
+ * changed so that they write it. A second run and `--revert` change them back.
48
+ */
49
+ legacyFolder?: {
50
+ folder: string;
51
+ edits: LegacyTargetEdit[];
52
+ };
53
+ }
54
+ /** The folder of a project's migration state, report and backups. */
55
+ export declare function stateFolder(project: string): string;
56
+ export declare function statePath(project: string): string;
57
+ export declare function reportPath(project: string): string;
58
+ /** The backup of a changed file; `.bak`, so no compiler, linter or test runner picks it up. */
59
+ export declare function backupPath(project: string, file: string): string;
60
+ export declare function readState(tree: Tree, project: string): MigrationState | undefined;
61
+ export declare function serializeState(state: MigrationState): string;
62
+ /** Writes a file, creating or overwriting it; a no-op when the content is already the same. */
63
+ export declare function writeFile(tree: Tree, file: string, content: string): void;
64
+ /** Deletes every file under a folder of the tree. */
65
+ export declare function deleteFolder(tree: Tree, folder: string): number;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stateFolder = stateFolder;
4
+ exports.statePath = statePath;
5
+ exports.reportPath = reportPath;
6
+ exports.backupPath = backupPath;
7
+ exports.readState = readState;
8
+ exports.serializeState = serializeState;
9
+ exports.writeFile = writeFile;
10
+ exports.deleteFolder = deleteFolder;
11
+ const schematics_1 = require("@angular-devkit/schematics");
12
+ const path_1 = require("path");
13
+ /** The folder of a project's migration state, report and backups. */
14
+ function stateFolder(project) {
15
+ return path_1.posix.join('.ng-doc-migration', project);
16
+ }
17
+ function statePath(project) {
18
+ return path_1.posix.join(stateFolder(project), 'state.json');
19
+ }
20
+ function reportPath(project) {
21
+ return path_1.posix.join(stateFolder(project), 'report.md');
22
+ }
23
+ /** The backup of a changed file; `.bak`, so no compiler, linter or test runner picks it up. */
24
+ function backupPath(project, file) {
25
+ return `${path_1.posix.join(stateFolder(project), 'backup', file)}.bak`;
26
+ }
27
+ function readState(tree, project) {
28
+ const file = statePath(project);
29
+ if (!tree.exists(file))
30
+ return undefined;
31
+ const invalid = (reason) => new schematics_1.SchematicsException(`[NGDOC_MIGRATE_STATE] ${file} ${reason}. Restore it from version control. To migrate again ` +
32
+ `without it, restore the original targets first (for example with git), then delete ` +
33
+ `${stateFolder(project)}; --revert needs this file.`);
34
+ let state;
35
+ try {
36
+ state = JSON.parse(tree.readText(file));
37
+ }
38
+ catch {
39
+ throw invalid('is not valid JSON');
40
+ }
41
+ if (!state ||
42
+ state.schemaVersion !== 1 ||
43
+ state.project !== project ||
44
+ typeof state.build?.name !== 'string' ||
45
+ typeof state.build?.legacy !== 'string') {
46
+ throw invalid(`does not describe a migration of "${project}"`);
47
+ }
48
+ return {
49
+ ...state,
50
+ retargets: state.retargets ?? [],
51
+ created: state.created ?? {},
52
+ modified: state.modified ?? {},
53
+ dependencies: state.dependencies ?? {},
54
+ };
55
+ }
56
+ function sorted(record) {
57
+ return Object.fromEntries(Object.entries(record).sort(([left], [right]) => (left < right ? -1 : 1)));
58
+ }
59
+ function serializeState(state) {
60
+ return `${JSON.stringify({
61
+ schemaVersion: state.schemaVersion,
62
+ project: state.project,
63
+ build: state.build,
64
+ ...(state.serve ? { serve: state.serve } : {}),
65
+ retargets: [...state.retargets].sort((left, right) => (left.target < right.target ? -1 : 1)),
66
+ created: sorted(state.created),
67
+ modified: sorted(state.modified),
68
+ dependencies: sorted(state.dependencies),
69
+ ...(state.generatedFolder ? { generatedFolder: state.generatedFolder } : {}),
70
+ ...(state.legacyOutputDeleted ? { legacyOutputDeleted: true } : {}),
71
+ ...(state.cacheFolder ? { cacheFolder: state.cacheFolder } : {}),
72
+ ...(state.targetHashes ? { targetHashes: sorted(state.targetHashes) } : {}),
73
+ ...(state.legacyFolder ? { legacyFolder: state.legacyFolder } : {}),
74
+ }, null, 2)}\n`;
75
+ }
76
+ /** Writes a file, creating or overwriting it; a no-op when the content is already the same. */
77
+ function writeFile(tree, file, content) {
78
+ if (!tree.exists(file))
79
+ tree.create(file, content);
80
+ else if (tree.readText(file) !== content)
81
+ tree.overwrite(file, content);
82
+ }
83
+ /** Deletes every file under a folder of the tree. */
84
+ function deleteFolder(tree, folder) {
85
+ let count = 0;
86
+ tree.getDir(folder).visit((file) => {
87
+ tree.delete(file);
88
+ count++;
89
+ });
90
+ return count;
91
+ }
92
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/migrate-to-vite/state.ts"],"names":[],"mappings":";;AAyCA,kCAEC;AAED,8BAEC;AAED,gCAEC;AAGD,gCAEC;AAED,8BA+BC;AAQD,wCAoBC;AAGD,8BAGC;AAGD,oCAOC;AArID,2DAAuE;AACvE,+BAA6B;AAuC7B,qEAAqE;AACrE,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,YAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,S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,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClB,KAAK,EAAE,CAAC;IACV,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ import { UnitTestTree } from '@angular-devkit/schematics/testing';
3
+ /** The files of a workspace, by workspace-relative path. */
4
+ export type Files = Record<string, string>;
5
+ export declare function treeOf(files: Files): UnitTestTree;
6
+ /** Every file of a tree with its content, for whole-tree comparisons. */
7
+ export declare function snapshot(tree: Tree): Files;
8
+ /**
9
+ * A standalone, zoneless Angular 22 application with SSR, as `ng new --ssr` creates it, after
10
+ * the NgDoc `ng add` schematic switched it to the legacy NgDoc builders.
11
+ */
12
+ export declare function standaloneApp(): Files;
13
+ /** An NgModule application with Zone.js and no server rendering, on the legacy builders. */
14
+ export declare function ngModuleApp(): Files;
15
+ /** A standalone application whose build target sets most of the options the migration handles. */
16
+ export declare function customOptionsApp(): Files;
17
+ /** An Nx workspace: the project lives in `apps/docs/project.json` and uses `executor`. */
18
+ export declare function nxApp(): Files;