@analogjs/platform 3.0.0-alpha.3 → 3.0.0-alpha.31

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 (329) hide show
  1. package/package.json +30 -19
  2. package/src/index.d.ts +9 -2
  3. package/src/index.js +11 -3
  4. package/src/index.js.map +1 -0
  5. package/src/lib/clear-client-page-endpoint.d.ts +2 -2
  6. package/src/lib/clear-client-page-endpoint.js +22 -32
  7. package/src/lib/clear-client-page-endpoint.js.map +1 -0
  8. package/src/lib/content/marked/index.d.ts +5 -5
  9. package/src/lib/content/marked/index.js +10 -6
  10. package/src/lib/content/marked/index.js.map +1 -0
  11. package/src/lib/content/marked/marked-content-highlighter.d.ts +2 -2
  12. package/src/lib/content/marked/marked-content-highlighter.js +6 -3
  13. package/src/lib/content/marked/marked-content-highlighter.js.map +1 -0
  14. package/src/lib/content/marked/marked-setup.service.d.ts +8 -8
  15. package/src/lib/content/marked/marked-setup.service.js +44 -54
  16. package/src/lib/content/marked/marked-setup.service.js.map +1 -0
  17. package/src/lib/content/prism/angular.js +18 -19
  18. package/src/lib/content/prism/angular.js.map +1 -0
  19. package/src/lib/content/prism/index.d.ts +1 -1
  20. package/src/lib/content/prism/index.js +10 -7
  21. package/src/lib/content/prism/index.js.map +1 -0
  22. package/src/lib/content/prism/options.d.ts +1 -1
  23. package/src/lib/content/prism/prism-highlighter.d.ts +5 -5
  24. package/src/lib/content/prism/prism-highlighter.js +33 -33
  25. package/src/lib/content/prism/prism-highlighter.js.map +1 -0
  26. package/src/lib/content/shiki/index.d.ts +3 -3
  27. package/src/lib/content/shiki/index.js +22 -28
  28. package/src/lib/content/shiki/index.js.map +1 -0
  29. package/src/lib/content/shiki/options.d.ts +8 -7
  30. package/src/lib/content/shiki/shiki-highlighter.d.ts +14 -13
  31. package/src/lib/content/shiki/shiki-highlighter.js +49 -43
  32. package/src/lib/content/shiki/shiki-highlighter.js.map +1 -0
  33. package/src/lib/content-plugin.d.ts +19 -19
  34. package/src/lib/content-plugin.js +183 -196
  35. package/src/lib/content-plugin.js.map +1 -0
  36. package/src/lib/deps-plugin.d.ts +2 -2
  37. package/src/lib/deps-plugin.js +80 -82
  38. package/src/lib/deps-plugin.js.map +1 -0
  39. package/src/lib/discover-library-routes.d.ts +13 -0
  40. package/src/lib/discover-library-routes.js +64 -0
  41. package/src/lib/discover-library-routes.js.map +1 -0
  42. package/src/lib/i18n-extract-plugin.d.ts +33 -0
  43. package/src/lib/json-ld-manifest-plugin.d.ts +41 -0
  44. package/src/lib/json-ld-manifest-plugin.js +84 -0
  45. package/src/lib/json-ld-manifest-plugin.js.map +1 -0
  46. package/src/lib/nx-plugin/builders.json +7 -0
  47. package/src/lib/nx-plugin/executors.json +5 -0
  48. package/src/lib/nx-plugin/generators.json +25 -0
  49. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/camelCase.js +13 -0
  50. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/camelCase.js.map +1 -0
  51. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/capitalize.js +8 -0
  52. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/capitalize.js.map +1 -0
  53. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/words.js +9 -0
  54. package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/words.js.map +1 -0
  55. package/src/lib/nx-plugin/package.json +1 -5
  56. package/src/lib/nx-plugin/src/executors/vite/compat.d.ts +1 -1
  57. package/src/lib/nx-plugin/src/executors/vite/compat.js +6 -7
  58. package/src/lib/nx-plugin/src/executors/vite/compat.js.map +1 -1
  59. package/src/lib/nx-plugin/src/executors/vite/schema.d.ts +1 -1
  60. package/src/lib/nx-plugin/src/executors/vite/vite.impl.d.ts +1 -1
  61. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js +5 -4
  62. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js.map +1 -1
  63. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.d.ts +1 -1
  64. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js +6 -7
  65. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js.map +1 -1
  66. package/src/lib/nx-plugin/src/executors/vite-dev-server/schema.d.ts +1 -1
  67. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.d.ts +1 -1
  68. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js +5 -4
  69. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js.map +1 -1
  70. package/src/lib/nx-plugin/src/executors/vitest/compat.d.ts +1 -1
  71. package/src/lib/nx-plugin/src/executors/vitest/compat.js +6 -7
  72. package/src/lib/nx-plugin/src/executors/vitest/compat.js.map +1 -1
  73. package/src/lib/nx-plugin/src/executors/vitest/schema.d.ts +1 -1
  74. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.d.ts +1 -1
  75. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js +5 -4
  76. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js.map +1 -1
  77. package/src/lib/nx-plugin/src/generators/app/compat.d.ts +9 -3
  78. package/src/lib/nx-plugin/src/generators/app/compat.js +17 -7
  79. package/src/lib/nx-plugin/src/generators/app/compat.js.map +1 -1
  80. package/src/lib/nx-plugin/src/generators/app/files/root/tsconfig.base.json +3 -6
  81. package/src/lib/nx-plugin/src/generators/app/files/template-angular/src/test-setup.ts__template__ +1 -0
  82. package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.app.json__template__ +1 -3
  83. package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.json__template__ +2 -1
  84. package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__ +6 -2
  85. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/src/app/app.config.ts__template__ +0 -6
  86. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/tsconfig.json__template__ +4 -2
  87. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ +0 -20
  88. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/src/app/app.config.ts__template__ +0 -6
  89. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/tsconfig.json__template__ +4 -2
  90. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__ +0 -20
  91. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/src/app/app.config.ts__template__ +0 -6
  92. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.app.json__template__ +1 -3
  93. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.json__template__ +4 -2
  94. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/vite.config.ts__template__ +0 -11
  95. package/src/lib/nx-plugin/src/generators/app/generator.d.ts +11 -11
  96. package/src/lib/nx-plugin/src/generators/app/generator.js +78 -92
  97. package/src/lib/nx-plugin/src/generators/app/generator.js.map +1 -1
  98. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.d.ts +1 -1
  99. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.d.ts +1 -1
  100. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js +72 -81
  101. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js.map +1 -1
  102. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.d.ts +2 -2
  103. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js +24 -58
  104. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js.map +1 -1
  105. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.d.ts +2 -2
  106. package/src/lib/nx-plugin/src/generators/app/lib/add-files.d.ts +2 -2
  107. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js +15 -16
  108. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js.map +1 -1
  109. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.d.ts +2 -2
  110. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js +14 -13
  111. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js.map +1 -1
  112. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.d.ts +7 -7
  113. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +18 -30
  114. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
  115. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.d.ts +4 -5
  116. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +61 -147
  117. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js.map +1 -1
  118. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.d.ts +1 -1
  119. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.d.ts +2 -2
  120. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js +17 -20
  121. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js.map +1 -1
  122. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.d.ts +2 -2
  123. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.d.ts +1 -1
  124. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js +14 -18
  125. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js.map +1 -1
  126. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.d.ts +2 -3
  127. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js +6 -10
  128. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js.map +1 -1
  129. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.d.ts +0 -3
  130. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.d.ts +1 -6
  131. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +12 -17
  132. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js +11 -37
  133. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js.map +1 -1
  134. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.d.ts +1 -1
  135. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js +11 -15
  136. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js.map +1 -1
  137. package/src/lib/nx-plugin/src/generators/app/versions.d.ts +0 -28
  138. package/src/lib/nx-plugin/src/generators/init/compat.d.ts +9 -3
  139. package/src/lib/nx-plugin/src/generators/init/compat.js +17 -7
  140. package/src/lib/nx-plugin/src/generators/init/compat.js.map +1 -1
  141. package/src/lib/nx-plugin/src/generators/init/files/vite.config.ts__template__ +2 -6
  142. package/src/lib/nx-plugin/src/generators/init/generator.d.ts +3 -3
  143. package/src/lib/nx-plugin/src/generators/init/generator.js +54 -65
  144. package/src/lib/nx-plugin/src/generators/init/generator.js.map +1 -1
  145. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.d.ts +1 -1
  146. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js +19 -20
  147. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js.map +1 -1
  148. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.d.ts +2 -2
  149. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js +20 -21
  150. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js.map +1 -1
  151. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.d.ts +2 -2
  152. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js +56 -66
  153. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js.map +1 -1
  154. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.d.ts +1 -1
  155. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js +12 -11
  156. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js.map +1 -1
  157. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.d.ts +2 -2
  158. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js +17 -21
  159. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js.map +1 -1
  160. package/src/lib/nx-plugin/src/generators/init/lib/update-main.d.ts +2 -2
  161. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js +12 -15
  162. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js.map +1 -1
  163. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.d.ts +2 -2
  164. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js +19 -31
  165. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js.map +1 -1
  166. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.d.ts +2 -2
  167. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js +43 -51
  168. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js.map +1 -1
  169. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.d.ts +2 -2
  170. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js +27 -34
  171. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js.map +1 -1
  172. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.d.ts +2 -2
  173. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js +19 -20
  174. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js.map +1 -1
  175. package/src/lib/nx-plugin/src/generators/init/test-files/src/test-setup.ts__template__ +1 -0
  176. package/src/lib/nx-plugin/src/generators/page/__snapshots__/generator.spec.ts.snap +0 -7
  177. package/src/lib/nx-plugin/src/generators/page/compat.d.ts +9 -0
  178. package/src/lib/nx-plugin/src/generators/page/compat.js +18 -0
  179. package/src/lib/nx-plugin/src/generators/page/compat.js.map +1 -0
  180. package/src/lib/nx-plugin/src/generators/page/files/__fileName__.page.ts__template__ +0 -1
  181. package/src/lib/nx-plugin/src/generators/page/generator.d.ts +3 -4
  182. package/src/lib/nx-plugin/src/generators/page/generator.js +34 -44
  183. package/src/lib/nx-plugin/src/generators/page/generator.js.map +1 -1
  184. package/src/lib/nx-plugin/src/generators/preset/__snapshots__/generator.spec.ts.snap +5 -4
  185. package/src/lib/nx-plugin/src/generators/preset/generator.d.ts +3 -3
  186. package/src/lib/nx-plugin/src/generators/preset/generator.js +17 -43
  187. package/src/lib/nx-plugin/src/generators/preset/generator.js.map +1 -1
  188. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.d.ts +9 -3
  189. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js +17 -7
  190. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js.map +1 -1
  191. package/src/lib/nx-plugin/src/generators/setup-vitest/files/src/test-setup.ts__template__ +1 -0
  192. package/src/lib/nx-plugin/src/generators/setup-vitest/files/vite.config.mts__template__ +0 -6
  193. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.d.ts +3 -3
  194. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js +32 -42
  195. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js.map +1 -1
  196. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.d.ts +1 -1
  197. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js +7 -7
  198. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js.map +1 -1
  199. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.d.ts +2 -2
  200. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js +20 -27
  201. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js.map +1 -1
  202. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.d.ts +2 -2
  203. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js +19 -22
  204. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js.map +1 -1
  205. package/src/lib/nx-plugin/src/index.js +0 -2
  206. package/src/lib/nx-plugin/src/utils/version-utils.d.ts +1 -1
  207. package/src/lib/nx-plugin/src/utils/version-utils.js +20 -27
  208. package/src/lib/nx-plugin/src/utils/version-utils.js.map +1 -1
  209. package/src/lib/nx-plugin/src/utils/versions/dependencies.js +42 -62
  210. package/src/lib/nx-plugin/src/utils/versions/dependencies.js.map +1 -1
  211. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js +49 -83
  212. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js.map +1 -1
  213. package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.d.ts +1 -1
  214. package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js +33 -20
  215. package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js.map +1 -1
  216. package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.d.ts +1 -1
  217. package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js +33 -20
  218. package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js.map +1 -1
  219. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.d.ts +8 -8
  220. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js +37 -23
  221. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js.map +1 -1
  222. package/src/lib/options.d.ts +224 -80
  223. package/src/lib/platform-plugin.d.ts +2 -2
  224. package/src/lib/platform-plugin.js +88 -62
  225. package/src/lib/platform-plugin.js.map +1 -0
  226. package/src/lib/route-file-discovery.d.ts +23 -0
  227. package/src/lib/route-file-discovery.js +114 -0
  228. package/src/lib/route-file-discovery.js.map +1 -0
  229. package/src/lib/route-generation-plugin.d.ts +3 -0
  230. package/src/lib/route-generation-plugin.js +45 -0
  231. package/src/lib/route-generation-plugin.js.map +1 -0
  232. package/src/lib/route-idiom-diagnostics.d.ts +13 -0
  233. package/src/lib/route-idiom-diagnostics.js +160 -0
  234. package/src/lib/route-idiom-diagnostics.js.map +1 -0
  235. package/src/lib/route-manifest.d.ts +122 -0
  236. package/src/lib/route-manifest.js +431 -0
  237. package/src/lib/route-manifest.js.map +1 -0
  238. package/src/lib/router-plugin.d.ts +19 -19
  239. package/src/lib/router-plugin.js +234 -150
  240. package/src/lib/router-plugin.js.map +1 -0
  241. package/src/lib/ssr/inject-html-plugin.d.ts +1 -1
  242. package/src/lib/ssr/inject-html-plugin.js +25 -25
  243. package/src/lib/ssr/inject-html-plugin.js.map +1 -0
  244. package/src/lib/ssr/ssr-build-plugin.d.ts +18 -2
  245. package/src/lib/ssr/ssr-build-plugin.js +54 -30
  246. package/src/lib/ssr/ssr-build-plugin.js.map +1 -0
  247. package/src/lib/style-pipeline.d.ts +34 -0
  248. package/src/lib/style-pipeline.js +32 -0
  249. package/src/lib/style-pipeline.js.map +1 -0
  250. package/src/lib/style-preprocessor.d.ts +28 -0
  251. package/src/lib/style-preprocessor.js +35 -0
  252. package/src/lib/style-preprocessor.js.map +1 -0
  253. package/src/lib/tailwind-preprocessor.d.ts +23 -0
  254. package/src/lib/tailwind-preprocessor.js +57 -0
  255. package/src/lib/tailwind-preprocessor.js.map +1 -0
  256. package/src/lib/typed-routes-plugin.d.ts +50 -0
  257. package/src/lib/typed-routes-plugin.js +234 -0
  258. package/src/lib/typed-routes-plugin.js.map +1 -0
  259. package/src/lib/utils/debug-harness.d.ts +23 -0
  260. package/src/lib/utils/debug-harness.js +88 -0
  261. package/src/lib/utils/debug-harness.js.map +1 -0
  262. package/src/lib/utils/debug-log-file.d.ts +5 -0
  263. package/src/lib/utils/debug-log-file.js +56 -0
  264. package/src/lib/utils/debug-log-file.js.map +1 -0
  265. package/src/lib/utils/debug.d.ts +22 -0
  266. package/src/lib/utils/debug.js +27 -0
  267. package/src/lib/utils/debug.js.map +1 -0
  268. package/src/lib/utils/rolldown.d.ts +3 -0
  269. package/src/lib/utils/rolldown.js +15 -0
  270. package/src/lib/utils/rolldown.js.map +1 -0
  271. package/src/server-mode-plugin.d.ts +6 -6
  272. package/src/server-mode-plugin.js +16 -18
  273. package/src/server-mode-plugin.js.map +1 -0
  274. package/src/style-pipeline.d.ts +1 -0
  275. package/src/style-pipeline.js +2 -0
  276. package/src/style-preprocessor.d.ts +1 -0
  277. package/src/style-preprocessor.js +2 -0
  278. package/README.md +0 -5
  279. package/src/lib/content/prism/options.js +0 -1
  280. package/src/lib/content/shiki/options.js +0 -1
  281. package/src/lib/nx-plugin/README.md +0 -23
  282. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/postcss.config.cjs__template__ +0 -10
  283. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/tailwind.config.cjs__template__ +0 -14
  284. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/postcss.config.cjs__template__ +0 -10
  285. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/tailwind.config.ts__template__ +0 -14
  286. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/.postcssrc.json +0 -5
  287. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/tailwind.config.ts__template__ +0 -14
  288. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/index.html__template__ +0 -15
  289. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.spec.ts__template__ +0 -17
  290. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.ts__template__ +0 -10
  291. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/favicon.ico__template__ +0 -0
  292. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.providers.ts__template__ +0 -5
  293. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.server.ts__template__ +0 -23
  294. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.ts__template__ +0 -17
  295. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/.gitkeep__template__ +0 -0
  296. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/analog.svg__template__ +0 -1
  297. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/vite.svg__template__ +0 -1
  298. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/server/routes/v1/hello.ts__template__ +0 -3
  299. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/styles.css__template__ +0 -4
  300. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/test-setup.ts__template__ +0 -12
  301. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/vite-env.d.ts__template__ +0 -1
  302. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.app.json__template__ +0 -16
  303. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.editor.json__template__ +0 -7
  304. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.json__template__ +0 -32
  305. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.spec.json__template__ +0 -14
  306. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/vite.config.ts__template__ +0 -69
  307. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js +0 -15
  308. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js.map +0 -1
  309. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js +0 -58
  310. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js.map +0 -1
  311. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js +0 -47
  312. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js.map +0 -1
  313. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js +0 -110
  314. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js.map +0 -1
  315. package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js +0 -56
  316. package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js.map +0 -1
  317. package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js +0 -72
  318. package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js.map +0 -1
  319. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js +0 -46
  320. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js.map +0 -1
  321. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js +0 -37
  322. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js.map +0 -1
  323. package/src/lib/nx-plugin/src/generators/app/versions.js +0 -43
  324. package/src/lib/nx-plugin/src/generators/app/versions.js.map +0 -1
  325. package/src/lib/nx-plugin/src/index.d.ts +0 -0
  326. package/src/lib/nx-plugin/src/index.js.map +0 -1
  327. package/src/lib/options.js +0 -1
  328. package/src/lib/ssr/ssr-xhr-plugin.d.ts +0 -2
  329. package/src/lib/ssr/ssr-xhr-plugin.js +0 -28
