@nx/angular 0.0.0-pr-31222-862e973 → 0.0.0-pr-31313-387cdca

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 (477) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/executors.d.ts +1 -6
  4. package/executors.js +2 -3
  5. package/executors.json +2 -2
  6. package/fesm2022/nx-angular-mf.mjs +64 -0
  7. package/fesm2022/nx-angular-mf.mjs.map +1 -1
  8. package/fesm2022/nx-angular.mjs +0 -352
  9. package/fesm2022/nx-angular.mjs.map +1 -1
  10. package/generators.d.ts +0 -1
  11. package/generators.js +0 -1
  12. package/generators.json +19 -18
  13. package/index.d.ts +1 -1
  14. package/mf/mf.d.ts +64 -0
  15. package/migrations.json +778 -1289
  16. package/module-federation/index.d.ts +5 -2
  17. package/module-federation/index.js +3 -4
  18. package/ng-package.json +2 -2
  19. package/package.json +17 -29
  20. package/src/builders/dev-server/dev-server.impl.js +6 -4
  21. package/src/builders/dev-server/lib/normalize-options.js +3 -0
  22. package/src/builders/dev-server/lib/validate-options.js +1 -9
  23. package/src/builders/dev-server/schema.d.ts +3 -0
  24. package/src/builders/dev-server/schema.json +8 -8
  25. package/src/builders/webpack-browser/schema.d.ts +0 -5
  26. package/src/builders/webpack-browser/schema.json +0 -2
  27. package/src/builders/webpack-browser/webpack-browser.impl.js +3 -4
  28. package/src/builders/webpack-server/schema.json +0 -1
  29. package/src/executors/application/application.impl.d.ts +1 -1
  30. package/src/executors/application/application.impl.js +4 -1
  31. package/src/executors/application/schema.json +78 -8
  32. package/src/executors/application/utils/normalize-options.d.ts +2 -0
  33. package/src/executors/application/utils/normalize-options.js +34 -0
  34. package/src/executors/application/utils/validate-options.js +18 -4
  35. package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +1 -1
  36. package/src/executors/browser-esbuild/browser-esbuild.impl.js +0 -9
  37. package/src/executors/browser-esbuild/schema.json +1 -3
  38. package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
  39. package/src/executors/delegate-build/delegate-build.impl.js +0 -3
  40. package/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
  41. package/src/executors/module-federation-dev-server/lib/index.js +0 -2
  42. package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -0
  43. package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +1 -1
  44. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +1 -1
  45. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +5 -31
  46. package/src/executors/module-federation-dev-server/schema.d.ts +4 -0
  47. package/src/executors/module-federation-dev-server/schema.json +2 -1
  48. package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +2 -2
  49. package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +1 -0
  50. package/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +1 -1
  51. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +1 -1
  52. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +7 -35
  53. package/src/executors/module-federation-ssr-dev-server/schema.d.ts +8 -14
  54. package/src/executors/module-federation-ssr-dev-server/schema.json +1 -0
  55. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.d.ts +3 -0
  56. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.js +22 -0
  57. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.d.ts +2 -0
  58. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.js +17 -0
  59. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{v17+/ng-package → ng-package}/entry-point/write-bundles.transform.d.ts +3 -1
  60. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.transform.js +49 -0
  61. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
  62. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +7 -26
  63. package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.d.ts +1 -1
  64. package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
  65. package/src/executors/ng-packagr-lite/schema.json +3 -7
  66. package/src/executors/package/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
  67. package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +4 -21
  68. package/src/executors/package/package.impl.d.ts +2 -2
  69. package/src/executors/package/package.impl.js +6 -4
  70. package/src/executors/package/schema.d.ts +4 -6
  71. package/src/executors/package/schema.json +4 -10
  72. package/src/executors/utilities/ng-packagr/ng-packagr-version.d.ts +2 -0
  73. package/src/executors/utilities/ng-packagr/ng-packagr-version.js +11 -0
  74. package/src/executors/utilities/ng-packagr/package-imports.d.ts +1 -0
  75. package/src/executors/utilities/ng-packagr/package-imports.js +10 -0
  76. package/src/executors/utilities/ng-packagr/{stylesheet-processor.js → pre-v19/stylesheet-processor.js} +4 -4
  77. package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +1 -1
  78. package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +23 -14
  79. package/src/executors/utilities/ng-packagr/tailwindcss.d.ts +0 -6
  80. package/src/executors/utilities/ng-packagr/tailwindcss.js +0 -32
  81. package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.d.ts +14 -0
  82. package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.js +99 -0
  83. package/src/generators/add-linting/add-linting.js +2 -17
  84. package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
  85. package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
  86. package/src/generators/add-linting/schema.d.ts +1 -0
  87. package/src/generators/application/application.d.ts +0 -1
  88. package/src/generators/application/application.js +24 -9
  89. package/src/generators/application/files/ng-module/src/app/app.component.html__tpl__ +8 -1
  90. package/src/generators/application/files/ng-module/src/app/app.component.ts__tpl__ +4 -5
  91. package/src/generators/application/files/nx-welcome/claimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
  92. package/src/generators/application/files/nx-welcome/claimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
  93. package/src/generators/application/files/nx-welcome/not-configured/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
  94. package/src/generators/application/files/nx-welcome/not-configured/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
  95. package/src/generators/application/files/nx-welcome/unclaimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
  96. package/src/generators/application/files/nx-welcome/unclaimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
  97. package/src/generators/application/files/rspack-ssr/server.ts__tmpl__ +72 -0
  98. package/src/generators/application/files/standalone-components/src/app/app.component.html__tpl__ +8 -1
  99. package/src/generators/application/files/standalone-components/src/app/app.component.ts__tpl__ +4 -6
  100. package/src/generators/application/lib/add-e2e.js +2 -9
  101. package/src/generators/application/lib/add-linting.js +2 -2
  102. package/src/generators/application/lib/add-serve-static-target.d.ts +1 -1
  103. package/src/generators/application/lib/add-serve-static-target.js +2 -3
  104. package/src/generators/application/lib/add-unit-test-runner.js +20 -7
  105. package/src/generators/application/lib/create-files.js +4 -1
  106. package/src/generators/application/lib/create-project.js +25 -31
  107. package/src/generators/application/lib/normalize-options.d.ts +1 -1
  108. package/src/generators/application/lib/normalize-options.js +14 -15
  109. package/src/generators/application/schema.d.ts +5 -6
  110. package/src/generators/application/schema.json +16 -21
  111. package/src/generators/component/component.d.ts +0 -1
  112. package/src/generators/component/component.js +4 -7
  113. package/src/generators/component/files/__fileName__.__style__ +1 -1
  114. package/src/generators/component/files/__fileName__.spec.ts__tpl__ +1 -1
  115. package/src/generators/component/files/__fileName__.ts__tpl__ +5 -13
  116. package/src/generators/component/lib/normalize-options.js +8 -6
  117. package/src/generators/component/schema.d.ts +3 -18
  118. package/src/generators/component/schema.json +11 -28
  119. package/src/generators/component-story/files/__componentFileName__.stories.ts__tmpl__ +4 -4
  120. package/src/generators/component-test/component-test.js +1 -1
  121. package/src/generators/convert-to-application-executor/convert-to-application-executor.js +1 -4
  122. package/src/generators/convert-to-application-executor/schema.json +1 -1
  123. package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
  124. package/src/generators/convert-to-rspack/convert-to-rspack.js +357 -0
  125. package/src/generators/convert-to-rspack/lib/create-config.d.ts +2 -0
  126. package/src/generators/convert-to-rspack/lib/create-config.js +45 -0
  127. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
  128. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +77 -0
  129. package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
  130. package/src/generators/convert-to-rspack/lib/update-tsconfig.js +26 -0
  131. package/src/generators/convert-to-rspack/lib/validate-supported-executor.d.ts +2 -0
  132. package/src/generators/convert-to-rspack/lib/validate-supported-executor.js +14 -0
  133. package/src/generators/convert-to-rspack/schema.d.ts +5 -0
  134. package/src/generators/convert-to-rspack/schema.json +30 -0
  135. package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +1 -2
  136. package/src/generators/cypress-component-configuration/cypress-component-configuration.js +1 -7
  137. package/src/generators/directive/directive.js +5 -0
  138. package/src/generators/directive/files/__fileName__.ts__tpl__ +2 -2
  139. package/src/generators/directive/lib/normalize-options.js +6 -7
  140. package/src/generators/directive/schema.d.ts +2 -17
  141. package/src/generators/directive/schema.json +20 -28
  142. package/src/generators/federate-module/lib/add-remote.js +0 -3
  143. package/src/generators/federate-module/schema.d.ts +0 -2
  144. package/src/generators/federate-module/schema.json +19 -16
  145. package/src/generators/host/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
  146. package/src/generators/host/files/js/webpack.server.config.js__tmpl__ +1 -1
  147. package/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +1 -1
  148. package/src/generators/host/host.d.ts +1 -2
  149. package/src/generators/host/host.js +33 -25
  150. package/src/generators/host/lib/update-ssr-setup.js +7 -3
  151. package/src/generators/host/schema.d.ts +4 -5
  152. package/src/generators/host/schema.json +34 -27
  153. package/src/generators/init/init.js +3 -1
  154. package/src/generators/library/files/base/README.md__tpl__ +2 -2
  155. package/src/generators/library/lib/add-project.d.ts +1 -1
  156. package/src/generators/library/lib/add-project.js +7 -1
  157. package/src/generators/library/lib/add-standalone-component.js +4 -3
  158. package/src/generators/library/lib/normalize-options.js +4 -5
  159. package/src/generators/library/lib/normalized-schema.d.ts +2 -3
  160. package/src/generators/library/library.d.ts +0 -1
  161. package/src/generators/library/library.js +27 -19
  162. package/src/generators/library/schema.d.ts +2 -5
  163. package/src/generators/library/schema.json +9 -20
  164. package/src/generators/move/lib/update-secondary-entry-points.js +1 -0
  165. package/src/generators/move/move.d.ts +3 -1
  166. package/src/generators/move/move.js +4 -8
  167. package/src/generators/move/schema.d.ts +0 -3
  168. package/src/generators/move/schema.json +0 -5
  169. package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +1 -1
  170. package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js +4 -3
  171. package/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +1 -1
  172. package/src/generators/ng-add/migrators/builders/builder.migrator.d.ts +2 -2
  173. package/src/generators/ng-add/migrators/builders/builder.migrator.js +4 -4
  174. package/src/generators/ng-add/migrators/projects/e2e.migrator.js +4 -4
  175. package/src/generators/ng-add/migrators/projects/project.migrator.js +1 -1
  176. package/src/generators/ng-add/utilities/validation-logging.js +5 -4
  177. package/src/generators/ng-add/utilities/workspace.js +5 -2
  178. package/src/generators/ngrx/ngrx.d.ts +3 -0
  179. package/src/generators/ngrx/ngrx.js +3 -0
  180. package/src/generators/ngrx/schema.json +1 -1
  181. package/src/generators/ngrx-feature-store/schema.d.ts +1 -1
  182. package/src/generators/ngrx-root-store/lib/add-imports.js +4 -4
  183. package/src/generators/ngrx-root-store/lib/normalize-options.js +3 -2
  184. package/src/generators/pipe/files/__fileName__.ts__tpl__ +2 -2
  185. package/src/generators/pipe/lib/normalize-options.js +6 -7
  186. package/src/generators/pipe/pipe.js +5 -0
  187. package/src/generators/pipe/schema.d.ts +2 -17
  188. package/src/generators/pipe/schema.json +20 -28
  189. package/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +1 -1
  190. package/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +1 -1
  191. package/src/generators/remote/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
  192. package/src/generators/remote/lib/update-ssr-setup.js +7 -3
  193. package/src/generators/remote/remote.d.ts +1 -2
  194. package/src/generators/remote/remote.js +38 -14
  195. package/src/generators/remote/schema.d.ts +4 -5
  196. package/src/generators/remote/schema.json +32 -25
  197. package/src/generators/scam/lib/normalize-options.js +6 -7
  198. package/src/generators/scam/scam.js +0 -2
  199. package/src/generators/scam/schema.d.ts +3 -17
  200. package/src/generators/scam/schema.json +16 -30
  201. package/src/generators/scam-directive/lib/normalize-options.js +6 -7
  202. package/src/generators/scam-directive/scam-directive.js +0 -2
  203. package/src/generators/scam-directive/schema.d.ts +3 -17
  204. package/src/generators/scam-directive/schema.json +16 -31
  205. package/src/generators/scam-pipe/lib/normalize-options.js +6 -7
  206. package/src/generators/scam-pipe/scam-pipe.js +0 -2
  207. package/src/generators/scam-pipe/schema.d.ts +3 -17
  208. package/src/generators/scam-pipe/schema.json +16 -31
  209. package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +1 -1
  210. package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +5 -4
  211. package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +3 -1
  212. package/src/generators/setup-mf/files/entry-module-files/entry.component.ts__tmpl__ +2 -1
  213. package/src/generators/setup-mf/files/standalone-entry-component-files/entry.component.ts__tmpl__ +2 -2
  214. package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +4 -1
  215. package/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +1 -1
  216. package/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +1 -1
  217. package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +3 -0
  218. package/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +1 -1
  219. package/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +1 -1
  220. package/src/generators/setup-mf/lib/add-remote-entry.js +5 -0
  221. package/src/generators/setup-mf/lib/add-remote-to-host.js +21 -8
  222. package/src/generators/setup-mf/lib/fix-bootstrap.js +3 -2
  223. package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
  224. package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +1 -1
  225. package/src/generators/setup-mf/schema.json +5 -3
  226. package/src/generators/setup-mf/setup-mf.js +5 -2
  227. package/src/generators/setup-ssr/files/{server → pre-v19/server}/application-builder/__serverFileName__ +1 -1
  228. package/src/generators/setup-ssr/files/{server/server-builder/v17+ → pre-v19/server/server-builder}/__serverFileName__ +1 -1
  229. package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/__main__ +1 -0
  230. package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +13 -0
  231. package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/app.routes.server.ts__tpl__ +8 -0
  232. package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +66 -0
  233. package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/__main__ +7 -0
  234. package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +14 -0
  235. package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.routes.server.ts__tpl__ +8 -0
  236. package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +67 -0
  237. package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/__main__ +1 -0
  238. package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/app/__rootModuleFileName__ +14 -0
  239. package/src/generators/setup-ssr/files/v19+/server-builder/root/tsconfig.server.json.template +16 -0
  240. package/src/generators/setup-ssr/files/{server/server-builder/pre-v17 → v19+/server-builder/server}/__serverFileName__ +25 -15
  241. package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/__main__ +7 -0
  242. package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/app/app.config.server.ts.template +11 -0
  243. package/src/generators/setup-ssr/lib/add-dependencies.js +6 -17
  244. package/src/generators/setup-ssr/lib/add-hydration.d.ts +2 -2
  245. package/src/generators/setup-ssr/lib/add-hydration.js +10 -2
  246. package/src/generators/setup-ssr/lib/add-server-file.d.ts +2 -2
  247. package/src/generators/setup-ssr/lib/add-server-file.js +24 -10
  248. package/src/generators/setup-ssr/lib/generate-files.d.ts +2 -2
  249. package/src/generators/setup-ssr/lib/generate-files.js +31 -8
  250. package/src/generators/setup-ssr/lib/generate-server-ts-config.d.ts +3 -3
  251. package/src/generators/setup-ssr/lib/generate-server-ts-config.js +24 -3
  252. package/src/generators/setup-ssr/lib/normalize-options.d.ts +3 -14
  253. package/src/generators/setup-ssr/lib/normalize-options.js +27 -6
  254. package/src/generators/setup-ssr/lib/set-router-initial-navigation.d.ts +2 -2
  255. package/src/generators/setup-ssr/lib/update-project-config.d.ts +3 -3
  256. package/src/generators/setup-ssr/lib/update-project-config.js +37 -24
  257. package/src/generators/setup-ssr/lib/validate-options.js +5 -0
  258. package/src/generators/setup-ssr/schema.d.ts +5 -0
  259. package/src/generators/setup-ssr/schema.json +6 -8
  260. package/src/generators/setup-ssr/setup-ssr.js +6 -11
  261. package/src/generators/setup-tailwind/lib/index.d.ts +1 -1
  262. package/src/generators/setup-tailwind/lib/index.js +1 -1
  263. package/src/generators/setup-tailwind/lib/update-application-styles.js +1 -1
  264. package/src/generators/setup-tailwind/lib/validate-build-target.d.ts +3 -0
  265. package/src/generators/setup-tailwind/lib/{add-tailwind-config-path-to-project.js → validate-build-target.js} +5 -15
  266. package/src/generators/setup-tailwind/setup-tailwind.js +4 -1
  267. package/src/generators/stories/schema.d.ts +0 -2
  268. package/src/generators/stories/schema.json +0 -10
  269. package/src/generators/stories/stories.js +2 -21
  270. package/src/generators/storybook-configuration/lib/generate-stories.js +0 -6
  271. package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
  272. package/src/generators/storybook-configuration/schema.d.ts +0 -3
  273. package/src/generators/storybook-configuration/schema.json +0 -15
  274. package/src/generators/storybook-configuration/storybook-configuration.js +0 -3
  275. package/src/generators/utils/add-jest.d.ts +1 -0
  276. package/src/generators/utils/add-jest.js +5 -9
  277. package/src/generators/utils/add-vitest.d.ts +9 -0
  278. package/src/generators/utils/add-vitest.js +21 -0
  279. package/src/generators/utils/assert-mf-utils.d.ts +1 -0
  280. package/src/generators/utils/assert-mf-utils.js +11 -0
  281. package/src/generators/utils/ensure-angular-dependencies.js +0 -1
  282. package/src/generators/utils/storybook-ast/component-info.js +13 -3
  283. package/src/generators/utils/testing.js +15 -28
  284. package/src/generators/utils/validations.d.ts +1 -0
  285. package/src/generators/utils/validations.js +10 -0
  286. package/src/generators/utils/version-utils.d.ts +1 -0
  287. package/src/generators/utils/version-utils.js +7 -2
  288. package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +4 -4
  289. package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
  290. package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.d.ts +3 -0
  291. package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.js +55 -0
  292. package/src/migrations/{update-14-2-0/remove-show-circular-dependencies-option.d.ts → update-20-2-0/disable-angular-eslint-prefer-standalone.d.ts} +1 -1
  293. package/src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone.js +55 -0
  294. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +2 -0
  295. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +61 -0
  296. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +2 -0
  297. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +41 -0
  298. package/src/migrations/update-20-2-0/remove-angular-eslint-rules.d.ts +3 -0
  299. package/src/migrations/update-20-2-0/remove-angular-eslint-rules.js +62 -0
  300. package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts +3 -0
  301. package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +73 -0
  302. package/src/migrations/{update-14-5-2 → update-20-2-0}/update-angular-cli.d.ts +1 -0
  303. package/src/migrations/{update-16-1-0 → update-20-2-0}/update-angular-cli.js +1 -1
  304. package/src/migrations/{update-14-2-0/update-libraries-secondary-entrypoints.d.ts → update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.d.ts} +1 -1
  305. package/src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.js +55 -0
  306. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +2 -0
  307. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +18 -0
  308. package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.d.ts +1 -0
  309. package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.js +4 -3
  310. package/src/migrations/{update-14-6-0 → update-20-5-0}/update-angular-cli.d.ts +1 -0
  311. package/src/migrations/{update-14-5-2 → update-20-5-0}/update-angular-cli.js +4 -3
  312. package/src/migrations/{update-14-2-0/update-ngcc-target.d.ts → update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.d.ts} +1 -1
  313. package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +122 -0
  314. package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
  315. package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
  316. package/src/plugins/plugin.js +7 -2
  317. package/src/utils/backward-compatible-versions.d.ts +4 -4
  318. package/src/utils/backward-compatible-versions.js +27 -23
  319. package/src/utils/nx-devkit/ast-utils.d.ts +3 -2
  320. package/src/utils/nx-devkit/ast-utils.js +22 -4
  321. package/src/utils/test-runners.d.ts +2 -1
  322. package/src/utils/test-runners.js +1 -0
  323. package/src/utils/versions.d.ts +13 -11
  324. package/src/utils/versions.js +14 -12
  325. package/esm2022/index.mjs +0 -2
  326. package/esm2022/mf/index.mjs +0 -2
  327. package/esm2022/mf/mf.mjs +0 -52
  328. package/esm2022/mf/nx-angular-mf.mjs +0 -5
  329. package/esm2022/nx-angular.mjs +0 -5
  330. package/esm2022/src/runtime/nx/data-persistence.mjs +0 -349
  331. package/esm2022/testing/index.mjs +0 -2
  332. package/esm2022/testing/nx-angular-testing.mjs +0 -5
  333. package/esm2022/testing/src/testing-utils.mjs +0 -38
  334. package/fesm2022/nx-angular-testing.mjs +0 -45
  335. package/fesm2022/nx-angular-testing.mjs.map +0 -1
  336. package/src/executors/module-federation-dev-server/lib/build-static-remotes.d.ts +0 -4
  337. package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +0 -65
  338. package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.d.ts +0 -9
  339. package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +0 -51
  340. package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.d.ts +0 -4
  341. package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.js +0 -65
  342. package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.d.ts +0 -4
  343. package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.js +0 -41
  344. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
  345. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.js +0 -27
  346. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
  347. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.js +0 -53
  348. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.d.ts +0 -15
  349. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.js +0 -28
  350. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.d.ts +0 -30
  351. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.js +0 -52
  352. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.d.ts +0 -12
  353. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.js +0 -20
  354. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.d.ts +0 -9
  355. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.js +0 -320
  356. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.d.ts +0 -14
  357. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +0 -35
  358. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.d.ts +0 -14
  359. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.js +0 -37
  360. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.d.ts +0 -12
  361. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +0 -178
  362. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.d.ts +0 -42
  363. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.d.ts +0 -10
  364. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.js +0 -17
  365. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +0 -201
  366. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.d.ts +0 -2
  367. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.js +0 -12
  368. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.js +0 -12
  369. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.d.ts +0 -8
  370. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.js +0 -18
  371. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.d.ts +0 -8
  372. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +0 -286
  373. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
  374. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js +0 -26
  375. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
  376. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +0 -71
  377. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.d.ts +0 -13
  378. package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js +0 -32
  379. package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.d.ts +0 -14
  380. package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +0 -35
  381. package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.d.ts +0 -14
  382. package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js +0 -37
  383. package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +0 -13
  384. package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +0 -183
  385. package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +0 -36
  386. package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.d.ts +0 -10
  387. package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.js +0 -17
  388. package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +0 -194
  389. package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.d.ts +0 -1
  390. package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +0 -9
  391. package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +0 -4
  392. package/src/generators/component-cypress-spec/component-cypress-spec.js +0 -35
  393. package/src/generators/component-cypress-spec/files/__componentFileName__.__fileExt__ +0 -17
  394. package/src/generators/component-cypress-spec/lib/get-args-default-value.d.ts +0 -2
  395. package/src/generators/component-cypress-spec/lib/get-args-default-value.js +0 -24
  396. package/src/generators/component-cypress-spec/lib/get-component-selector.d.ts +0 -2
  397. package/src/generators/component-cypress-spec/lib/get-component-selector.js +0 -23
  398. package/src/generators/component-cypress-spec/schema.d.ts +0 -10
  399. package/src/generators/component-cypress-spec/schema.json +0 -66
  400. package/src/generators/host/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -66
  401. package/src/generators/remote/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -72
  402. package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.d.ts +0 -3
  403. package/src/generators/stories/lib/get-e2e-project.d.ts +0 -2
  404. package/src/generators/stories/lib/get-e2e-project.js +0 -14
  405. package/src/generators/storybook-configuration/lib/validate-options.d.ts +0 -2
  406. package/src/generators/storybook-configuration/lib/validate-options.js +0 -8
  407. package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +0 -23
  408. package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +0 -34
  409. package/src/migrations/update-14-2-0/update-ngcc-target.js +0 -17
  410. package/src/migrations/update-14-2-0/update-router-initial-navigation.d.ts +0 -2
  411. package/src/migrations/update-14-2-0/update-router-initial-navigation.js +0 -73
  412. package/src/migrations/update-14-2-0/update-tsconfig-target.d.ts +0 -2
  413. package/src/migrations/update-14-2-0/update-tsconfig-target.js +0 -155
  414. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +0 -5
  415. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +0 -90
  416. package/src/migrations/update-14-6-0/update-angular-cli.js +0 -22
  417. package/src/migrations/update-14-8-0/rename-webpack-server.d.ts +0 -2
  418. package/src/migrations/update-14-8-0/rename-webpack-server.js +0 -21
  419. package/src/migrations/update-15-0-0/add-karma-inputs.d.ts +0 -2
  420. package/src/migrations/update-15-0-0/add-karma-inputs.js +0 -41
  421. package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.d.ts +0 -2
  422. package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +0 -102
  423. package/src/migrations/update-15-2-0/remove-browserlist-config.d.ts +0 -4
  424. package/src/migrations/update-15-2-0/remove-browserlist-config.js +0 -59
  425. package/src/migrations/update-15-2-0/remove-platform-server-exports.d.ts +0 -2
  426. package/src/migrations/update-15-2-0/remove-platform-server-exports.js +0 -62
  427. package/src/migrations/update-15-2-0/update-angular-cli.d.ts +0 -2
  428. package/src/migrations/update-15-2-0/update-angular-cli.js +0 -22
  429. package/src/migrations/update-15-2-0/update-karma-main-file.d.ts +0 -2
  430. package/src/migrations/update-15-2-0/update-karma-main-file.js +0 -72
  431. package/src/migrations/update-15-2-0/update-typescript-target.d.ts +0 -2
  432. package/src/migrations/update-15-2-0/update-typescript-target.js +0 -52
  433. package/src/migrations/update-15-2-0/update-workspace-config.d.ts +0 -2
  434. package/src/migrations/update-15-2-0/update-workspace-config.js +0 -24
  435. package/src/migrations/update-15-5-0/update-angular-cli.d.ts +0 -2
  436. package/src/migrations/update-15-5-0/update-angular-cli.js +0 -22
  437. package/src/migrations/update-15-7-0/install-required-packages.d.ts +0 -2
  438. package/src/migrations/update-15-7-0/install-required-packages.js +0 -36
  439. package/src/migrations/update-15-8-0/update-angular-cli.d.ts +0 -2
  440. package/src/migrations/update-15-8-0/update-angular-cli.js +0 -22
  441. package/src/migrations/update-15-9-0/update-file-server-executor.d.ts +0 -2
  442. package/src/migrations/update-15-9-0/update-file-server-executor.js +0 -42
  443. package/src/migrations/update-15-9-0/update-testing-tsconfig.d.ts +0 -3
  444. package/src/migrations/update-15-9-0/update-testing-tsconfig.js +0 -32
  445. package/src/migrations/update-16-0-0/remove-karma-defaults.d.ts +0 -2
  446. package/src/migrations/update-16-0-0/remove-karma-defaults.js +0 -52
  447. package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.d.ts +0 -2
  448. package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +0 -40
  449. package/src/migrations/update-16-0-0/remove-protractor-defaults.d.ts +0 -2
  450. package/src/migrations/update-16-0-0/remove-protractor-defaults.js +0 -52
  451. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
  452. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
  453. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.d.ts +0 -2
  454. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +0 -127
  455. package/src/migrations/update-16-1-0/remove-ngcc-invocation.d.ts +0 -2
  456. package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +0 -22
  457. package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +0 -2
  458. package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +0 -62
  459. package/src/migrations/update-16-1-0/update-angular-cli.d.ts +0 -3
  460. package/src/migrations/update-16-1-0/update-server-executor-config.d.ts +0 -2
  461. package/src/migrations/update-16-1-0/update-server-executor-config.js +0 -26
  462. package/src/runtime/nx/data-persistence.d.ts +0 -276
  463. package/src/utils/mf/utils.d.ts +0 -15
  464. package/src/utils/mf/utils.js +0 -101
  465. package/src/utils/mf/with-module-federation-ssr.d.ts +0 -2
  466. package/src/utils/mf/with-module-federation-ssr.js +0 -68
  467. package/src/utils/mf/with-module-federation.d.ts +0 -2
  468. package/src/utils/mf/with-module-federation.js +0 -70
  469. package/testing/index.d.ts +0 -1
  470. package/testing/ng-package.json +0 -6
  471. package/testing/src/testing-utils.d.ts +0 -33
  472. /package/src/executors/utilities/ng-packagr/{stylesheet-processor.d.ts → pre-v19/stylesheet-processor.d.ts} +0 -0
  473. /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/__main__ +0 -0
  474. /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/app/__rootModuleFileName__ +0 -0
  475. /package/src/generators/setup-ssr/files/{root → pre-v19/root}/tsconfig.server.json__tpl__ +0 -0
  476. /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/__main__ +0 -0
  477. /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/app/app.config.server.ts__tpl__ +0 -0
