@analogjs/platform 3.0.0-alpha.2 → 3.0.0-alpha.21

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 (292) hide show
  1. package/package.json +16 -18
  2. package/src/index.d.ts +5 -2
  3. package/src/index.js +9 -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 -4
  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.d.ts +1 -0
  18. package/src/lib/content/prism/angular.js +18 -19
  19. package/src/lib/content/prism/angular.js.map +1 -0
  20. package/src/lib/content/prism/index.d.ts +1 -1
  21. package/src/lib/content/prism/index.js +10 -7
  22. package/src/lib/content/prism/index.js.map +1 -0
  23. package/src/lib/content/prism/options.d.ts +1 -1
  24. package/src/lib/content/prism/prism-highlighter.d.ts +5 -5
  25. package/src/lib/content/prism/prism-highlighter.js +33 -33
  26. package/src/lib/content/prism/prism-highlighter.js.map +1 -0
  27. package/src/lib/content/shiki/index.d.ts +3 -3
  28. package/src/lib/content/shiki/index.js +19 -28
  29. package/src/lib/content/shiki/index.js.map +1 -0
  30. package/src/lib/content/shiki/options.d.ts +7 -7
  31. package/src/lib/content/shiki/shiki-highlighter.d.ts +13 -13
  32. package/src/lib/content/shiki/shiki-highlighter.js +45 -44
  33. package/src/lib/content/shiki/shiki-highlighter.js.map +1 -0
  34. package/src/lib/content-plugin.d.ts +19 -19
  35. package/src/lib/content-plugin.js +178 -196
  36. package/src/lib/content-plugin.js.map +1 -0
  37. package/src/lib/deps-plugin.d.ts +2 -2
  38. package/src/lib/deps-plugin.js +73 -82
  39. package/src/lib/deps-plugin.js.map +1 -0
  40. package/src/lib/json-ld-manifest-plugin.d.ts +41 -0
  41. package/src/lib/json-ld-manifest-plugin.js +84 -0
  42. package/src/lib/json-ld-manifest-plugin.js.map +1 -0
  43. package/src/lib/nx-plugin/builders.json +7 -0
  44. package/src/lib/nx-plugin/executors.json +5 -0
  45. package/src/lib/nx-plugin/generators.json +25 -0
  46. package/src/lib/nx-plugin/package.json +1 -5
  47. package/src/lib/nx-plugin/src/executors/vite/compat.d.ts +3 -2
  48. package/src/lib/nx-plugin/src/executors/vite/compat.js +6 -6
  49. package/src/lib/nx-plugin/src/executors/vite/compat.js.map +1 -1
  50. package/src/lib/nx-plugin/src/executors/vite/schema.d.ts +1 -1
  51. package/src/lib/nx-plugin/src/executors/vite/vite.impl.d.ts +1 -1
  52. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js +5 -4
  53. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js.map +1 -1
  54. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.d.ts +3 -2
  55. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js +6 -6
  56. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js.map +1 -1
  57. package/src/lib/nx-plugin/src/executors/vite-dev-server/schema.d.ts +1 -1
  58. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.d.ts +1 -1
  59. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js +5 -4
  60. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js.map +1 -1
  61. package/src/lib/nx-plugin/src/executors/vitest/compat.d.ts +3 -2
  62. package/src/lib/nx-plugin/src/executors/vitest/compat.js +6 -6
  63. package/src/lib/nx-plugin/src/executors/vitest/compat.js.map +1 -1
  64. package/src/lib/nx-plugin/src/executors/vitest/schema.d.ts +1 -1
  65. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.d.ts +1 -1
  66. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js +5 -4
  67. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js.map +1 -1
  68. package/src/lib/nx-plugin/src/generators/app/compat.d.ts +9 -2
  69. package/src/lib/nx-plugin/src/generators/app/compat.js +17 -6
  70. package/src/lib/nx-plugin/src/generators/app/compat.js.map +1 -1
  71. package/src/lib/nx-plugin/src/generators/app/files/root/tsconfig.base.json +3 -6
  72. package/src/lib/nx-plugin/src/generators/app/files/template-angular/src/test-setup.ts__template__ +1 -0
  73. package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.app.json__template__ +1 -3
  74. package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.json__template__ +2 -1
  75. package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__ +6 -0
  76. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/src/app/app.config.ts__template__ +0 -6
  77. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/tsconfig.json__template__ +4 -2
  78. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ +0 -18
  79. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/src/app/app.config.ts__template__ +0 -6
  80. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/tsconfig.json__template__ +4 -2
  81. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__ +0 -18
  82. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/src/app/app.config.ts__template__ +0 -6
  83. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.app.json__template__ +1 -3
  84. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.json__template__ +4 -2
  85. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/vite.config.ts__template__ +0 -9
  86. package/src/lib/nx-plugin/src/generators/app/generator.d.ts +11 -11
  87. package/src/lib/nx-plugin/src/generators/app/generator.js +78 -88
  88. package/src/lib/nx-plugin/src/generators/app/generator.js.map +1 -1
  89. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.d.ts +1 -1
  90. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.d.ts +1 -1
  91. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js +72 -89
  92. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js.map +1 -1
  93. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.d.ts +2 -2
  94. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js +24 -58
  95. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js.map +1 -1
  96. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.d.ts +2 -2
  97. package/src/lib/nx-plugin/src/generators/app/lib/add-files.d.ts +2 -2
  98. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js +15 -16
  99. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js.map +1 -1
  100. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.d.ts +2 -2
  101. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js +14 -13
  102. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js.map +1 -1
  103. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.d.ts +7 -7
  104. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +15 -30
  105. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
  106. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.d.ts +3 -5
  107. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +49 -147
  108. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js.map +1 -1
  109. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.d.ts +1 -1
  110. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.d.ts +2 -2
  111. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js +17 -20
  112. package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js.map +1 -1
  113. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.d.ts +2 -2
  114. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.d.ts +1 -1
  115. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js +14 -12
  116. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js.map +1 -1
  117. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.d.ts +4 -5
  118. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js +6 -10
  119. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js.map +1 -1
  120. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.d.ts +0 -3
  121. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.d.ts +0 -5
  122. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +9 -16
  123. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js +7 -37
  124. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js.map +1 -1
  125. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.d.ts +1 -1
  126. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js +9 -15
  127. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js.map +1 -1
  128. package/src/lib/nx-plugin/src/generators/app/versions.d.ts +0 -28
  129. package/src/lib/nx-plugin/src/generators/init/compat.d.ts +9 -2
  130. package/src/lib/nx-plugin/src/generators/init/compat.js +17 -6
  131. package/src/lib/nx-plugin/src/generators/init/compat.js.map +1 -1
  132. package/src/lib/nx-plugin/src/generators/init/generator.d.ts +3 -3
  133. package/src/lib/nx-plugin/src/generators/init/generator.js +54 -55
  134. package/src/lib/nx-plugin/src/generators/init/generator.js.map +1 -1
  135. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.d.ts +1 -1
  136. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js +19 -20
  137. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js.map +1 -1
  138. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.d.ts +2 -2
  139. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js +20 -18
  140. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js.map +1 -1
  141. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.d.ts +2 -2
  142. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js +56 -57
  143. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js.map +1 -1
  144. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.d.ts +1 -1
  145. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js +12 -11
  146. package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js.map +1 -1
  147. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.d.ts +2 -2
  148. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js +17 -15
  149. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js.map +1 -1
  150. package/src/lib/nx-plugin/src/generators/init/lib/update-main.d.ts +2 -2
  151. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js +12 -12
  152. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js.map +1 -1
  153. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.d.ts +2 -2
  154. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js +19 -25
  155. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js.map +1 -1
  156. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.d.ts +2 -2
  157. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js +43 -45
  158. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js.map +1 -1
  159. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.d.ts +2 -2
  160. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js +27 -28
  161. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js.map +1 -1
  162. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.d.ts +2 -2
  163. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js +19 -17
  164. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js.map +1 -1
  165. package/src/lib/nx-plugin/src/generators/init/test-files/src/test-setup.ts__template__ +1 -0
  166. package/src/lib/nx-plugin/src/generators/page/compat.d.ts +9 -0
  167. package/src/lib/nx-plugin/src/generators/page/compat.js +18 -0
  168. package/src/lib/nx-plugin/src/generators/page/compat.js.map +1 -0
  169. package/src/lib/nx-plugin/src/generators/page/generator.d.ts +3 -4
  170. package/src/lib/nx-plugin/src/generators/page/generator.js +33 -44
  171. package/src/lib/nx-plugin/src/generators/page/generator.js.map +1 -1
  172. package/src/lib/nx-plugin/src/generators/preset/__snapshots__/generator.spec.ts.snap +5 -3
  173. package/src/lib/nx-plugin/src/generators/preset/generator.d.ts +3 -3
  174. package/src/lib/nx-plugin/src/generators/preset/generator.js +17 -43
  175. package/src/lib/nx-plugin/src/generators/preset/generator.js.map +1 -1
  176. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.d.ts +9 -2
  177. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js +17 -6
  178. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js.map +1 -1
  179. package/src/lib/nx-plugin/src/generators/setup-vitest/files/src/test-setup.ts__template__ +1 -0
  180. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.d.ts +3 -3
  181. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js +35 -32
  182. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js.map +1 -1
  183. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.d.ts +1 -1
  184. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js +7 -7
  185. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js.map +1 -1
  186. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.d.ts +2 -2
  187. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js +20 -21
  188. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js.map +1 -1
  189. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.d.ts +2 -2
  190. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js +19 -19
  191. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js.map +1 -1
  192. package/src/lib/nx-plugin/src/index.js +0 -1
  193. package/src/lib/nx-plugin/src/utils/version-utils.d.ts +1 -1
  194. package/src/lib/nx-plugin/src/utils/version-utils.js +20 -18
  195. package/src/lib/nx-plugin/src/utils/version-utils.js.map +1 -1
  196. package/src/lib/nx-plugin/src/utils/versions/dependencies.js +42 -62
  197. package/src/lib/nx-plugin/src/utils/versions/dependencies.js.map +1 -1
  198. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js +49 -83
  199. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js.map +1 -1
  200. package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js +33 -20
  201. package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js.map +1 -1
  202. package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js +33 -20
  203. package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js.map +1 -1
  204. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.d.ts +7 -7
  205. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js +37 -23
  206. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js.map +1 -1
  207. package/src/lib/options.d.ts +158 -80
  208. package/src/lib/platform-plugin.d.ts +2 -2
  209. package/src/lib/platform-plugin.js +67 -61
  210. package/src/lib/platform-plugin.js.map +1 -0
  211. package/src/lib/route-file-discovery.d.ts +23 -0
  212. package/src/lib/route-file-discovery.js +114 -0
  213. package/src/lib/route-file-discovery.js.map +1 -0
  214. package/src/lib/route-generation-plugin.d.ts +3 -0
  215. package/src/lib/route-generation-plugin.js +34 -0
  216. package/src/lib/route-generation-plugin.js.map +1 -0
  217. package/src/lib/route-manifest.d.ts +120 -0
  218. package/src/lib/route-manifest.js +411 -0
  219. package/src/lib/route-manifest.js.map +1 -0
  220. package/src/lib/router-plugin.d.ts +19 -19
  221. package/src/lib/router-plugin.js +193 -150
  222. package/src/lib/router-plugin.js.map +1 -0
  223. package/src/lib/ssr/inject-html-plugin.d.ts +1 -1
  224. package/src/lib/ssr/inject-html-plugin.js +25 -25
  225. package/src/lib/ssr/inject-html-plugin.js.map +1 -0
  226. package/src/lib/ssr/ssr-build-plugin.d.ts +18 -2
  227. package/src/lib/ssr/ssr-build-plugin.js +54 -30
  228. package/src/lib/ssr/ssr-build-plugin.js.map +1 -0
  229. package/src/lib/tailwind-preprocessor.d.ts +23 -0
  230. package/src/lib/tailwind-preprocessor.js +33 -0
  231. package/src/lib/tailwind-preprocessor.js.map +1 -0
  232. package/src/lib/typed-routes-plugin.d.ts +50 -0
  233. package/src/lib/typed-routes-plugin.js +204 -0
  234. package/src/lib/typed-routes-plugin.js.map +1 -0
  235. package/src/lib/utils/rolldown.d.ts +3 -0
  236. package/src/lib/utils/rolldown.js +15 -0
  237. package/src/lib/utils/rolldown.js.map +1 -0
  238. package/src/server-mode-plugin.d.ts +6 -6
  239. package/src/server-mode-plugin.js +16 -18
  240. package/src/server-mode-plugin.js.map +1 -0
  241. package/README.md +0 -5
  242. package/src/lib/content/prism/options.js +0 -1
  243. package/src/lib/content/shiki/options.js +0 -1
  244. package/src/lib/nx-plugin/README.md +0 -23
  245. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/postcss.config.cjs__template__ +0 -10
  246. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/tailwind.config.cjs__template__ +0 -14
  247. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/postcss.config.cjs__template__ +0 -10
  248. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/tailwind.config.ts__template__ +0 -14
  249. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/.postcssrc.json +0 -5
  250. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/tailwind.config.ts__template__ +0 -14
  251. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/index.html__template__ +0 -15
  252. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.spec.ts__template__ +0 -17
  253. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.ts__template__ +0 -10
  254. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/favicon.ico__template__ +0 -0
  255. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.providers.ts__template__ +0 -5
  256. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.server.ts__template__ +0 -23
  257. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.ts__template__ +0 -17
  258. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/.gitkeep__template__ +0 -0
  259. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/analog.svg__template__ +0 -1
  260. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/vite.svg__template__ +0 -1
  261. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/server/routes/v1/hello.ts__template__ +0 -3
  262. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/styles.css__template__ +0 -4
  263. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/test-setup.ts__template__ +0 -12
  264. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/vite-env.d.ts__template__ +0 -1
  265. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.app.json__template__ +0 -16
  266. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.editor.json__template__ +0 -7
  267. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.json__template__ +0 -32
  268. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.spec.json__template__ +0 -14
  269. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/vite.config.ts__template__ +0 -69
  270. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js +0 -15
  271. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js.map +0 -1
  272. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js +0 -58
  273. package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js.map +0 -1
  274. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js +0 -47
  275. package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js.map +0 -1
  276. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js +0 -107
  277. package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js.map +0 -1
  278. package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js +0 -56
  279. package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js.map +0 -1
  280. package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js +0 -72
  281. package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js.map +0 -1
  282. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js +0 -46
  283. package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js.map +0 -1
  284. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js +0 -37
  285. package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js.map +0 -1
  286. package/src/lib/nx-plugin/src/generators/app/versions.js +0 -43
  287. package/src/lib/nx-plugin/src/generators/app/versions.js.map +0 -1
  288. package/src/lib/nx-plugin/src/index.d.ts +0 -0
  289. package/src/lib/nx-plugin/src/index.js.map +0 -1
  290. package/src/lib/options.js +0 -1
  291. package/src/lib/ssr/ssr-xhr-plugin.d.ts +0 -2
  292. package/src/lib/ssr/ssr-xhr-plugin.js +0 -28