@@ -1,24 +1,38 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NX_X_LATEST_VITEST = exports.NX_X_LATEST_VITE = exports.V19_X_VITE = exports.V19_X_VITEST = exports.V19_X_VITE_TSCONFIG_PATHS = exports.V19_X_JSDOM = exports.V19_X_NX_VITE = exports.V19_X_NX_ANGULAR = exports.V19_X_ANALOG_JS_VITEST_ANGULAR = exports.V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = exports.V19_X_ANALOG_JS_PLATFORM = exports.V19_X_PRISMJS = exports.V19_X_MARKED_MANGLE = exports.V19_X_MARKED_HIGHLIGHT = exports.V19_X_MARKED_GFM_HEADING_ID = exports.V19_X_MARKED = exports.V19_X_ANALOG_JS_CONTENT = exports.V19_X_ANALOG_JS_ROUTER = void 0;
4
- // V19_X
5
- exports.V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.3';
6
- exports.V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.3';
7
- exports.V19_X_MARKED = '^15.0.7';
8
- exports.V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';
9
- exports.V19_X_MARKED_HIGHLIGHT = '^2.2.1';
10
- exports.V19_X_MARKED_MANGLE = '^1.1.10';
11
- exports.V19_X_PRISMJS = '^1.29.0';
12
- // devDependencies
13
- exports.V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.3';
14
- exports.V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.3';
15
- exports.V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.3';
16
- exports.V19_X_NX_ANGULAR = '^22.0.0';
17
- exports.V19_X_NX_VITE = '^22.0.0';
18
- exports.V19_X_JSDOM = '^22.0.0';
19
- exports.V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';
20
- exports.V19_X_VITEST = '^3.0.0';
21
- exports.V19_X_VITE = '^5.0.0';
22
- exports.NX_X_LATEST_VITE = '^7.0.0';
23
- exports.NX_X_LATEST_VITEST = '^4.0.0';
1
+ //#region packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts
2
+ var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.31";
3
+ var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.31";
4
+ var V19_X_MARKED = "^18.0.0";
5
+ var V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
6
+ var V19_X_MARKED_HIGHLIGHT = "^2.2.1";
7
+ var V19_X_MARKED_MANGLE = "^1.1.10";
8
+ var V19_X_PRISMJS = "^1.29.0";
9
+ var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.31";
10
+ var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.31";
11
+ var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.31";
12
+ var V19_X_NX_VITE = "^22.0.0";
13
+ var V19_X_JSDOM = "^22.0.0";
14
+ var V19_X_VITE_TSCONFIG_PATHS = "^4.2.0";
15
+ var V19_X_VITEST = "^3.0.0";
16
+ var V19_X_VITE = "^6.0.0";
17
+ var NX_X_LATEST_VITE = "^8.0.0";
18
+ var NX_X_LATEST_VITEST = "^4.0.0";
19
+ //#endregion
20
+ exports.NX_X_LATEST_VITE = NX_X_LATEST_VITE;
21
+ exports.NX_X_LATEST_VITEST = NX_X_LATEST_VITEST;
22
+ exports.V19_X_ANALOG_JS_CONTENT = V19_X_ANALOG_JS_CONTENT;
23
+ exports.V19_X_ANALOG_JS_PLATFORM = V19_X_ANALOG_JS_PLATFORM;
24
+ exports.V19_X_ANALOG_JS_ROUTER = V19_X_ANALOG_JS_ROUTER;
25
+ exports.V19_X_ANALOG_JS_VITEST_ANGULAR = V19_X_ANALOG_JS_VITEST_ANGULAR;
26
+ exports.V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR;
27
+ exports.V19_X_JSDOM = V19_X_JSDOM;
28
+ exports.V19_X_MARKED = V19_X_MARKED;
29
+ exports.V19_X_MARKED_GFM_HEADING_ID = V19_X_MARKED_GFM_HEADING_ID;
30
+ exports.V19_X_MARKED_HIGHLIGHT = V19_X_MARKED_HIGHLIGHT;
31
+ exports.V19_X_MARKED_MANGLE = V19_X_MARKED_MANGLE;
32
+ exports.V19_X_NX_VITE = V19_X_NX_VITE;
33
+ exports.V19_X_PRISMJS = V19_X_PRISMJS;
34
+ exports.V19_X_VITE = V19_X_VITE;
35
+ exports.V19_X_VITEST = V19_X_VITEST;
36
+ exports.V19_X_VITE_TSCONFIG_PATHS = V19_X_VITE_TSCONFIG_PATHS;
37
+
24
38
  //# sourceMappingURL=versions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../../../../../../packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACK,QAAA,sBAAsB,GAAG,gBAAgB,CAAC;AAC1C,QAAA,uBAAuB,GAAG,gBAAgB,CAAC;AAC3C,QAAA,YAAY,GAAG,SAAS,CAAC;AACzB,QAAA,2BAA2B,GAAG,QAAQ,CAAC;AACvC,QAAA,sBAAsB,GAAG,QAAQ,CAAC;AAClC,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,aAAa,GAAG,SAAS,CAAC;AAEvC,kBAAkB;AACL,QAAA,wBAAwB,GAAG,gBAAgB,CAAC;AAC5C,QAAA,mCAAmC,GAAG,gBAAgB,CAAC;AACvD,QAAA,8BAA8B,GAAG,gBAAgB,CAAC;AAClD,QAAA,gBAAgB,GAAG,SAAS,CAAC;AAC7B,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,yBAAyB,GAAG,QAAQ,CAAC;AACrC,QAAA,YAAY,GAAG,QAAQ,CAAC;AACxB,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,gBAAgB,GAAG,QAAQ,CAAC;AAC5B,QAAA,kBAAkB,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.31';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.31';\nexport const V19_X_MARKED = '^18.0.0';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.31';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.31';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.31';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