@@ -7,10 +7,11 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
7
7
  const path_1 = require("path");
8
8
  const rxjs_1 = require("rxjs");
9
9
  const operators_1 = require("rxjs/operators");
10
+ const angular_version_utils_1 = require("../utilities/angular-version-utils");
10
11
  const typescript_1 = require("../utilities/typescript");
11
12
  const ng_packagr_1 = require("./ng-packagr-adjustments/ng-packagr");
12
13
  async function initializeNgPackagr(options, context, projectDependencies) {
13
- const ngPackagr = await (0, ng_packagr_1.getNgPackagrInstance)(options);
14
+ const ngPackagr = await (0, ng_packagr_1.getNgPackagrInstance)();
14
15
  ngPackagr.forProject((0, path_1.resolve)(context.root, options.project));
15
16
  if (options.tsConfig) {
16
17
  const remappedTsConfigFilePath = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.root, options.tsConfig), context.root, context.projectsConfigurations.projects[context.projectName].root, projectDependencies);
@@ -26,10 +27,11 @@ async function initializeNgPackagr(options, context, projectDependencies) {
26
27
  */
27
28
  function createLibraryExecutor(initializeNgPackagr) {
28
29
  return async function* (options, context) {
29
- const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
30
- if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
31
- return Promise.resolve({ success: false });
30
+ const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
31
+ if (angularMajorVersion < 18 && options.poll !== undefined) {
32
+ throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
32
33
  }
34
+ const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
33
35
  if (options.watch) {
34
36
  return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
35
37
  }
@@ -1,6 +1,4 @@
1
- export interface BuildAngularLibraryExecutorOptions {
2
- project: string;
3
- tailwindConfig?: string;
4
- tsConfig?: string;
5
- watch?: boolean;
6
- }
1
+ import type { NgPackagrBuilderOptions } from '@angular-devkit/build-angular';
2
+
3
+ export interface BuildAngularLibraryExecutorOptions
4
+ extends NgPackagrBuilderOptions {}
@@ -3,14 +3,10 @@
3
3
  "outputCapture": "direct-nodejs",
4
4
  "$schema": "https://json-schema.org/schema",
5
5
  "title": "ng-packagr Target",
6
- "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is a drop-in replacement for the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.",
6
+ "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is a drop-in replacement for the `@angular-devkit/build-angular:ng-packagr` and `@angular/build:ng-packagr` builders, with additional support for incremental builds.",
7
7
  "cli": "nx",
8
8
  "type": "object",
9
9
  "presets": [
10
- {
11
- "name": "Publishable Library with Tailwind",
12
- "keys": ["project", "tailwindConfig"]
13
- },
14
10
  {
15
11
  "name": "Updating Project Dependencies for Publishable Library",
16
12
  "keys": ["project"]
@@ -33,11 +29,9 @@
33
29
  "description": "Whether to run a build when any file changes.",
34
30
  "default": false
35
31
  },
36
- "tailwindConfig": {
37
- "type": "string",
38
- "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured. _Note: starting with Angular v17, this option is no longer used and the configuration will be picked up if exists at the project or workspace root_.",
39
- "x-completion-type": "file",
40
- "x-completion-glob": "tailwind.config@(.js|.cjs|.mjs|.ts)"
32
+ "poll": {
33
+ "type": "number",
34
+ "description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
41
35
  }
42
36
  },
43
37
  "additionalProperties": false,
@@ -0,0 +1,2 @@
1
+ import { type VersionInfo } from '../angular-version-utils';
2
+ export declare function getNgPackagrVersionInfo(): VersionInfo;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNgPackagrVersionInfo = getNgPackagrVersionInfo;
4
+ const angular_version_utils_1 = require("../angular-version-utils");
5
+ let ngPackagrVersionInfo;
6
+ function getNgPackagrVersionInfo() {
7
+ if (!ngPackagrVersionInfo) {
8
+ ngPackagrVersionInfo = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
9
+ }
10
+ return ngPackagrVersionInfo;
11
+ }
@@ -0,0 +1 @@
1
+ export declare function importNgPackagrPath<T>(path: string, ngPackagrMajorVersion: number): T;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.importNgPackagrPath = importNgPackagrPath;
4
+ function importNgPackagrPath(path, ngPackagrMajorVersion) {
5
+ let finalPath = path;
6
+ if (ngPackagrMajorVersion >= 20 && !path.startsWith('ng-packagr/src/')) {
7
+ finalPath = path.replace(/^ng-packagr\//, 'ng-packagr/src/');
8
+ }
9
+ return require(finalPath);
10
+ }
@@ -15,10 +15,10 @@ const path_1 = require("path");
15
15
  const Piscina = require('piscina');
16
16
  const color_1 = require("ng-packagr/lib/utils/color");
17
17
  // using this instead of the one from ng-packagr
18
- const tailwindcss_1 = require("./tailwindcss");
18
+ const tailwindcss_1 = require("../tailwindcss");
19
19
  const devkit_1 = require("@nx/devkit");
20
20
  const semver_1 = require("semver");
21
- const angular_version_utils_1 = require("../angular-version-utils");
21
+ const ng_packagr_version_1 = require("../ng-packagr-version");
22
22
  const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
23
23
  const maxThreads = typeof maxWorkersVariable === 'string' && maxWorkersVariable !== ''
24
24
  ? +maxWorkersVariable
@@ -72,7 +72,7 @@ class StylesheetProcessor {
72
72
  currentDir = (0, path_1.dirname)(prevDir);
73
73
  }
74
74
  const browserslistData = (0, browserslist_1.default)(undefined, { path: this.basePath });
75
- const { version: ngPackagrVersion } = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
75
+ const { version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
76
76
  let tailwindConfigPath;
77
77
  let postcssConfiguration;
78
78
  if ((0, semver_1.gte)(ngPackagrVersion, '18.0.0')) {
@@ -163,7 +163,7 @@ class AsyncStylesheetProcessor {
163
163
  currentDir = (0, path_1.dirname)(prevDir);
164
164
  }
165
165
  const browserslistData = (0, browserslist_1.default)(undefined, { path: this.basePath });
166
- const { version: ngPackagrVersion } = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
166
+ const { version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
167
167
  let postcssConfiguration;
168
168
  if (ngPackagrVersion === '17.2.0') {
169
169
  const { loadPostcssConfiguration, } = require('ng-packagr/lib/styles/postcss-configuration');
@@ -1,2 +1,2 @@
1
1
  import type { FactoryProvider } from 'injection-js';
2
- export declare const STYLESHEET_PROCESSOR: FactoryProvider;
2
+ export declare function getStylesheetProcessorFactoryProvider(): FactoryProvider;
@@ -1,16 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.STYLESHEET_PROCESSOR = void 0;
4
- const stylesheet_processor_di_1 = require("ng-packagr/lib/styles/stylesheet-processor.di");
5
- const angular_version_utils_1 = require("../angular-version-utils");
6
- const stylesheet_processor_1 = require("./stylesheet-processor");
7
- exports.STYLESHEET_PROCESSOR = {
8
- provide: stylesheet_processor_di_1.STYLESHEET_PROCESSOR_TOKEN,
9
- useFactory: () => {
10
- const { version: ngPackagrVersion } = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
11
- return ngPackagrVersion !== '17.2.0'
12
- ? stylesheet_processor_1.StylesheetProcessor
13
- : stylesheet_processor_1.AsyncStylesheetProcessor;
14
- },
15
- deps: [],
16
- };
3
+ exports.getStylesheetProcessorFactoryProvider = getStylesheetProcessorFactoryProvider;
4
+ const ng_packagr_version_1 = require("./ng-packagr-version");
5
+ const package_imports_1 = require("./package-imports");
6
+ function getStylesheetProcessorFactoryProvider() {
7
+ const { major: ngPackagrMajorVersion, version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
8
+ const { STYLESHEET_PROCESSOR_TOKEN } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/stylesheet-processor.di', ngPackagrMajorVersion);
9
+ return {
10
+ provide: STYLESHEET_PROCESSOR_TOKEN,
11
+ useFactory: () => {
12
+ if (ngPackagrMajorVersion >= 19) {
13
+ const { getStylesheetProcessor, } = require('./v19+/stylesheet-processor');
14
+ return getStylesheetProcessor();
15
+ }
16
+ if (ngPackagrVersion !== '17.2.0') {
17
+ const { StylesheetProcessor, } = require('./pre-v19/stylesheet-processor');
18
+ return StylesheetProcessor;
19
+ }
20
+ const { AsyncStylesheetProcessor, } = require('./pre-v19/stylesheet-processor');
21
+ return AsyncStylesheetProcessor;
22
+ },
23
+ deps: [],
24
+ };
25
+ }
@@ -1,7 +1 @@
1
- export interface TailwindSetup {
2
- tailwindConfigPath: string;
3
- tailwindPackagePath: string;
4
- }
5
- export declare function getTailwindSetup(basePath: string, tailwindConfig?: string): TailwindSetup | undefined;
6
1
  export declare function getTailwindConfigPath(projectRoot: string, workspaceRoot: string): string | undefined;
7
- export declare function getTailwindPostCssPlugin({ tailwindConfigPath, tailwindPackagePath, }: TailwindSetup): any;
@@ -1,37 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTailwindSetup = getTailwindSetup;
4
3
  exports.getTailwindConfigPath = getTailwindConfigPath;
5
- exports.getTailwindPostCssPlugin = getTailwindPostCssPlugin;
6
- const devkit_1 = require("@nx/devkit");
7
- const devkit_2 = require("@nx/devkit");
8
4
  const fs_1 = require("fs");
9
5
  const path_1 = require("path");
10
- function getTailwindSetup(basePath, tailwindConfig) {
11
- let tailwindConfigPath = tailwindConfig;
12
- if (!tailwindConfigPath) {
13
- tailwindConfigPath = getTailwindConfigPath(basePath, devkit_2.workspaceRoot);
14
- }
15
- // Only load Tailwind CSS plugin if configuration file was found.
16
- if (!tailwindConfigPath) {
17
- return undefined;
18
- }
19
- let tailwindPackagePath;
20
- try {
21
- tailwindPackagePath = require.resolve('tailwindcss');
22
- }
23
- catch {
24
- const relativeTailwindConfigPath = (0, path_1.relative)(devkit_2.workspaceRoot, tailwindConfigPath);
25
- devkit_1.logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
26
- ` but the 'tailwindcss' package is not installed.` +
27
- ` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
28
- return undefined;
29
- }
30
- if (!tailwindPackagePath) {
31
- return undefined;
32
- }
33
- return { tailwindConfigPath, tailwindPackagePath };
34
- }
35
6
  function getTailwindConfigPath(projectRoot, workspaceRoot) {
36
7
  // valid tailwind config files https://github.com/tailwindlabs/tailwindcss/blob/master/src/util/resolveConfigPath.js#L4
37
8
  const tailwindConfigFiles = [
@@ -50,6 +21,3 @@ function getTailwindConfigPath(projectRoot, workspaceRoot) {
50
21
  }
51
22
  return undefined;
52
23
  }
53
- function getTailwindPostCssPlugin({ tailwindConfigPath, tailwindPackagePath, }) {
54
- return require(tailwindPackagePath)({ config: tailwindConfigPath });
55
- }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Adapted from the original ng-packagr source.
3
+ *
4
+ * Changes made:
5
+ * - Add the project root to the search directories.
6
+ */
7
+ import type { NgPackageEntryConfig } from 'ng-packagr/ng-entrypoint.schema';
8
+ export declare enum CssUrl {
9
+ inline = "inline",
10
+ none = "none"
11
+ }
12
+ export declare function getStylesheetProcessor(): new (projectBasePath: string, basePath: string, cssUrl?: CssUrl, includePaths?: string[], sass?: NgPackageEntryConfig['lib']['sass'], cacheDirectory?: string | false, watch?: boolean) => {
13
+ [key: string]: any;
14
+ };
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /**
3
+ * Adapted from the original ng-packagr source.
4
+ *
5
+ * Changes made:
6
+ * - Add the project root to the search directories.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CssUrl = void 0;
10
+ exports.getStylesheetProcessor = getStylesheetProcessor;
11
+ const tslib_1 = require("tslib");
12
+ const devkit_1 = require("@nx/devkit");
13
+ const browserslist_1 = tslib_1.__importDefault(require("browserslist"));
14
+ const ng_packagr_version_1 = require("../ng-packagr-version");
15
+ const package_imports_1 = require("../package-imports");
16
+ var CssUrl;
17
+ (function (CssUrl) {
18
+ CssUrl["inline"] = "inline";
19
+ CssUrl["none"] = "none";
20
+ })(CssUrl || (exports.CssUrl = CssUrl = {}));
21
+ function getStylesheetProcessor() {
22
+ const { major: ngPackagrMajorVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
23
+ const { ComponentStylesheetBundler } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/component-stylesheets', ngPackagrMajorVersion);
24
+ const { generateSearchDirectories, getTailwindConfig, loadPostcssConfiguration, } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/postcss-configuration', ngPackagrMajorVersion);
25
+ class StylesheetProcessor extends ComponentStylesheetBundler {
26
+ constructor(projectBasePath, basePath, cssUrl, includePaths, sass, cacheDirectory, watch) {
27
+ // By default, browserslist defaults are too inclusive
28
+ // https://github.com/browserslist/browserslist/blob/83764ea81ffaa39111c204b02c371afa44a4ff07/index.js#L516-L522
29
+ // We change the default query to browsers that Angular support.
30
+ // https://angular.io/guide/browser-support
31
+ browserslist_1.default.defaults = [
32
+ 'last 2 Chrome versions',
33
+ 'last 1 Firefox version',
34
+ 'last 2 Edge major versions',
35
+ 'last 2 Safari major versions',
36
+ 'last 2 iOS major versions',
37
+ 'Firefox ESR',
38
+ ];
39
+ const browserslistData = (0, browserslist_1.default)(undefined, { path: basePath });
40
+ let searchDirs = generateSearchDirectories([projectBasePath]);
41
+ const postcssConfiguration = loadPostcssConfiguration(searchDirs);
42
+ // (nx-specific): we support loading the TailwindCSS config from the root of the workspace
43
+ searchDirs = generateSearchDirectories([projectBasePath, devkit_1.workspaceRoot]);
44
+ super({
45
+ cacheDirectory: cacheDirectory,
46
+ postcssConfiguration: postcssConfiguration,
47
+ tailwindConfiguration: postcssConfiguration
48
+ ? undefined
49
+ : getTailwindConfig(searchDirs, projectBasePath),
50
+ sass: sass,
51
+ workspaceRoot: projectBasePath,
52
+ cssUrl: cssUrl,
53
+ target: transformSupportedBrowsersToTargets(browserslistData),
54
+ includePaths: includePaths,
55
+ }, 'css', watch);
56
+ this.projectBasePath = projectBasePath;
57
+ this.basePath = basePath;
58
+ this.cssUrl = cssUrl;
59
+ this.includePaths = includePaths;
60
+ this.sass = sass;
61
+ this.cacheDirectory = cacheDirectory;
62
+ this.watch = watch;
63
+ }
64
+ destroy() {
65
+ void super.dispose();
66
+ }
67
+ }
68
+ return StylesheetProcessor;
69
+ }
70
+ function transformSupportedBrowsersToTargets(supportedBrowsers) {
71
+ const transformed = [];
72
+ // https://esbuild.github.io/api/#target
73
+ const esBuildSupportedBrowsers = new Set([
74
+ 'safari',
75
+ 'firefox',
76
+ 'edge',
77
+ 'chrome',
78
+ 'ios',
79
+ ]);
80
+ for (const browser of supportedBrowsers) {
81
+ let [browserName, version] = browser.split(' ');
82
+ // browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
83
+ if (browserName === 'ios_saf') {
84
+ browserName = 'ios';
85
+ }
86
+ // browserslist uses ranges `15.2-15.3` versions but only the lowest is required
87
+ // to perform minimum supported feature checks. esbuild also expects a single version.
88
+ [version] = version.split('-');
89
+ if (esBuildSupportedBrowsers.has(browserName)) {
90
+ if (browserName === 'safari' && version === 'tp') {
91
+ // esbuild only supports numeric versions so `TP` is converted to a high number (999) since
92
+ // a Technology Preview (TP) of Safari is assumed to support all currently known features.
93
+ version = '999';
94
+ }
95
+ transformed.push(browserName + version);
96
+ }
97
+ }
98
+ return transformed.length ? transformed : undefined;
99
+ }
@@ -13,7 +13,7 @@ async function addLintingGenerator(tree, options) {
13
13
  const tasks = [];
14
14
  const rootProject = options.projectRoot === '.' || options.projectRoot === '';
15
15
  const lintTask = await (0, eslint_1.lintProjectGenerator)(tree, {
16
- linter: eslint_1.Linter.EsLint,
16
+ linter: 'eslint',
17
17
  project: options.projectName,
18
18
  tsConfigPaths: [
19
19
  (0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.app.json'),
@@ -22,7 +22,7 @@ async function addLintingGenerator(tree, options) {
22
22
  setParserOptionsProject: options.setParserOptionsProject,
23
23
  skipFormat: true,
24
24
  rootProject: rootProject,
25
- addPlugin: false,
25
+ addPlugin: options.addPlugin ?? false,
26
26
  addExplicitTargets: true,
27
27
  skipPackageJson: options.skipPackageJson,
28
28
  });
@@ -61,21 +61,6 @@ async function addLintingGenerator(tree, options) {
61
61
  files: ['*.html'],
62
62
  rules: {},
63
63
  });
64
- if ((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)) {
65
- (0, eslint_file_1.addOverrideToLintConfig)(tree, '', {
66
- files: ['*.json'],
67
- parser: 'jsonc-eslint-parser',
68
- rules: {
69
- '@nx/dependency-checks': [
70
- 'error',
71
- {
72
- // With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
73
- ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'],
74
- },
75
- ],
76
- },
77
- });
78
- }
79
64
  }
80
65
  else {
81
66
  (0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
@@ -5,7 +5,7 @@ type EslintExtensionSchema = {
5
5
  prefix: string;
6
6
  };
7
7
  /**
8
- * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
8
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
9
9
  */
10
10
  export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
11
11
  overrides: ({
@@ -75,7 +75,7 @@ export declare const extendAngularEslintJson: (json: Linter.Config, options: Esl
75
75
  rules?: Partial<Linter.RulesRecord>;
76
76
  };
77
77
  /**
78
- * @deprecated Use {@link extendAngularEslintJson} instead
78
+ * @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
79
79
  */
80
80
  export declare function createEsLintConfiguration(tree: Tree, options: AddLintingGeneratorSchema): void;
81
81
  export {};
@@ -5,7 +5,7 @@ exports.createEsLintConfiguration = createEsLintConfiguration;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
7
7
  /**
8
- * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
8
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
9
9
  */
10
10
  const extendAngularEslintJson = (json, options) => {
11
11
  const overrides = [
@@ -53,7 +53,7 @@ const extendAngularEslintJson = (json, options) => {
53
53
  };
54
54
  exports.extendAngularEslintJson = extendAngularEslintJson;
55
55
  /**
56
- * @deprecated Use {@link extendAngularEslintJson} instead
56
+ * @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
57
57
  */
58
58
  function createEsLintConfiguration(tree, options) {
59
59
  const rootConfig = `${(0, devkit_1.offsetFromRoot)(options.projectRoot)}.eslintrc.json`;
@@ -6,4 +6,5 @@ export interface AddLintingGeneratorSchema {
6
6
  skipFormat?: boolean;
7
7
  skipPackageJson?: boolean;
8
8
  unitTestRunner?: string;
9
+ addPlugin?: boolean;
9
10
  }
@@ -1,5 +1,4 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
2
  import type { Schema } from './schema';
3
3
  export declare function applicationGenerator(tree: Tree, schema: Partial<Schema>): Promise<GeneratorCallback>;
4
- export declare function applicationGeneratorInternal(tree: Tree, schema: Partial<Schema>): Promise<GeneratorCallback>;
5
4
  export default applicationGenerator;
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationGenerator = applicationGenerator;
4
- exports.applicationGeneratorInternal = applicationGeneratorInternal;
5
4
  const devkit_1 = require("@nx/devkit");
5
+ const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
6
6
  const js_1 = require("@nx/js");
7
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
8
  const init_1 = require("../init/init");
9
+ const convert_to_rspack_1 = require("../convert-to-rspack/convert-to-rspack");
8
10
  const setup_ssr_1 = require("../setup-ssr/setup-ssr");
9
11
  const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
10
12
  const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
11
13
  const lib_1 = require("./lib");
12
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
13
14
  async function applicationGenerator(tree, schema) {
14
- return await applicationGeneratorInternal(tree, {
15
- projectNameAndRootFormat: 'derived',
16
- ...schema,
17
- });
18
- }
19
- async function applicationGeneratorInternal(tree, schema) {
20
- const options = await (0, lib_1.normalizeOptions)(tree, schema);
15
+ (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'application');
16
+ const isRspack = schema.bundler === 'rspack';
17
+ if (isRspack) {
18
+ schema.bundler = 'webpack';
19
+ }
20
+ const options = await (0, lib_1.normalizeOptions)(tree, schema, isRspack);
21
21
  const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
22
22
  await (0, js_1.initGenerator)(tree, {
23
23
  ...options,
@@ -28,6 +28,7 @@ async function applicationGeneratorInternal(tree, schema) {
28
28
  await (0, init_1.angularInitGenerator)(tree, {
29
29
  ...options,
30
30
  skipFormat: true,
31
+ addPlugin: options.addPlugin,
31
32
  });
32
33
  if (!options.skipPackageJson) {
33
34
  (0, ensure_angular_dependencies_1.ensureAngularDependencies)(tree);
@@ -66,7 +67,21 @@ async function applicationGeneratorInternal(tree, schema) {
66
67
  project: options.name,
67
68
  standalone: options.standalone,
68
69
  skipPackageJson: options.skipPackageJson,
70
+ serverRouting: options.serverRouting,
71
+ });
72
+ }
73
+ if (isRspack) {
74
+ await (0, convert_to_rspack_1.convertToRspack)(tree, {
75
+ project: options.name,
76
+ skipInstall: options.skipPackageJson,
77
+ skipFormat: true,
69
78
  });
79
+ if (options.ssr) {
80
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, './files/rspack-ssr'), options.appProjectSourceRoot, {
81
+ pathToDistFolder: (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(options.appProjectRoot), options.outputPath, 'browser'),
82
+ tmpl: '',
83
+ });
84
+ }
70
85
  }
71
86
  if (!options.skipFormat) {
72
87
  await (0, devkit_1.formatFiles)(tree);
@@ -1 +1,8 @@
1
- <% if(minimal) { %><h1>Welcome <%= appName %></h1><% } else { %><<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>><% } %> <% if(routing) { %><router-outlet></router-outlet><% } %>
1
+ <%_ if(minimal) { _%>
2
+ <h1>Welcome <%= appName %></h1>
3
+ <%_ } else { _%>
4
+ <<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>>
5
+ <%_ } _%>
6
+ <%_ if(routing) { _%>
7
+ <router-outlet></router-outlet>
8
+ <%_ } _%>
@@ -1,13 +1,12 @@
1
1
  import { Component<% if(viewEncapsulation) { %>, ViewEncapsulation<% } %> } from '@angular/core';
2
2
 
3
3
  @Component({
4
- selector: '<%= rootSelector %>',<% if(!inlineTemplate) { %>
4
+ selector: '<%= rootSelector %>',<% if (setStandaloneFalse) { %>
5
+ standalone: false,<% } if(!inlineTemplate) { %>
5
6
  templateUrl: './app.component.html',<% } else { %>
6
- template: `<% if(minimal) { %><h1>Welcome <%= appName %></h1><% } else { %><<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>><% } %> <% if(routing) { %><router-outlet></router-outlet><% } %>`,<% } %><% if (angularMajorVersion < 17) { if(!inlineStyle) { %>
7
- styleUrls: ['./app.component.<%= style %>'],<% } else { %>
8
- styles: [``],<% } %><% } else { if(!inlineStyle) { %>
7
+ template: `<% if(minimal) { %><h1>Welcome <%= appName %></h1><% } else { %><<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>><% } %> <% if(routing) { %><router-outlet></router-outlet><% } %>`,<% } %><% if(!inlineStyle) { %>
9
8
  styleUrl: './app.component.<%= style %>',<% } else { %>
10
- styles: ``,<% } %><% } %><% if(viewEncapsulation) { %>
9
+ styles: ``,<% } %><% if(viewEncapsulation) { %>
11
10
  encapsulation: ViewEncapsulation.<%= viewEncapsulation %>,<% } %>
12
11
  })
13
12
  export class AppComponent {<% if(!minimal) { %>
@@ -1,7 +1,8 @@
1
1
  import { Component, ViewEncapsulation } from '@angular/core';
2
2
 
3
3
  @Component({
4
- selector: '<%= nxWelcomeSelector %>',
4
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
5
+ standalone: false,<% } %>
5
6
  template: `
6
7
  <!--
7
8
  * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
 
4
4
  @Component({
5
- selector: '<%= nxWelcomeSelector %>',
6
- standalone: true,
5
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
6
+ standalone: true,<% } %>
7
7
  imports: [CommonModule],
8
8
  template: `
9
9
  <!--
@@ -1,7 +1,8 @@
1
1
  import { Component, ViewEncapsulation } from '@angular/core';
2
2
 
3
3
  @Component({
4
- selector: '<%= nxWelcomeSelector %>',
4
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
5
+ standalone: false,<% } %>
5
6
  template: `
6
7
  <!--
7
8
  * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
 
4
4
  @Component({
5
- selector: '<%= nxWelcomeSelector %>',
6
- standalone: true,
5
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
6
+ standalone: true,<% } %>
7
7
  imports: [CommonModule],
8
8
  template: `
9
9
  <!--
@@ -1,7 +1,8 @@
1
1
  import { Component, ViewEncapsulation } from '@angular/core';
2
2
 
3
3
  @Component({
4
- selector: '<%= nxWelcomeSelector %>',
4
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
5
+ standalone: false,<% } %>
5
6
  template: `
6
7
  <!--
7
8
  * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
 
4
4
  @Component({
5
- selector: '<%= nxWelcomeSelector %>',
6
- standalone: true,
5
+ selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
6
+ standalone: true,<% } %>
7
7
  imports: [CommonModule],
8
8
  template: `
9
9
  <!--