@@ -0,0 +1,41 @@
1
+ import { type JsonLdObject } from "./route-manifest.js";
2
+ export type JsonLdModuleManifestEntry = {
3
+ kind: "module";
4
+ routePath: string;
5
+ sourceFile: string;
6
+ importAlias: string;
7
+ };
8
+ export type JsonLdContentManifestEntry = {
9
+ kind: "content";
10
+ routePath: string;
11
+ sourceFile: string;
12
+ jsonLd: JsonLdObject[];
13
+ };
14
+ export type JsonLdManifestEntry = JsonLdModuleManifestEntry | JsonLdContentManifestEntry;
15
+ /**
16
+ * Heuristic detector for JSON-LD exports in route modules.
17
+ *
18
+ * This is intentionally regex-based for speed during file scanning.
19
+ * It reliably detects these direct export patterns:
20
+ *
21
+ * - `export const routeJsonLd = ...`
22
+ * - `export const routeMeta = { ..., jsonLd: ... }`
23
+ * - `export const routeJsonLd = (route) => ...` (function form)
24
+ *
25
+ * Known limitations (not detected):
26
+ *
27
+ * - re-exports: `export { routeJsonLd } from './data'`
28
+ * - aliased exports: `export { something as routeJsonLd }`
29
+ * - default exports: `export default { jsonLd: ... }`
30
+ * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
31
+ *
32
+ * Known false-positive risks:
33
+ *
34
+ * - comment text containing `export const routeJsonLd`
35
+ * - unrelated `jsonLd` text appearing after `export const routeMeta`
36
+ *
37
+ * Prefer the supported direct export patterns listed above.
38
+ */
39
+ export declare function detectJsonLdModuleExports(fileContent: string): boolean;
40
+ export declare function extractMarkdownJsonLd(rawContent: string): JsonLdObject[];
41
+ export declare function generateJsonLdManifestSource(entries: JsonLdManifestEntry[], outFile: string): string;
@@ -0,0 +1,84 @@
1
+ import { normalizeJsonLd } from "./route-manifest.js";
2
+ import { normalizePath } from "vite";
3
+ import { dirname, relative } from "node:path";
4
+ import fm from "front-matter";
5
+ //#region packages/platform/src/lib/json-ld-manifest-plugin.ts
6
+ /**
7
+ * Heuristic detector for JSON-LD exports in route modules.
8
+ *
9
+ * This is intentionally regex-based for speed during file scanning.
10
+ * It reliably detects these direct export patterns:
11
+ *
12
+ * - `export const routeJsonLd = ...`
13
+ * - `export const routeMeta = { ..., jsonLd: ... }`
14
+ * - `export const routeJsonLd = (route) => ...` (function form)
15
+ *
16
+ * Known limitations (not detected):
17
+ *
18
+ * - re-exports: `export { routeJsonLd } from './data'`
19
+ * - aliased exports: `export { something as routeJsonLd }`
20
+ * - default exports: `export default { jsonLd: ... }`
21
+ * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
22
+ *
23
+ * Known false-positive risks:
24
+ *
25
+ * - comment text containing `export const routeJsonLd`
26
+ * - unrelated `jsonLd` text appearing after `export const routeMeta`
27
+ *
28
+ * Prefer the supported direct export patterns listed above.
29
+ */
30
+ function detectJsonLdModuleExports(fileContent) {
31
+ return /export\s+const\s+routeJsonLd\b/.test(fileContent) || /export\s+const\s+routeMeta\b[\s\S]*?\bjsonLd\b/.test(fileContent);
32
+ }
33
+ function extractMarkdownJsonLd(rawContent) {
34
+ const { attributes } = fm(rawContent);
35
+ return normalizeJsonLd(attributes["jsonLd"]);
36
+ }
37
+ function generateJsonLdManifestSource(entries, outFile) {
38
+ const lines = [];
39
+ const moduleEntries = entries.filter((entry) => entry.kind === "module");
40
+ lines.push("// This file is auto-generated by @analogjs/platform");
41
+ lines.push("// Do not edit manually");
42
+ lines.push("");
43
+ lines.push("import type { Graph, Thing, WithContext } from 'schema-dts';");
44
+ moduleEntries.forEach((entry) => {
45
+ lines.push(`import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`);
46
+ });
47
+ lines.push("");
48
+ lines.push("export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;");
49
+ lines.push("export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };");
50
+ lines.push("");
51
+ lines.push("function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {");
52
+ lines.push(" if (Array.isArray(value)) {");
53
+ lines.push(" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));");
54
+ lines.push(" }");
55
+ lines.push("");
56
+ lines.push(" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];");
57
+ lines.push("}");
58
+ lines.push("");
59
+ lines.push("function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {");
60
+ lines.push(" const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };");
61
+ lines.push(" return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);");
62
+ lines.push("}");
63
+ lines.push("");
64
+ lines.push("export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([");
65
+ entries.forEach((entry) => {
66
+ if (entry.kind === "module") {
67
+ lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`);
68
+ return;
69
+ }
70
+ lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`);
71
+ });
72
+ lines.push("]);");
73
+ lines.push("");
74
+ return lines.join("\n");
75
+ }
76
+ function toImportPath(outFile, sourceFile) {
77
+ const relativePath = normalizePath(relative(dirname(outFile), sourceFile.replace(/^\//, "").replace(/\.(ts|js|analog|ag)$/, "")));
78
+ if (relativePath.startsWith(".")) return relativePath;
79
+ return `./${relativePath}`;
80
+ }
81
+ //#endregion
82
+ export { detectJsonLdModuleExports, extractMarkdownJsonLd, generateJsonLdManifestSource };
83
+
84
+ //# sourceMappingURL=json-ld-manifest-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-ld-manifest-plugin.js","names":[],"sources":["../../../src/lib/json-ld-manifest-plugin.ts"],"sourcesContent":["import fm from 'front-matter';\nimport { normalizePath } from 'vite';\nimport { dirname, relative } from 'node:path';\n\nimport { normalizeJsonLd, type JsonLdObject } from './route-manifest.js';\n\nexport type JsonLdModuleManifestEntry = {\n kind: 'module';\n routePath: string;\n sourceFile: string;\n importAlias: string;\n};\n\nexport type JsonLdContentManifestEntry = {\n kind: 'content';\n routePath: string;\n sourceFile: string;\n jsonLd: JsonLdObject[];\n};\n\nexport type JsonLdManifestEntry =\n | JsonLdModuleManifestEntry\n | JsonLdContentManifestEntry;\n\n/**\n * Heuristic detector for JSON-LD exports in route modules.\n *\n * This is intentionally regex-based for speed during file scanning.\n * It reliably detects these direct export patterns:\n *\n * - `export const routeJsonLd = ...`\n * - `export const routeMeta = { ..., jsonLd: ... }`\n * - `export const routeJsonLd = (route) => ...` (function form)\n *\n * Known limitations (not detected):\n *\n * - re-exports: `export { routeJsonLd } from './data'`\n * - aliased exports: `export { something as routeJsonLd }`\n * - default exports: `export default { jsonLd: ... }`\n * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`\n *\n * Known false-positive risks:\n *\n * - comment text containing `export const routeJsonLd`\n * - unrelated `jsonLd` text appearing after `export const routeMeta`\n *\n * Prefer the supported direct export patterns listed above.\n */\nexport function detectJsonLdModuleExports(fileContent: string): boolean {\n return (\n /export\\s+const\\s+routeJsonLd\\b/.test(fileContent) ||\n /export\\s+const\\s+routeMeta\\b[\\s\\S]*?\\bjsonLd\\b/.test(fileContent)\n );\n}\n\nexport function extractMarkdownJsonLd(rawContent: string): JsonLdObject[] {\n const { attributes } = fm<Record<string, unknown>>(rawContent);\n return normalizeJsonLd(attributes['jsonLd']);\n}\n\nexport function generateJsonLdManifestSource(\n entries: JsonLdManifestEntry[],\n outFile: string,\n): string {\n const lines: string[] = [];\n const moduleEntries = entries.filter(\n (entry): entry is JsonLdModuleManifestEntry => entry.kind === 'module',\n );\n\n lines.push('// This file is auto-generated by @analogjs/platform');\n lines.push('// Do not edit manually');\n lines.push('');\n\n lines.push(\"import type { Graph, Thing, WithContext } from 'schema-dts';\");\n\n moduleEntries.forEach((entry) => {\n lines.push(\n `import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`,\n );\n });\n\n lines.push('');\n lines.push(\n 'export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;',\n );\n lines.push(\n \"export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };\",\n );\n lines.push('');\n lines.push(\n 'function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(' if (Array.isArray(value)) {');\n lines.push(\n \" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));\",\n );\n lines.push(' }');\n lines.push('');\n lines.push(\n \" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];\",\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(\n ' const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };',\n );\n lines.push(\n // Match runtime precedence (mergeRouteJsonLdIntoRouteMeta in routes.ts):\n // routeMeta.jsonLd wins over standalone routeJsonLd.\n ' return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);',\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([',\n );\n\n entries.forEach((entry) => {\n if (entry.kind === 'module') {\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`,\n );\n return;\n }\n\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`,\n );\n });\n\n lines.push(']);');\n lines.push('');\n\n return lines.join('\\n');\n}\n\nfunction toImportPath(outFile: string, sourceFile: string): string {\n // JSON-LD entries are emitted inside the same generated route module, so\n // imports are always resolved relative to that single output file.\n const fromDir = dirname(outFile);\n const sourceNoExt = sourceFile\n .replace(/^\\//, '')\n .replace(/\\.(ts|js|analog|ag)$/, '');\n const relativePath = normalizePath(relative(fromDir, sourceNoExt));\n\n if (relativePath.startsWith('.')) {\n return relativePath;\n }\n\n return `./${relativePath}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,0BAA0B,aAA8B;AACtE,QACE,iCAAiC,KAAK,YAAY,IAClD,iDAAiD,KAAK,YAAY;;AAItE,SAAgB,sBAAsB,YAAoC;CACxE,MAAM,EAAE,eAAe,GAA4B,WAAW;AAC9D,QAAO,gBAAgB,WAAW,UAAU;;AAG9C,SAAgB,6BACd,SACA,SACQ;CACR,MAAM,QAAkB,EAAE;CAC1B,MAAM,gBAAgB,QAAQ,QAC3B,UAA8C,MAAM,SAAS,SAC/D;AAED,OAAM,KAAK,uDAAuD;AAClE,OAAM,KAAK,0BAA0B;AACrC,OAAM,KAAK,GAAG;AAEd,OAAM,KAAK,+DAA+D;AAE1E,eAAc,SAAS,UAAU;AAC/B,QAAM,KACJ,eAAe,MAAM,YAAY,SAAS,aAAa,SAAS,MAAM,WAAW,CAAC,IACnF;GACD;AAEF,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,6FACD;AACD,OAAM,KACJ,kKACD;AACD,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qEACD;AACD,OAAM,KAAK,gCAAgC;AAC3C,OAAM,KACJ,2IACD;AACD,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+FACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+EACD;AACD,OAAM,KACJ,yGACD;AACD,OAAM,KAGJ,gGACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qFACD;AAED,SAAQ,SAAS,UAAU;AACzB,MAAI,MAAM,SAAS,UAAU;AAC3B,SAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,8DAA8D,MAAM,YAAY,OAC9K;AACD;;AAGF,QAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,2CAA2C,KAAK,UAAU,MAAM,OAAO,CAAC,MACtK;GACD;AAEF,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AAEd,QAAO,MAAM,KAAK,KAAK;;AAGzB,SAAS,aAAa,SAAiB,YAA4B;CAOjE,MAAM,eAAe,cAAc,SAJnB,QAAQ,QAAQ,EACZ,WACjB,QAAQ,OAAO,GAAG,CAClB,QAAQ,wBAAwB,GAAG,CAC2B,CAAC;AAElE,KAAI,aAAa,WAAW,IAAI,CAC9B,QAAO;AAGT,QAAO,KAAK"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "builders": {
3
+ "vite-dev-server": "@analogjs/vite-plugin-angular:vite-dev-server",
4
+ "vite": "@analogjs/vite-plugin-angular:vite",
5
+ "vitest": "@analogjs/vitest-angular:test"
6
+ }
7
+ }
@@ -1,4 +1,9 @@
1
1
  {
2
+ "builders": {
3
+ "vite-dev-server": "@analogjs/vite-plugin-angular:vite-dev-server",
4
+ "vite": "@analogjs/vite-plugin-angular:vite",
5
+ "vitest": "@analogjs/vitest-angular:test"
6
+ },
2
7
  "executors": {
3
8
  "vite-dev-server": {
4
9
  "implementation": "./src/executors/vite-dev-server/vite-dev-server.impl",
@@ -33,5 +33,30 @@
33
33
  "description": "Migrate and configure an Angular SPA to use Analog.",
34
34
  "aliases": ["migrate"]
35
35
  }
36
+ },
37
+ "schematics": {
38
+ "application": {
39
+ "factory": "./src/generators/app/compat#applicationSchematic",
40
+ "schema": "./src/generators/app/schema.json",
41
+ "description": "Generates an Analog application",
42
+ "aliases": ["app"]
43
+ },
44
+ "page": {
45
+ "factory": "./src/generators/page/compat#pageSchematic",
46
+ "schema": "./src/generators/page/schema.json",
47
+ "description": "Creates a new Analog page in the given or default project.",
48
+ "aliases": ["p"]
49
+ },
50
+ "setup-vitest": {
51
+ "factory": "./src/generators/setup-vitest/compat#setupVitestSchematic",
52
+ "schema": "./src/generators/setup-vitest/schema.json",
53
+ "description": "Setup the Vitest configuration."
54
+ },
55
+ "init": {
56
+ "factory": "./src/generators/init/compat#initSchematic",
57
+ "schema": "./src/generators/init/schema.json",
58
+ "description": "Migrate and configure an Angular SPA to use Analog.",
59
+ "aliases": ["migrate"]
60
+ }
36
61
  }
37
62
  }
@@ -1,7 +1,3 @@
1
1
  {
2
- "name": "@analogjs/nx",
3
- "version": "0.0.1",
4
- "main": "src/index.js",
5
- "types": "./src/index.d.ts",
6
2
  "type": "commonjs"
7
- }
3
+ }
@@ -1,2 +1,3 @@
1
- declare const _default: any;
2
- export default _default;
1
+ import { convertNxExecutor } from "@nx/devkit";
2
+ declare const compat: ReturnType<typeof convertNxExecutor>;
3
+ export default compat;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const devkit_1 = require("@nx/devkit");
5
- const vite_impl_1 = tslib_1.__importDefault(require("./vite.impl"));
6
- exports.default = (0, devkit_1.convertNxExecutor)(vite_impl_1.default);
1
+ const require_src_executors_vite_vite_impl = require("./vite.impl.js");
2
+ //#region packages/nx-plugin/src/executors/vite/compat.ts
3
+ var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vite_vite_impl);
4
+ //#endregion
5
+ module.exports = compat;
6
+
7
7
  //# sourceMappingURL=compat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vite/compat.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C,oEAA4C;AAE5C,kBAAe,IAAA,0BAAiB,EAAC,mBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport viteBuildExecutor from './vite.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> =\n convertNxExecutor(viteBuildExecutor);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACc,qCAAkB"}