@@ -1,85 +1,229 @@
1
- import type { PluginOptions } from '@analogjs/vite-plugin-angular';
2
- import type { NitroConfig, PrerenderRoute } from 'nitro/types';
3
- import type { SitemapConfig, PrerenderContentDir, PrerenderContentFile, PrerenderRouteConfig } from '@analogjs/vite-plugin-nitro';
4
- import { ContentPluginOptions } from './content-plugin.js';
5
- declare module 'nitro/types' {
6
- interface NitroRouteConfig {
7
- ssr?: boolean;
8
- }
9
- interface NitroRouteRules {
10
- ssr?: boolean;
11
- }
1
+ import type { PluginOptions } from "@analogjs/vite-plugin-angular";
2
+ import type { NitroConfig, PrerenderRoute } from "nitro/types";
3
+ import type { SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform, PrerenderContentDir, PrerenderContentFile, PrerenderSitemapConfig, PrerenderRouteConfig } from "@analogjs/vite-plugin-nitro";
4
+ import type { ContentPluginOptions } from "./content-plugin.js";
5
+ import type { DebugOption } from "./utils/debug.js";
6
+ import type { StylePipelineOptions } from "./style-pipeline.js";
7
+ declare module "nitro/types" {
8
+ interface NitroRouteConfig {
9
+ ssr?: boolean;
10
+ }
11
+ interface NitroRouteRules {
12
+ ssr?: boolean;
13
+ }
12
14
  }
13
15
  export interface PrerenderOptions {
14
- /**
15
- * Add additional routes to prerender through crawling page links.
16
- */
17
- discover?: boolean;
18
- /**
19
- * List of routes to prerender resolved statically or dynamically.
20
- */
21
- routes?: (string | PrerenderContentDir | PrerenderRouteConfig)[] | (() => Promise<(string | PrerenderContentDir | PrerenderRouteConfig | undefined)[]>);
22
- sitemap?: SitemapConfig;
23
- /** List of functions that run for each route after pre-rendering is complete. */
24
- postRenderingHooks?: ((routes: PrerenderRoute) => Promise<void>)[];
16
+ /**
17
+ * Add additional routes to prerender through crawling page links.
18
+ */
19
+ discover?: boolean;
20
+ /**
21
+ * List of routes to prerender resolved statically or dynamically.
22
+ */
23
+ routes?: (string | PrerenderContentDir | PrerenderRouteConfig)[] | (() => Promise<(string | PrerenderContentDir | PrerenderRouteConfig | undefined)[]>);
24
+ sitemap?: SitemapConfig;
25
+ /** List of functions that run for each route after pre-rendering is complete. */
26
+ postRenderingHooks?: ((routes: PrerenderRoute) => Promise<void>)[];
27
+ }
28
+ export interface I18nOptions {
29
+ /**
30
+ * The default/source locale for the application.
31
+ */
32
+ defaultLocale: string;
33
+ /**
34
+ * List of supported locale identifiers (e.g. ['en', 'fr', 'de']).
35
+ */
36
+ locales: string[];
37
+ /**
38
+ * Extract i18n messages from the build output.
39
+ * When enabled, writes a translation source file after the client build.
40
+ */
41
+ extract?: {
42
+ /**
43
+ * Output format for extracted messages.
44
+ * @default 'json'
45
+ */
46
+ format?: "json" | "xliff" | "xliff2" | "xmb";
47
+ /**
48
+ * Output file path for extracted messages, relative to project root.
49
+ * @default 'src/i18n/messages.{format extension}'
50
+ */
51
+ outFile?: string;
52
+ };
25
53
  }
26
54
  export interface Options {
27
- ssr?: boolean;
28
- ssrBuildDir?: string;
29
- /**
30
- * Prerender the static pages without producing the server output.
31
- */
32
- static?: boolean;
33
- prerender?: PrerenderOptions;
34
- entryServer?: string;
35
- /**
36
- * Pass configuration options to the internal `@analogjs/vite-plugin-angular`
37
- * plugin. Set to false to disable the internal vite plugin.
38
- */
39
- vite?: PluginOptions | false;
40
- nitro?: NitroConfig;
41
- apiPrefix?: string;
42
- jit?: boolean;
43
- index?: string;
44
- workspaceRoot?: string;
45
- content?: ContentPluginOptions;
46
- /**
47
- * Extension applied for inline styles
48
- */
49
- inlineStylesExtension?: string;
50
- /**
51
- * Enables Angular's HMR during development
52
- */
53
- liveReload?: boolean;
54
- /**
55
- * Additional page paths to include
56
- */
57
- additionalPagesDirs?: string[];
58
- /**
59
- * Additional page paths to include
60
- */
61
- additionalContentDirs?: string[];
62
- /**
63
- * Additional API paths to include
64
- */
65
- additionalAPIDirs?: string[];
66
- /**
67
- * Additional files to include in compilation
68
- */
69
- include?: string[];
70
- /**
71
- * Toggles internal API middleware.
72
- * If disabled, a proxy request is used to route /api
73
- * requests to / in the production server build.
74
- */
75
- useAPIMiddleware?: boolean;
76
- /**
77
- * Disable type checking diagnostics by the Angular compiler
78
- */
79
- disableTypeChecking?: boolean;
80
- /**
81
- * File replacements
82
- */
83
- fileReplacements?: PluginOptions['fileReplacements'];
55
+ ssr?: boolean;
56
+ ssrBuildDir?: string;
57
+ /**
58
+ * Prerender the static pages without producing the server output.
59
+ */
60
+ static?: boolean;
61
+ prerender?: PrerenderOptions;
62
+ entryServer?: string;
63
+ /**
64
+ * Pass configuration options to the internal `@analogjs/vite-plugin-angular`
65
+ * plugin. Set to `false` to disable the internal vite plugin (e.g. when
66
+ * using an alternative compiler like `@oxc-angular/vite`).
67
+ *
68
+ * `vite.build` uses Vite's native config shape and is forwarded to the
69
+ * internal Nitro/Vite build pipeline, while the remaining fields are passed
70
+ * to `@analogjs/vite-plugin-angular`.
71
+ *
72
+ * When `false`, the following top-level options are ignored because they
73
+ * are only forwarded to the internal Angular plugin: `jit`,
74
+ * `disableTypeChecking`, `hmr`, `liveReload`, `inlineStylesExtension`,
75
+ * `fileReplacements`, and `include`.
76
+ *
77
+ * Use this to configure the embedded Angular integration itself, not as the
78
+ * primary home for Analog-owned experimental features.
79
+ */
80
+ vite?: PluginOptions | false;
81
+ nitro?: NitroConfig;
82
+ apiPrefix?: string;
83
+ jit?: boolean;
84
+ index?: string;
85
+ workspaceRoot?: string;
86
+ content?: ContentPluginOptions;
87
+ /**
88
+ * Extension applied for inline styles
89
+ */
90
+ inlineStylesExtension?: string;
91
+ /**
92
+ * Enables Angular's HMR during development/watch mode.
93
+ *
94
+ * Defaults to `true` for watch mode.
95
+ */
96
+ hmr?: boolean;
97
+ /**
98
+ * @deprecated Use `hmr` instead. Kept as a compatibility alias.
99
+ */
100
+ liveReload?: boolean;
101
+ /**
102
+ * Enable debug logging for specific scopes.
103
+ *
104
+ * - `true` → enables all `analog:*` scopes (platform + angular + nitro)
105
+ * - `string[]` enables listed namespaces
106
+ * - `{ scopes?, mode? }` → object form with optional `mode: 'build' | 'dev'`
107
+ * to restrict output to a specific Vite command (omit for both)
108
+ *
109
+ * Also responds to the `DEBUG` env var (Node.js) or `localStorage.debug`
110
+ * (browser), using the `obug` convention.
111
+ */
112
+ debug?: DebugOption;
113
+ /**
114
+ * Additional page paths to include
115
+ */
116
+ additionalPagesDirs?: string[];
117
+ /**
118
+ * Additional page paths to include
119
+ */
120
+ additionalContentDirs?: string[];
121
+ /**
122
+ * Additional API paths to include
123
+ */
124
+ additionalAPIDirs?: string[];
125
+ /**
126
+ * Automatically discover route directories (pages, content, API) in
127
+ * workspace libraries by scanning `libs/**` directories directly.
128
+ *
129
+ * Discovered directories are merged with any explicit
130
+ * `additionalPagesDirs`, `additionalContentDirs`, and
131
+ * `additionalAPIDirs` values.
132
+ *
133
+ * @default false
134
+ */
135
+ discoverRoutes?: boolean;
136
+ /**
137
+ * Additional files to include in compilation
138
+ */
139
+ include?: string[];
140
+ /**
141
+ * Toggles internal API middleware.
142
+ * If disabled, a proxy request is used to route /api
143
+ * requests to / in the production server build.
144
+ */
145
+ useAPIMiddleware?: boolean;
146
+ /**
147
+ * Disable type checking diagnostics by the Angular compiler
148
+ */
149
+ disableTypeChecking?: boolean;
150
+ /**
151
+ * File replacements
152
+ */
153
+ fileReplacements?: PluginOptions["fileReplacements"];
154
+ /**
155
+ * Experimental features. These APIs are subject to change.
156
+ *
157
+ * `@analogjs/platform` is the default rollout and orchestration surface for
158
+ * Analog-owned experiments. These flags may delegate to dedicated feature
159
+ * plugins or forward options into lower-level integrations while preserving
160
+ * a single Analog-first authoring surface.
161
+ */
162
+ experimental?: {
163
+ /**
164
+ * Use Angular's experimental compilation API.
165
+ *
166
+ * This is forwarded to `@analogjs/vite-plugin-angular`'s
167
+ * `experimental.useAngularCompilationAPI`.
168
+ *
169
+ * Also accepted at `vite.experimental.useAngularCompilationAPI`
170
+ * for backwards compatibility.
171
+ *
172
+ * Has no effect when `vite` is set to `false`.
173
+ */
174
+ useAngularCompilationAPI?: boolean;
175
+ /**
176
+ * Enable typed route table generation for type-safe navigation.
177
+ *
178
+ * When enabled, `@analogjs/platform` generates a single route module
179
+ * that augments `AnalogRouteTable` with typed params and query for each
180
+ * file-based route. JSON-LD manifest generation is configured on the same
181
+ * object so both codegen features share one generated file.
182
+ *
183
+ * - `true` — generates `src/routeTree.gen.ts` with `routeJsonLdManifest`
184
+ * - `TypedRouterOptions` — customize output path or disable just the
185
+ * JSON-LD manifest piece
186
+ *
187
+ * Unlocks type-safe usage of:
188
+ * - `routePath()` — build route link objects for `[routerLink]`
189
+ * - `injectNavigate()` — typed navigation
190
+ * - `injectParams(from)` — typed params signal
191
+ * - `injectQuery(from)` — typed query signal
192
+ *
193
+ * Inspired by TanStack Router's `routeTree.gen.ts` codegen.
194
+ */
195
+ typedRouter?: boolean | TypedRouterOptions;
196
+ /**
197
+ * Experimental slot for community-maintained style-pipeline integrations.
198
+ *
199
+ * This keeps Analog's core surface intentionally narrow: community
200
+ * packages can register Vite plugins through an Analog-first config shape
201
+ * without requiring Analog itself to own design-token engines, library
202
+ * target contracts, or framework-specific theming semantics.
203
+ */
204
+ stylePipeline?: StylePipelineOptions | false;
205
+ };
206
+ }
207
+ export interface TypedRouterOptions {
208
+ /**
209
+ * Output path for the single generated route module,
210
+ * relative to the app root.
211
+ *
212
+ * @default 'src/routeTree.gen.ts'
213
+ */
214
+ outFile?: string;
215
+ /**
216
+ * Include generated `routeJsonLdManifest` data in the generated route file.
217
+ *
218
+ * @default true
219
+ */
220
+ jsonLdManifest?: boolean;
221
+ /**
222
+ * Fail production builds after regenerating a stale checked-in route file.
223
+ * Development and watch mode continue to update the file automatically.
224
+ *
225
+ * @default true
226
+ */
227
+ verifyOnBuild?: boolean;
84
228
  }
85
- export { PrerenderContentDir, PrerenderContentFile };
229
+ export type { PrerenderContentDir, PrerenderContentFile, PrerenderSitemapConfig, SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform };
@@ -1,3 +1,3 @@
1
- import { Plugin } from 'vite';
2
- import { Options } from './options.js';
1
+ import { Plugin } from "vite";
2
+ import { Options } from "./options.js";
3
3
  export declare function platformPlugin(opts?: Options): Plugin[];
@@ -1,63 +1,89 @@
1
- // eslint-disable-next-line @nx/enforce-module-boundaries -- spec uses dynamic import() for vi.mock(), not lazy-loading
2
- import viteNitroPlugin from '@analogjs/vite-plugin-nitro';
3
- import angular from '@analogjs/vite-plugin-angular';
4
- import { routerPlugin } from './router-plugin.js';
5
- import { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';
6
- import { contentPlugin } from './content-plugin.js';
7
- import { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';
8
- import { ssrXhrBuildPlugin } from './ssr/ssr-xhr-plugin.js';
9
- import { depsPlugin } from './deps-plugin.js';
10
- import { injectHTMLPlugin } from './ssr/inject-html-plugin.js';
11
- import { serverModePlugin } from '../server-mode-plugin.js';
12
- export function platformPlugin(opts = {}) {
13
- const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];
14
- const { ...platformOptions } = {
15
- ssr: true,
16
- ...opts,
17
- };
18
- let nitroOptions = platformOptions?.nitro;
19
- if (nitroOptions?.routeRules) {
20
- nitroOptions = {
21
- ...nitroOptions,
22
- routeRules: Object.keys(nitroOptions.routeRules).reduce((config, curr) => {
23
- return {
24
- ...config,
25
- [curr]: {
26
- ...config[curr],
27
- headers: {
28
- ...config[curr].headers,
29
- 'x-analog-no-ssr': config[curr]?.ssr === false ? 'true' : undefined,
30
- },
31
- },
32
- };
33
- }, nitroOptions.routeRules),
34
- };
35
- }
36
- return [
37
- ...viteNitroPlugin(platformOptions, nitroOptions),
38
- ...(platformOptions.ssr ? [ssrBuildPlugin(), ...injectHTMLPlugin()] : []),
39
- ...(!isTest ? depsPlugin(platformOptions) : []),
40
- ...routerPlugin(platformOptions),
41
- ...contentPlugin(platformOptions?.content, platformOptions),
42
- ...(opts?.vite === false
43
- ? []
44
- : angular({
45
- jit: platformOptions.jit,
46
- workspaceRoot: platformOptions.workspaceRoot,
47
- disableTypeChecking: platformOptions.disableTypeChecking ?? false,
48
- include: [
49
- ...(platformOptions.include ?? []),
50
- ...(platformOptions.additionalPagesDirs ?? []).map((pageDir) => `${pageDir}/**/*.page.ts`),
51
- ],
52
- additionalContentDirs: platformOptions.additionalContentDirs,
53
- liveReload: platformOptions.liveReload,
54
- inlineStylesExtension: platformOptions.inlineStylesExtension,
55
- fileReplacements: platformOptions.fileReplacements,
56
- ...(opts?.vite ?? {}),
57
- })),
58
- serverModePlugin(),
59
- ssrXhrBuildPlugin(),
60
- clearClientPageEndpointsPlugin(),
61
- ];
1
+ import { activateDeferredDebug, applyDebugOption, debugPlatform } from "./utils/debug.js";
2
+ import { discoverLibraryRoutes } from "./discover-library-routes.js";
3
+ import { routerPlugin } from "./router-plugin.js";
4
+ import { ssrBuildPlugin } from "./ssr/ssr-build-plugin.js";
5
+ import { contentPlugin } from "./content-plugin.js";
6
+ import { clearClientPageEndpointsPlugin } from "./clear-client-page-endpoint.js";
7
+ import { depsPlugin } from "./deps-plugin.js";
8
+ import { injectHTMLPlugin } from "./ssr/inject-html-plugin.js";
9
+ import { serverModePlugin } from "../server-mode-plugin.js";
10
+ import { routeGenerationPlugin } from "./route-generation-plugin.js";
11
+ import { resolveStylePipelinePlugins } from "./style-pipeline.js";
12
+ import viteNitroPlugin from "@analogjs/vite-plugin-nitro";
13
+ import angular from "@analogjs/vite-plugin-angular";
14
+ import { mapValues, union } from "es-toolkit";
15
+ //#region packages/platform/src/lib/platform-plugin.ts
16
+ function externalPlugins(plugins) {
17
+ return plugins;
62
18
  }
63
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tcGx1Z2luLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGxhdGZvcm0vc3JjL2xpYi9wbGF0Zm9ybS1wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUhBQXVIO0FBQ3ZILE9BQU8sZUFBZSxNQUFNLDZCQUE2QixDQUFDO0FBQzFELE9BQU8sT0FBTyxNQUFNLCtCQUErQixDQUFDO0FBR3BELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDM0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3BELE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pGLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUU1RCxNQUFNLFVBQVUsY0FBYyxDQUFDLE9BQWdCLEVBQUU7SUFDL0MsTUFBTSxNQUFNLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxNQUFNLElBQUksQ0FBQyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDN0UsTUFBTSxFQUFFLEdBQUcsZUFBZSxFQUFFLEdBQUc7UUFDN0IsR0FBRyxFQUFFLElBQUk7UUFDVCxHQUFHLElBQUk7S0FDUixDQUFDO0lBRUYsSUFBSSxZQUFZLEdBQUcsZUFBZSxFQUFFLEtBQUssQ0FBQztJQUUxQyxJQUFJLFlBQVksRUFBRSxVQUFVLEVBQUUsQ0FBQztRQUM3QixZQUFZLEdBQUc7WUFDYixHQUFHLFlBQVk7WUFDZixVQUFVLEVBQUUsTUFBTSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsVUFBVSxDQUFDLENBQUMsTUFBTSxDQUNyRCxDQUFDLE1BQU0sRUFBRSxJQUFJLEVBQUUsRUFBRTtnQkFDZixPQUFPO29CQUNMLEdBQUcsTUFBTTtvQkFDVCxDQUFDLElBQUksQ0FBQyxFQUFFO3dCQUNOLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQzt3QkFDZixPQUFPLEVBQUU7NEJBQ1AsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsT0FBTzs0QkFDdkIsaUJBQWlCLEVBQ2YsTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFLEdBQUcsS0FBSyxLQUFLLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsU0FBUzt5QkFDNUM7cUJBQ1Q7aUJBQ0YsQ0FBQztZQUNKLENBQUMsRUFDRCxZQUFZLENBQUMsVUFBVSxDQUN4QjtTQUNGLENBQUM7SUFDSixDQUFDO0lBRUQsT0FBTztRQUNMLEdBQUcsZUFBZSxDQUFDLGVBQWUsRUFBRSxZQUFZLENBQUM7UUFDakQsR0FBRyxDQUFDLGVBQWUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsY0FBYyxFQUFFLEVBQUUsR0FBRyxnQkFBZ0IsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUN6RSxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO1FBQy9DLEdBQUcsWUFBWSxDQUFDLGVBQWUsQ0FBQztRQUNoQyxHQUFHLGFBQWEsQ0FBQyxlQUFlLEVBQUUsT0FBTyxFQUFFLGVBQWUsQ0FBQztRQUMzRCxHQUFHLENBQUMsSUFBSSxFQUFFLElBQUksS0FBSyxLQUFLO1lBQ3RCLENBQUMsQ0FBQyxFQUFFO1lBQ0osQ0FBQyxDQUFDLE9BQU8sQ0FBQztnQkFDTixHQUFHLEVBQUUsZUFBZSxDQUFDLEdBQUc7Z0JBQ3hCLGFBQWEsRUFBRSxlQUFlLENBQUMsYUFBYTtnQkFDNUMsbUJBQW1CLEVBQUUsZUFBZSxDQUFDLG1CQUFtQixJQUFJLEtBQUs7Z0JBQ2pFLE9BQU8sRUFBRTtvQkFDUCxHQUFHLENBQUMsZUFBZSxDQUFDLE9BQU8sSUFBSSxFQUFFLENBQUM7b0JBQ2xDLEdBQUcsQ0FBQyxlQUFlLENBQUMsbUJBQW1CLElBQUksRUFBRSxDQUFDLENBQUMsR0FBRyxDQUNoRCxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsR0FBRyxPQUFPLGVBQWUsQ0FDdkM7aUJBQ0Y7Z0JBQ0QscUJBQXFCLEVBQUUsZUFBZSxDQUFDLHFCQUFxQjtnQkFDNUQsVUFBVSxFQUFFLGVBQWUsQ0FBQyxVQUFVO2dCQUN0QyxxQkFBcUIsRUFBRSxlQUFlLENBQUMscUJBQXFCO2dCQUM1RCxnQkFBZ0IsRUFBRSxlQUFlLENBQUMsZ0JBQWdCO2dCQUNsRCxHQUFHLENBQUMsSUFBSSxFQUFFLElBQUksSUFBSSxFQUFFLENBQUM7YUFDdEIsQ0FBQyxDQUFDO1FBQ1AsZ0JBQWdCLEVBQUU7UUFDbEIsaUJBQWlCLEVBQUU7UUFDbkIsOEJBQThCLEVBQUU7S0FDakMsQ0FBQztBQUNKLENBQUMifQ==
19
+ function platformPlugin(opts = {}) {
20
+ applyDebugOption(opts.debug, opts.workspaceRoot);
21
+ const isTest = process.env.NODE_ENV === "test" || !!process.env["VITEST"];
22
+ const viteOptions = opts?.vite === false ? void 0 : opts?.vite;
23
+ const { ...platformOptions } = {
24
+ ssr: true,
25
+ ...opts
26
+ };
27
+ if (platformOptions.discoverRoutes) {
28
+ const discovered = discoverLibraryRoutes(platformOptions.workspaceRoot ?? process.env["NX_WORKSPACE_ROOT"] ?? process.cwd());
29
+ platformOptions.additionalPagesDirs = union(platformOptions.additionalPagesDirs ?? [], discovered.additionalPagesDirs);
30
+ platformOptions.additionalContentDirs = union(platformOptions.additionalContentDirs ?? [], discovered.additionalContentDirs);
31
+ platformOptions.additionalAPIDirs = union(platformOptions.additionalAPIDirs ?? [], discovered.additionalAPIDirs);
32
+ }
33
+ const useAngularCompilationAPI = platformOptions.experimental?.useAngularCompilationAPI ?? viteOptions?.experimental?.useAngularCompilationAPI;
34
+ debugPlatform("experimental options resolved", {
35
+ useAngularCompilationAPI: !!useAngularCompilationAPI,
36
+ typedRouter: platformOptions.experimental?.typedRouter,
37
+ stylePipeline: !!platformOptions.experimental?.stylePipeline
38
+ });
39
+ let nitroOptions = platformOptions?.nitro;
40
+ if (nitroOptions?.routeRules) nitroOptions = {
41
+ ...nitroOptions,
42
+ routeRules: mapValues(nitroOptions.routeRules, (rule) => ({
43
+ ...rule,
44
+ headers: {
45
+ ...rule.headers,
46
+ "x-analog-no-ssr": rule?.ssr === false ? "true" : void 0
47
+ }
48
+ }))
49
+ };
50
+ return [
51
+ {
52
+ name: "analogjs-debug-activate",
53
+ config(_, { command }) {
54
+ activateDeferredDebug(command);
55
+ }
56
+ },
57
+ ...externalPlugins(viteNitroPlugin(platformOptions, nitroOptions)),
58
+ ...platformOptions.ssr ? [...ssrBuildPlugin(), ...injectHTMLPlugin()] : [],
59
+ ...!isTest ? depsPlugin(platformOptions) : [],
60
+ ...resolveStylePipelinePlugins(platformOptions.experimental?.stylePipeline, platformOptions.workspaceRoot),
61
+ ...routerPlugin(platformOptions),
62
+ routeGenerationPlugin(platformOptions),
63
+ ...contentPlugin(platformOptions?.content, platformOptions),
64
+ ...opts?.vite === false ? [] : externalPlugins(angular({
65
+ jit: platformOptions.jit,
66
+ workspaceRoot: platformOptions.workspaceRoot,
67
+ disableTypeChecking: platformOptions.disableTypeChecking,
68
+ include: [...platformOptions.include ?? [], ...(platformOptions.additionalPagesDirs ?? []).map((pageDir) => `${pageDir}/**/*.page.ts`)],
69
+ additionalContentDirs: platformOptions.additionalContentDirs,
70
+ hmr: platformOptions.hmr,
71
+ liveReload: platformOptions.liveReload,
72
+ inlineStylesExtension: platformOptions.inlineStylesExtension,
73
+ fileReplacements: platformOptions.fileReplacements,
74
+ debug: platformOptions.debug,
75
+ stylePipeline: platformOptions.experimental?.stylePipeline?.angularPlugins?.length ? { plugins: platformOptions.experimental.stylePipeline.angularPlugins } : void 0,
76
+ ...viteOptions ?? {},
77
+ experimental: {
78
+ ...viteOptions?.experimental ?? {},
79
+ useAngularCompilationAPI
80
+ }
81
+ })),
82
+ ...serverModePlugin(),
83
+ ...clearClientPageEndpointsPlugin()
84
+ ];
85
+ }
86
+ //#endregion
87
+ export { platformPlugin };
88
+
89
+ //# sourceMappingURL=platform-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-plugin.js","names":[],"sources":["../../../src/lib/platform-plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\nimport viteNitroPlugin from '@analogjs/vite-plugin-nitro';\nimport angular from '@analogjs/vite-plugin-angular';\nimport { mapValues, union } from 'es-toolkit';\n\nimport { Options } from './options.js';\nimport {\n activateDeferredDebug,\n applyDebugOption,\n debugPlatform,\n} from './utils/debug.js';\nimport { discoverLibraryRoutes } from './discover-library-routes.js';\nimport { routerPlugin } from './router-plugin.js';\nimport { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';\nimport { contentPlugin } from './content-plugin.js';\nimport { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';\nimport { depsPlugin } from './deps-plugin.js';\nimport { injectHTMLPlugin } from './ssr/inject-html-plugin.js';\nimport { serverModePlugin } from '../server-mode-plugin.js';\nimport { routeGenerationPlugin } from './route-generation-plugin.js';\nimport { resolveStylePipelinePlugins } from './style-pipeline.js';\n\n// Bridge Plugin types from external @analogjs packages that resolve a different vite instance\nfunction externalPlugins(plugins: unknown): Plugin[] {\n return plugins as Plugin[];\n}\n\nexport function platformPlugin(opts: Options = {}): Plugin[] {\n applyDebugOption(opts.debug, opts.workspaceRoot);\n\n const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];\n const viteOptions = opts?.vite === false ? undefined : opts?.vite;\n const { ...platformOptions } = {\n ssr: true,\n ...opts,\n };\n if (platformOptions.discoverRoutes) {\n const workspaceRoot =\n platformOptions.workspaceRoot ??\n process.env['NX_WORKSPACE_ROOT'] ??\n process.cwd();\n const discovered = discoverLibraryRoutes(workspaceRoot);\n platformOptions.additionalPagesDirs = union(\n platformOptions.additionalPagesDirs ?? [],\n discovered.additionalPagesDirs,\n );\n platformOptions.additionalContentDirs = union(\n platformOptions.additionalContentDirs ?? [],\n discovered.additionalContentDirs,\n );\n platformOptions.additionalAPIDirs = union(\n platformOptions.additionalAPIDirs ?? [],\n discovered.additionalAPIDirs,\n );\n }\n\n const useAngularCompilationAPI =\n platformOptions.experimental?.useAngularCompilationAPI ??\n viteOptions?.experimental?.useAngularCompilationAPI;\n debugPlatform('experimental options resolved', {\n useAngularCompilationAPI: !!useAngularCompilationAPI,\n typedRouter: platformOptions.experimental?.typedRouter,\n stylePipeline: !!platformOptions.experimental?.stylePipeline,\n });\n let nitroOptions = platformOptions?.nitro;\n\n if (nitroOptions?.routeRules) {\n nitroOptions = {\n ...nitroOptions,\n routeRules: mapValues(nitroOptions.routeRules, (rule) => ({\n ...rule,\n headers: {\n ...rule.headers,\n 'x-analog-no-ssr': rule?.ssr === false ? 'true' : undefined,\n } as any,\n })),\n };\n }\n\n return [\n {\n name: 'analogjs-debug-activate',\n config(_, { command }) {\n activateDeferredDebug(command);\n },\n },\n ...externalPlugins(viteNitroPlugin(platformOptions as any, nitroOptions)),\n ...(platformOptions.ssr\n ? [...ssrBuildPlugin(), ...injectHTMLPlugin()]\n : []),\n ...(!isTest ? depsPlugin(platformOptions) : []),\n ...resolveStylePipelinePlugins(\n platformOptions.experimental?.stylePipeline,\n platformOptions.workspaceRoot,\n ),\n ...routerPlugin(platformOptions),\n routeGenerationPlugin(platformOptions),\n ...contentPlugin(platformOptions?.content, platformOptions),\n ...(opts?.vite === false\n ? []\n : externalPlugins(\n angular({\n jit: platformOptions.jit,\n workspaceRoot: platformOptions.workspaceRoot,\n // Let the Angular plugin keep its own dev-friendly default unless the\n // app explicitly opts into stricter serve-time diagnostics.\n disableTypeChecking: platformOptions.disableTypeChecking,\n include: [\n ...(platformOptions.include ?? []),\n ...(platformOptions.additionalPagesDirs ?? []).map(\n (pageDir) => `${pageDir}/**/*.page.ts`,\n ),\n ],\n additionalContentDirs: platformOptions.additionalContentDirs,\n hmr: platformOptions.hmr,\n liveReload: platformOptions.liveReload,\n inlineStylesExtension: platformOptions.inlineStylesExtension,\n fileReplacements: platformOptions.fileReplacements,\n debug: platformOptions.debug,\n stylePipeline: platformOptions.experimental?.stylePipeline\n ?.angularPlugins?.length\n ? {\n plugins:\n platformOptions.experimental.stylePipeline.angularPlugins,\n }\n : undefined,\n ...(viteOptions ?? {}),\n experimental: {\n ...(viteOptions?.experimental ?? {}),\n useAngularCompilationAPI,\n },\n }),\n )),\n ...serverModePlugin(),\n ...clearClientPageEndpointsPlugin(),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,SAAS,gBAAgB,SAA4B;AACnD,QAAO;;AAGT,SAAgB,eAAe,OAAgB,EAAE,EAAY;AAC3D,kBAAiB,KAAK,OAAO,KAAK,cAAc;CAEhD,MAAM,SAAA,QAAA,IAAA,aAAqC,UAAU,CAAC,CAAC,QAAQ,IAAI;CACnE,MAAM,cAAc,MAAM,SAAS,QAAQ,KAAA,IAAY,MAAM;CAC7D,MAAM,EAAE,GAAG,oBAAoB;EAC7B,KAAK;EACL,GAAG;EACJ;AACD,KAAI,gBAAgB,gBAAgB;EAKlC,MAAM,aAAa,sBAHjB,gBAAgB,iBAChB,QAAQ,IAAI,wBACZ,QAAQ,KAAK,CACwC;AACvD,kBAAgB,sBAAsB,MACpC,gBAAgB,uBAAuB,EAAE,EACzC,WAAW,oBACZ;AACD,kBAAgB,wBAAwB,MACtC,gBAAgB,yBAAyB,EAAE,EAC3C,WAAW,sBACZ;AACD,kBAAgB,oBAAoB,MAClC,gBAAgB,qBAAqB,EAAE,EACvC,WAAW,kBACZ;;CAGH,MAAM,2BACJ,gBAAgB,cAAc,4BAC9B,aAAa,cAAc;AAC7B,eAAc,iCAAiC;EAC7C,0BAA0B,CAAC,CAAC;EAC5B,aAAa,gBAAgB,cAAc;EAC3C,eAAe,CAAC,CAAC,gBAAgB,cAAc;EAChD,CAAC;CACF,IAAI,eAAe,iBAAiB;AAEpC,KAAI,cAAc,WAChB,gBAAe;EACb,GAAG;EACH,YAAY,UAAU,aAAa,aAAa,UAAU;GACxD,GAAG;GACH,SAAS;IACP,GAAG,KAAK;IACR,mBAAmB,MAAM,QAAQ,QAAQ,SAAS,KAAA;IACnD;GACF,EAAE;EACJ;AAGH,QAAO;EACL;GACE,MAAM;GACN,OAAO,GAAG,EAAE,WAAW;AACrB,0BAAsB,QAAQ;;GAEjC;EACD,GAAG,gBAAgB,gBAAgB,iBAAwB,aAAa,CAAC;EACzE,GAAI,gBAAgB,MAChB,CAAC,GAAG,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,GAC5C,EAAE;EACN,GAAI,CAAC,SAAS,WAAW,gBAAgB,GAAG,EAAE;EAC9C,GAAG,4BACD,gBAAgB,cAAc,eAC9B,gBAAgB,cACjB;EACD,GAAG,aAAa,gBAAgB;EAChC,sBAAsB,gBAAgB;EACtC,GAAG,cAAc,iBAAiB,SAAS,gBAAgB;EAC3D,GAAI,MAAM,SAAS,QACf,EAAE,GACF,gBACE,QAAQ;GACN,KAAK,gBAAgB;GACrB,eAAe,gBAAgB;GAG/B,qBAAqB,gBAAgB;GACrC,SAAS,CACP,GAAI,gBAAgB,WAAW,EAAE,EACjC,IAAI,gBAAgB,uBAAuB,EAAE,EAAE,KAC5C,YAAY,GAAG,QAAQ,eACzB,CACF;GACD,uBAAuB,gBAAgB;GACvC,KAAK,gBAAgB;GACrB,YAAY,gBAAgB;GAC5B,uBAAuB,gBAAgB;GACvC,kBAAkB,gBAAgB;GAClC,OAAO,gBAAgB;GACvB,eAAe,gBAAgB,cAAc,eACzC,gBAAgB,SAChB,EACE,SACE,gBAAgB,aAAa,cAAc,gBAC9C,GACD,KAAA;GACJ,GAAI,eAAe,EAAE;GACrB,cAAc;IACZ,GAAI,aAAa,gBAAgB,EAAE;IACnC;IACD;GACF,CAAC,CACH;EACL,GAAG,kBAAkB;EACrB,GAAG,gCAAgC;EACpC"}
@@ -0,0 +1,23 @@
1
+ export interface RouteFileDiscoveryOptions {
2
+ root: string;
3
+ workspaceRoot: string;
4
+ additionalPagesDirs: string[];
5
+ additionalContentDirs: string[];
6
+ }
7
+ export interface RouteFileDiscovery {
8
+ getRouteFiles(): string[];
9
+ getContentFiles(): string[];
10
+ getDiscoveredFileKind(path: string): "route" | "content" | null;
11
+ updateDiscoveredFile(path: string, event: "add" | "change" | "unlink"): void;
12
+ /**
13
+ * Returns true if the normalized filename was discovered from an app-local
14
+ * glob (under the configured root) rather than from an additional directory.
15
+ *
16
+ * Used by collision priority to prefer app-local routes over shared/external
17
+ * routes based on actual configured roots instead of hard-coded path
18
+ * substrings.
19
+ */
20
+ isAppLocal(normalizedFilename: string): boolean;
21
+ reset(): void;
22
+ }
23
+ export declare function createRouteFileDiscovery(options: RouteFileDiscoveryOptions): RouteFileDiscovery;