@@ -1,2 +1,2 @@
1
1
  import type { FileReplacement } from '@nx/vite/plugins/rollup-replace-files.plugin';
2
- export { ViteBuildExecutorOptions } from '@nx/vite/executors';
2
+ export type { ViteBuildExecutorOptions } from '@nx/vite/executors';
@@ -1,2 +1,2 @@
1
- import { viteBuildExecutor } from '@nx/vite/executors';
1
+ import { viteBuildExecutor } from "@nx/vite/executors";
2
2
  export default viteBuildExecutor;
@@ -1,5 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const executors_1 = require("@nx/vite/executors");
4
- exports.default = executors_1.viteBuildExecutor;
1
+ //#region packages/nx-plugin/src/executors/vite/vite.impl.ts
2
+ var vite_impl_default = require("@nx/vite/executors").viteBuildExecutor;
3
+ //#endregion
4
+ module.exports = vite_impl_default;
5
+
5
6
  //# sourceMappingURL=vite.impl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite.impl.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vite/vite.impl.ts"],"names":[],"mappings":";;AAAA,kDAAuD;AAEvD,kBAAe,6BAAiB,CAAC"}
1
+ {"version":3,"file":"vite.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite/vite.impl.ts"],"sourcesContent":["import { viteBuildExecutor } from '@nx/vite/executors';\n\nexport default viteBuildExecutor;\n"],"mappings":";AAEA,IAAA,kDAAe"}
@@ -1,2 +1,3 @@
1
- declare const _default: any;
2
- export default _default;
1
+ import { convertNxExecutor } from "@nx/devkit";
2
+ declare const compat: ReturnType<typeof convertNxExecutor>;
3
+ export default compat;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const devkit_1 = require("@nx/devkit");
5
- const vite_dev_server_impl_1 = tslib_1.__importDefault(require("./vite-dev-server.impl"));
6
- exports.default = (0, devkit_1.convertNxExecutor)(vite_dev_server_impl_1.default);
1
+ const require_src_executors_vite_dev_server_vite_dev_server_impl = require("./vite-dev-server.impl.js");
2
+ //#region packages/nx-plugin/src/executors/vite-dev-server/compat.ts
3
+ var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vite_dev_server_vite_dev_server_impl);
4
+ //#endregion
5
+ module.exports = compat;
6
+
7
7
  //# sourceMappingURL=compat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vite-dev-server/compat.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C,0FAA2D;AAE3D,kBAAe,IAAA,0BAAiB,EAAC,8BAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite-dev-server/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport viteDevServerExecutor from './vite-dev-server.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> = convertNxExecutor(\n viteDevServerExecutor,\n);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACJ,2DACD"}
@@ -1 +1 @@
1
- export { ViteDevServerExecutorOptions } from '@nx/vite/executors';
1
+ export type { ViteDevServerExecutorOptions } from '@nx/vite/executors';
@@ -1,2 +1,2 @@
1
- import { viteDevServerExecutor } from '@nx/vite/executors';
1
+ import { viteDevServerExecutor } from "@nx/vite/executors";
2
2
  export default viteDevServerExecutor;
@@ -1,5 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const executors_1 = require("@nx/vite/executors");
4
- exports.default = executors_1.viteDevServerExecutor;
1
+ //#region packages/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.ts
2
+ var vite_dev_server_impl_default = require("@nx/vite/executors").viteDevServerExecutor;
3
+ //#endregion
4
+ module.exports = vite_dev_server_impl_default;
5
+
5
6
  //# sourceMappingURL=vite-dev-server.impl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-dev-server.impl.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.ts"],"names":[],"mappings":";;AAAA,kDAA2D;AAE3D,kBAAe,iCAAqB,CAAC"}
1
+ {"version":3,"file":"vite-dev-server.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.ts"],"sourcesContent":["import { viteDevServerExecutor } from '@nx/vite/executors';\n\nexport default viteDevServerExecutor;\n"],"mappings":";AAEA,IAAA,6DAAe"}
@@ -1,2 +1,3 @@
1
- declare const _default: any;
2
- export default _default;
1
+ import { convertNxExecutor } from "@nx/devkit";
2
+ declare const compat: ReturnType<typeof convertNxExecutor>;
3
+ export default compat;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const devkit_1 = require("@nx/devkit");
5
- const vitest_impl_1 = tslib_1.__importDefault(require("./vitest.impl"));
6
- exports.default = (0, devkit_1.convertNxExecutor)(vitest_impl_1.default);
1
+ const require_src_executors_vitest_vitest_impl = require("./vitest.impl.js");
2
+ //#region packages/nx-plugin/src/executors/vitest/compat.ts
3
+ var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vitest_vitest_impl);
4
+ //#endregion
5
+ module.exports = compat;
6
+
7
7
  //# sourceMappingURL=compat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vitest/compat.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C,wEAA2C;AAE3C,kBAAe,IAAA,0BAAiB,EAAC,qBAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vitest/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport vitestExecutor from './vitest.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> =\n convertNxExecutor(vitestExecutor);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACc,yCAAe"}
@@ -1 +1 @@
1
- export { VitestExecutorOptions } from '@nx/vite/executors';
1
+ export type { VitestExecutorOptions } from '@nx/vite/executors';
@@ -1,2 +1,2 @@
1
- import { vitestExecutor } from '@nx/vite/executors';
1
+ import { vitestExecutor } from "@nx/vite/executors";
2
2
  export default vitestExecutor;
@@ -1,5 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const executors_1 = require("@nx/vite/executors");
4
- exports.default = executors_1.vitestExecutor;
1
+ //#region packages/nx-plugin/src/executors/vitest/vitest.impl.ts
2
+ var vitest_impl_default = require("@nx/vite/executors").vitestExecutor;
3
+ //#endregion
4
+ module.exports = vitest_impl_default;
5
+
5
6
  //# sourceMappingURL=vitest.impl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.impl.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/executors/vitest/vitest.impl.ts"],"names":[],"mappings":";;AAAA,kDAAoD;AAEpD,kBAAe,0BAAc,CAAC"}
1
+ {"version":3,"file":"vitest.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vitest/vitest.impl.ts"],"sourcesContent":["import { vitestExecutor } from '@nx/vite/executors';\n\nexport default vitestExecutor;\n"],"mappings":";AAEA,IAAA,oDAAe"}
@@ -1,2 +1,9 @@
1
- declare const _default: (generatorOptions: import("./schema").AnalogNxApplicationGeneratorOptions) => (tree: any, context: any) => Promise<any>;
2
- export default _default;
1
+ import { convertNxGenerator } from "@nx/devkit";
2
+ /**
3
+ * Angular CLI schematic wrapper for the Analog application generator.
4
+ * Referenced by `generators.json#schematics.application.factory` so that
5
+ * `ng generate @analogjs/platform:application` resolves through the
6
+ * Angular schematics engine (which uses named exports, not default).
7
+ */
8
+ export declare const applicationSchematic: ReturnType<typeof convertNxGenerator>;
9
+ export default applicationSchematic;
@@ -1,7 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const devkit_1 = require("@nx/devkit");
5
- const generator_1 = tslib_1.__importDefault(require("./generator"));
6
- exports.default = (0, devkit_1.convertNxGenerator)(generator_1.default);
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_src_generators_app_generator = require("./generator.js");
6
+ //#region packages/nx-plugin/src/generators/app/compat.ts
7
+ /**
8
+ * Angular CLI schematic wrapper for the Analog application generator.
9
+ * Referenced by `generators.json#schematics.application.factory` so that
10
+ * `ng generate @analogjs/platform:application` resolves through the
11
+ * Angular schematics engine (which uses named exports, not default).
12
+ */
13
+ var applicationSchematic = (0, require("@nx/devkit").convertNxGenerator)(require_src_generators_app_generator);
14
+ //#endregion
15
+ exports.applicationSchematic = applicationSchematic;
16
+ exports.default = applicationSchematic;
17
+
7
18
  //# sourceMappingURL=compat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../../../../packages/nx-plugin/src/generators/app/compat.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,kBAAe,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/generators/app/compat.ts"],"sourcesContent":["import { convertNxGenerator } from '@nx/devkit';\nimport generator from './generator';\n\n/**\n * Angular CLI schematic wrapper for the Analog application generator.\n * Referenced by `generators.json#schematics.application.factory` so that\n * `ng generate @analogjs/platform:application` resolves through the\n * Angular schematics engine (which uses named exports, not default).\n */\nexport const applicationSchematic: ReturnType<typeof convertNxGenerator> =\n convertNxGenerator(generator) as ReturnType<typeof convertNxGenerator>;\nexport default applicationSchematic;\n"],"mappings":";;;;;;;;;;;;AASA,IAAa,wBAAA,yBAAA,oBACQ,qCAAU"}
@@ -4,16 +4,13 @@
4
4
  "rootDir": ".",
5
5
  "sourceMap": true,
6
6
  "declaration": false,
7
- "moduleResolution": "node",
8
- "emitDecoratorMetadata": true,
9
- "experimentalDecorators": true,
7
+ "moduleResolution": "bundler",
10
8
  "importHelpers": true,
11
- "target": "es2015",
9
+ "target": "esnext",
12
10
  "module": "esnext",
13
- "lib": ["es2020", "dom"],
11
+ "lib": ["es2022", "dom"],
14
12
  "skipLibCheck": true,
15
13
  "skipDefaultLibCheck": true,
16
- "baseUrl": ".",
17
14
  "paths": {}
18
15
  },
19
16
  "exclude": ["node_modules", "tmp"]
@@ -1,6 +1,7 @@
1
1
  <% if (majorAngularVersion > 20) { %>
2
2
  import '@angular/compiler';
3
3
  import '@analogjs/vitest-angular/setup-snapshots';
4
+ import '@analogjs/vitest-angular/setup-serializers';
4
5
  import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';
5
6
 
6
7
  setupTestBed();
@@ -2,9 +2,7 @@
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
- "types": [],
6
- "target": "ES2022",
7
- "useDefineForClassFields": false
5
+ "types": []
8
6
  },
9
7
  "files": ["src/main.ts", "src/main.server.ts"],
10
8
  "include": [
@@ -15,7 +15,8 @@
15
15
  }
16
16
  ],
17
17
  "compilerOptions": {
18
- "target": "es2020",
18
+ "target": "esnext",
19
+ "module": "esnext",
19
20
  "forceConsistentCasingInFileNames": true,
20
21
  "strict": true,
21
22
  "noImplicitOverride": true,
@@ -3,6 +3,9 @@
3
3
  import analog from '@analogjs/platform';
4
4
  import { defineConfig } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
+ <% if (addTailwind) { %>
7
+ import tailwindcss from '@tailwindcss/vite';
8
+ <% } %>
6
9
 
7
10
  // https://vitejs.dev/config/
8
11
  export default defineConfig(({ mode }) => {
@@ -20,6 +23,9 @@ export default defineConfig(({ mode }) => {
20
23
  },
21
24
  },
22
25
  plugins: [
26
+ <% if (addTailwind) { %>
27
+ tailwindcss(),
28
+ <% } %>
23
29
  analog(),
24
30
  nxViteTsPaths(),
25
31
  ],
@@ -2,17 +2,11 @@ import { ApplicationConfig } from '@angular/core';
2
2
  import { provideHttpClient, withFetch } from '@angular/common/http';
3
3
  import { provideClientHydration } from '@angular/platform-browser';
4
4
  import { provideFileRouter } from '@analogjs/router';
5
- <% if (addTRPC) { %>
6
- import { provideTrpcClient } from '../trpc-client';
7
- <% } %>
8
5
 
9
6
  export const appConfig: ApplicationConfig = {
10
7
  providers: [
11
8
  provideFileRouter(),
12
9
  provideClientHydration(),
13
10
  provideHttpClient(withFetch()),
14
- <% if (addTRPC) { %>
15
- provideTrpcClient(),
16
- <% } %>
17
11
  ],
18
12
  };
@@ -15,13 +15,15 @@
15
15
  }
16
16
  ],
17
17
  "compilerOptions": {
18
- "target": "es2020",
18
+ "target": "ES2022",
19
+ "module": "ES2022",
19
20
  "forceConsistentCasingInFileNames": true,
20
21
  "strict": true,
21
22
  "noImplicitOverride": true,
22
23
  "noPropertyAccessFromIndexSignature": true,
23
24
  "noImplicitReturns": true,
24
- "noFallthroughCasesInSwitch": true
25
+ "noFallthroughCasesInSwitch": true,
26
+ "moduleResolution": "bundler"
25
27
  },
26
28
  "angularCompilerOptions": {
27
29
  "enableI18nLegacyMessageIdFormat": false,
@@ -4,7 +4,6 @@ import analog from '@analogjs/platform';
4
4
  import { defineConfig, Plugin } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
6
  <% if (addTailwind) { %>
7
- // @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
8
7
  import tailwindcss from '@tailwindcss/vite';
9
8
  <% } %>
10
9
 
@@ -14,11 +13,6 @@ export default defineConfig(({ mode }) => {
14
13
  root: __dirname,
15
14
  publicDir: 'src/public',
16
15
  cacheDir: `<%= offsetFromRoot %>node_modules/.vite`,
17
- <% if (addTRPC) { %>
18
- ssr: {
19
- noExternal: ['@analogjs/trpc','@trpc/server'],
20
- },
21
- <% } %>
22
16
  build: {
23
17
  outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
24
18
  reportCompressedSize: true,
@@ -33,19 +27,7 @@ export default defineConfig(({ mode }) => {
33
27
  <% if (addTailwind) { %>
34
28
  tailwindcss(),
35
29
  <% } %>
36
- <% if (addTRPC) { %>
37
- analog({
38
- nitro: {
39
- routeRules: {
40
- '/': {
41
- prerender: false,
42
- }
43
- }
44
- }
45
- }),
46
- <% } else { %>
47
30
  analog(),
48
- <% } %>
49
31
  nxViteTsPaths(),
50
32
  ],
51
33
  test: {
@@ -6,9 +6,6 @@ import {
6
6
  } from '@angular/common/http';
7
7
  import { provideClientHydration } from '@angular/platform-browser';
8
8
  import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';
9
- <% if (addTRPC) { %>
10
- import { provideTrpcClient } from '../trpc-client';
11
- <% } %>
12
9
 
13
10
  export const appConfig: ApplicationConfig = {
14
11
  providers: [
@@ -19,8 +16,5 @@ export const appConfig: ApplicationConfig = {
19
16
  withFetch(),
20
17
  withInterceptors([requestContextInterceptor])
21
18
  ),
22
- <% if (addTRPC) { %>
23
- provideTrpcClient(),
24
- <% } %>
25
19
  ],
26
20
  };
@@ -15,13 +15,15 @@
15
15
  }
16
16
  ],
17
17
  "compilerOptions": {
18
- "target": "es2020",
18
+ "target": "ES2022",
19
+ "module": "ES2022",
19
20
  "forceConsistentCasingInFileNames": true,
20
21
  "strict": true,
21
22
  "noImplicitOverride": true,
22
23
  "noPropertyAccessFromIndexSignature": true,
23
24
  "noImplicitReturns": true,
24
- "noFallthroughCasesInSwitch": true
25
+ "noFallthroughCasesInSwitch": true,
26
+ "moduleResolution": "bundler"
25
27
  },
26
28
  "angularCompilerOptions": {
27
29
  "enableI18nLegacyMessageIdFormat": false,