@nx/angular 24.0.0-pr.37405.acdaf31 → 24.0.0-rc.1

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 (280) hide show
  1. package/dist/executors.d.ts +0 -2
  2. package/dist/executors.js +0 -2
  3. package/dist/fesm2022/nx-angular.mjs +0 -4
  4. package/dist/generators.d.ts +0 -8
  5. package/dist/generators.js +0 -8
  6. package/dist/ready-check.d.ts +1 -0
  7. package/dist/ready-check.js +8 -0
  8. package/dist/src/executors/application/schema.json +1 -2
  9. package/dist/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.transform.js +9 -1
  10. package/dist/src/executors/unit-test/schema.json +6 -1
  11. package/dist/src/executors/unit-test/unit-test.impl.js +5 -0
  12. package/dist/src/executors/utilities/ng-packagr/stylesheet-processor.js +35 -10
  13. package/dist/src/generators/add-linting/add-linting.js +1 -3
  14. package/dist/src/generators/add-linting/schema.d.ts +0 -5
  15. package/dist/src/generators/add-linting/schema.json +0 -6
  16. package/dist/src/generators/application/application.js +1 -2
  17. package/dist/src/generators/application/lib/add-e2e.js +3 -8
  18. package/dist/src/generators/application/lib/add-linting.js +1 -3
  19. package/dist/src/generators/application/lib/add-serve-static-target.js +2 -0
  20. package/dist/src/generators/application/lib/add-unit-test-runner.js +0 -2
  21. package/dist/src/generators/application/lib/create-project.js +2 -0
  22. package/dist/src/generators/application/lib/normalize-options.d.ts +1 -1
  23. package/dist/src/generators/application/lib/normalize-options.js +1 -8
  24. package/dist/src/generators/application/schema.d.ts +0 -5
  25. package/dist/src/generators/application/schema.json +1 -7
  26. package/dist/src/generators/convert-to-rspack/convert-to-rspack.js +9 -4
  27. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +1 -2
  28. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +0 -63
  29. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.d.ts +2 -0
  30. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.js +32 -0
  31. package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +3 -15
  32. package/dist/src/generators/init/init.js +1 -2
  33. package/dist/src/generators/init/schema.d.ts +0 -2
  34. package/dist/src/generators/library/lib/normalized-schema.d.ts +0 -4
  35. package/dist/src/generators/library/library.js +3 -4
  36. package/dist/src/generators/library/schema.d.ts +0 -5
  37. package/dist/src/generators/library/schema.json +0 -6
  38. package/dist/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +12 -1
  39. package/dist/src/generators/ng-add/migrators/projects/app.migrator.d.ts +1 -0
  40. package/dist/src/generators/ng-add/migrators/projects/app.migrator.js +22 -0
  41. package/dist/src/generators/ng-add/migrators/projects/e2e.migrator.js +12 -16
  42. package/dist/src/generators/ng-add/utilities/workspace.js +1 -3
  43. package/dist/src/generators/setup-ssr/files/v20+/application-builder/server/__serverFileName__ +15 -1
  44. package/dist/src/generators/setup-ssr/lib/add-dependencies.js +4 -0
  45. package/dist/src/generators/setup-ssr/lib/update-project-config.js +1 -0
  46. package/dist/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
  47. package/dist/src/generators/utils/add-jest.d.ts +0 -1
  48. package/dist/src/generators/utils/add-jest.js +0 -2
  49. package/dist/src/generators/utils/add-vitest.d.ts +0 -1
  50. package/dist/src/generators/utils/add-vitest.js +0 -1
  51. package/dist/src/generators/utils/testing.d.ts +4 -4
  52. package/dist/src/generators/utils/testing.js +19 -12
  53. package/dist/src/migrations/update-23-1-0/add-angular-build.js +7 -3
  54. package/dist/src/migrations/update-23-1-0/add-angular-build.md +1 -1
  55. package/dist/src/migrations/update-23-1-0/add-trust-proxy-headers.js +9 -2
  56. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.d.ts +4 -0
  57. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.js +12 -0
  58. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.md +59 -0
  59. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.d.ts +2 -0
  60. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.js +85 -0
  61. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.md +48 -0
  62. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.d.ts +5 -0
  63. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.js +332 -0
  64. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.md +46 -0
  65. package/dist/src/plugins/plugin.js +3 -5
  66. package/dist/src/plugins/utils/dev-server-ready-check.d.ts +17 -0
  67. package/dist/src/plugins/utils/dev-server-ready-check.js +213 -0
  68. package/dist/src/utils/assert-cypress-component-testing-support.js +10 -0
  69. package/dist/src/utils/backward-compatible-versions.js +0 -8
  70. package/dist/src/utils/versions.d.ts +4 -8
  71. package/dist/src/utils/versions.js +5 -9
  72. package/dist/types/nx-angular.d.ts +1 -3
  73. package/executors.json +0 -10
  74. package/generators.json +0 -59
  75. package/migrations.json +109 -0
  76. package/package.json +13 -21
  77. package/dist/.npmignore +0 -2
  78. package/dist/fesm2022/nx-angular-mf.mjs +0 -193
  79. package/dist/fesm2022/nx-angular-mf.mjs.map +0 -1
  80. package/dist/fesm2022/nx-angular.mjs.map +0 -1
  81. package/dist/mf/package.json +0 -4
  82. package/dist/src/builders/utilities/module-federation.d.ts +0 -11
  83. package/dist/src/builders/utilities/module-federation.js +0 -109
  84. package/dist/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
  85. package/dist/src/executors/module-federation-dev-server/lib/index.js +0 -5
  86. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -2
  87. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -22
  88. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +0 -5
  89. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +0 -29
  90. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -4
  91. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -111
  92. package/dist/src/executors/module-federation-dev-server/schema.d.ts +0 -38
  93. package/dist/src/executors/module-federation-dev-server/schema.json +0 -171
  94. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -2
  95. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -20
  96. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +0 -5
  97. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.js +0 -30
  98. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -4
  99. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -110
  100. package/dist/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -17
  101. package/dist/src/executors/module-federation-ssr-dev-server/schema.json +0 -124
  102. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +0 -4
  103. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.js +0 -36
  104. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +0 -5
  105. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +0 -448
  106. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +0 -2
  107. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.js +0 -22
  108. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +0 -2
  109. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +0 -45
  110. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +0 -2
  111. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +0 -18
  112. package/dist/src/generators/convert-to-with-mf/lib/index.d.ts +0 -6
  113. package/dist/src/generators/convert-to-with-mf/lib/index.js +0 -9
  114. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +0 -5
  115. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +0 -57
  116. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +0 -2
  117. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +0 -13
  118. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +0 -3
  119. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +0 -50
  120. package/dist/src/generators/convert-to-with-mf/schema.d.ts +0 -4
  121. package/dist/src/generators/convert-to-with-mf/schema.json +0 -33
  122. package/dist/src/generators/federate-module/federate-module.d.ts +0 -4
  123. package/dist/src/generators/federate-module/federate-module.js +0 -49
  124. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.d.ts +0 -2
  125. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +0 -14
  126. package/dist/src/generators/federate-module/lib/add-path-to-exposes.d.ts +0 -8
  127. package/dist/src/generators/federate-module/lib/add-path-to-exposes.js +0 -77
  128. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.d.ts +0 -8
  129. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.js +0 -11
  130. package/dist/src/generators/federate-module/lib/add-remote.d.ts +0 -7
  131. package/dist/src/generators/federate-module/lib/add-remote.js +0 -42
  132. package/dist/src/generators/federate-module/lib/check-remote-exists.d.ts +0 -2
  133. package/dist/src/generators/federate-module/lib/check-remote-exists.js +0 -21
  134. package/dist/src/generators/federate-module/lib/index.d.ts +0 -4
  135. package/dist/src/generators/federate-module/lib/index.js +0 -7
  136. package/dist/src/generators/federate-module/schema.d.ts +0 -13
  137. package/dist/src/generators/federate-module/schema.json +0 -83
  138. package/dist/src/generators/host/files/common/src/main.server.ts__tmpl__ +0 -78
  139. package/dist/src/generators/host/files/js/webpack.server.config.js__tmpl__ +0 -8
  140. package/dist/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +0 -9
  141. package/dist/src/generators/host/host.d.ts +0 -4
  142. package/dist/src/generators/host/host.js +0 -133
  143. package/dist/src/generators/host/lib/index.d.ts +0 -2
  144. package/dist/src/generators/host/lib/index.js +0 -5
  145. package/dist/src/generators/host/lib/update-ssr-setup.d.ts +0 -3
  146. package/dist/src/generators/host/lib/update-ssr-setup.js +0 -54
  147. package/dist/src/generators/host/lib/validate-options.d.ts +0 -3
  148. package/dist/src/generators/host/lib/validate-options.js +0 -12
  149. package/dist/src/generators/host/schema.d.ts +0 -36
  150. package/dist/src/generators/host/schema.json +0 -195
  151. package/dist/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +0 -9
  152. package/dist/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +0 -9
  153. package/dist/src/generators/remote/files/common/src/main.server.ts__tmpl__ +0 -84
  154. package/dist/src/generators/remote/files/standalone/src/bootstrap.server.ts__tmpl__ +0 -12
  155. package/dist/src/generators/remote/lib/find-next-available-port.d.ts +0 -2
  156. package/dist/src/generators/remote/lib/find-next-available-port.js +0 -16
  157. package/dist/src/generators/remote/lib/index.d.ts +0 -3
  158. package/dist/src/generators/remote/lib/index.js +0 -6
  159. package/dist/src/generators/remote/lib/update-ssr-setup.d.ts +0 -9
  160. package/dist/src/generators/remote/lib/update-ssr-setup.js +0 -82
  161. package/dist/src/generators/remote/lib/validate-options.d.ts +0 -3
  162. package/dist/src/generators/remote/lib/validate-options.js +0 -12
  163. package/dist/src/generators/remote/remote.d.ts +0 -4
  164. package/dist/src/generators/remote/remote.js +0 -114
  165. package/dist/src/generators/remote/schema.d.ts +0 -34
  166. package/dist/src/generators/remote/schema.json +0 -184
  167. package/dist/src/generators/scam/lib/convert-component-to-scam.d.ts +0 -3
  168. package/dist/src/generators/scam/lib/convert-component-to-scam.js +0 -41
  169. package/dist/src/generators/scam/lib/index.d.ts +0 -2
  170. package/dist/src/generators/scam/lib/index.js +0 -5
  171. package/dist/src/generators/scam/lib/normalize-options.d.ts +0 -3
  172. package/dist/src/generators/scam/lib/normalize-options.js +0 -34
  173. package/dist/src/generators/scam/scam.d.ts +0 -7
  174. package/dist/src/generators/scam/scam.js +0 -28
  175. package/dist/src/generators/scam/schema.d.ts +0 -30
  176. package/dist/src/generators/scam/schema.json +0 -126
  177. package/dist/src/generators/scam-directive/lib/convert-directive-to-scam.d.ts +0 -3
  178. package/dist/src/generators/scam-directive/lib/convert-directive-to-scam.js +0 -41
  179. package/dist/src/generators/scam-directive/lib/index.d.ts +0 -2
  180. package/dist/src/generators/scam-directive/lib/index.js +0 -5
  181. package/dist/src/generators/scam-directive/lib/normalize-options.d.ts +0 -3
  182. package/dist/src/generators/scam-directive/lib/normalize-options.js +0 -34
  183. package/dist/src/generators/scam-directive/scam-directive.d.ts +0 -7
  184. package/dist/src/generators/scam-directive/scam-directive.js +0 -28
  185. package/dist/src/generators/scam-directive/schema.d.ts +0 -23
  186. package/dist/src/generators/scam-directive/schema.json +0 -89
  187. package/dist/src/generators/scam-pipe/lib/convert-pipe-to-scam.d.ts +0 -3
  188. package/dist/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +0 -41
  189. package/dist/src/generators/scam-pipe/lib/index.d.ts +0 -2
  190. package/dist/src/generators/scam-pipe/lib/index.js +0 -5
  191. package/dist/src/generators/scam-pipe/lib/normalize-options.d.ts +0 -3
  192. package/dist/src/generators/scam-pipe/lib/normalize-options.js +0 -36
  193. package/dist/src/generators/scam-pipe/scam-pipe.d.ts +0 -7
  194. package/dist/src/generators/scam-pipe/scam-pipe.js +0 -28
  195. package/dist/src/generators/scam-pipe/schema.d.ts +0 -21
  196. package/dist/src/generators/scam-pipe/schema.json +0 -67
  197. package/dist/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +0 -3
  198. package/dist/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +0 -35
  199. package/dist/src/generators/scam-to-standalone/lib/get-component-data-from-ast.d.ts +0 -6
  200. package/dist/src/generators/scam-to-standalone/lib/get-component-data-from-ast.js +0 -15
  201. package/dist/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.d.ts +0 -9
  202. package/dist/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.js +0 -51
  203. package/dist/src/generators/scam-to-standalone/lib/get-target-project.d.ts +0 -2
  204. package/dist/src/generators/scam-to-standalone/lib/get-target-project.js +0 -13
  205. package/dist/src/generators/scam-to-standalone/lib/index.d.ts +0 -8
  206. package/dist/src/generators/scam-to-standalone/lib/index.js +0 -11
  207. package/dist/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.d.ts +0 -2
  208. package/dist/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +0 -20
  209. package/dist/src/generators/scam-to-standalone/lib/selector-exists-in-ast.d.ts +0 -2
  210. package/dist/src/generators/scam-to-standalone/lib/selector-exists-in-ast.js +0 -7
  211. package/dist/src/generators/scam-to-standalone/lib/verify-is-inline-scam.d.ts +0 -2
  212. package/dist/src/generators/scam-to-standalone/lib/verify-is-inline-scam.js +0 -10
  213. package/dist/src/generators/scam-to-standalone/lib/verify-module-is-scam.d.ts +0 -1
  214. package/dist/src/generators/scam-to-standalone/lib/verify-module-is-scam.js +0 -11
  215. package/dist/src/generators/scam-to-standalone/scam-to-standalone.d.ts +0 -7
  216. package/dist/src/generators/scam-to-standalone/scam-to-standalone.js +0 -31
  217. package/dist/src/generators/scam-to-standalone/schema.d.ts +0 -5
  218. package/dist/src/generators/scam-to-standalone/schema.json +0 -32
  219. package/dist/src/generators/setup-mf/files/entry-module-files/__entryModuleFileName__.ts__tmpl__ +0 -18
  220. package/dist/src/generators/setup-mf/files/entry-module-files/entry.routes.ts__tmpl__ +0 -4
  221. package/dist/src/generators/setup-mf/files/entry-module-files/entry__componentFileSuffix__.ts__tmpl__ +0 -10
  222. package/dist/src/generators/setup-mf/files/host-files/__appFileName__.spec.ts__tmpl__ +0 -42
  223. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry.routes.ts__tmpl__ +0 -4
  224. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry__componentFileSuffix__.ts__tmpl__ +0 -11
  225. package/dist/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +0 -27
  226. package/dist/src/generators/setup-mf/files/ts-webpack/tsconfig.lint.json__tmpl__ +0 -12
  227. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +0 -9
  228. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +0 -21
  229. package/dist/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +0 -23
  230. package/dist/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +0 -9
  231. package/dist/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +0 -21
  232. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.d.ts +0 -3
  233. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.js +0 -52
  234. package/dist/src/generators/setup-mf/lib/add-remote-entry.d.ts +0 -3
  235. package/dist/src/generators/setup-mf/lib/add-remote-entry.js +0 -27
  236. package/dist/src/generators/setup-mf/lib/add-remote-to-host.d.ts +0 -9
  237. package/dist/src/generators/setup-mf/lib/add-remote-to-host.js +0 -127
  238. package/dist/src/generators/setup-mf/lib/change-build-target.d.ts +0 -3
  239. package/dist/src/generators/setup-mf/lib/change-build-target.js +0 -24
  240. package/dist/src/generators/setup-mf/lib/fix-bootstrap.d.ts +0 -3
  241. package/dist/src/generators/setup-mf/lib/fix-bootstrap.js +0 -40
  242. package/dist/src/generators/setup-mf/lib/generate-config.d.ts +0 -6
  243. package/dist/src/generators/setup-mf/lib/generate-config.js +0 -32
  244. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.d.ts +0 -6
  245. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.js +0 -20
  246. package/dist/src/generators/setup-mf/lib/index.d.ts +0 -15
  247. package/dist/src/generators/setup-mf/lib/index.js +0 -18
  248. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.d.ts +0 -2
  249. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.js +0 -15
  250. package/dist/src/generators/setup-mf/lib/normalize-options.d.ts +0 -3
  251. package/dist/src/generators/setup-mf/lib/normalize-options.js +0 -26
  252. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.d.ts +0 -3
  253. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +0 -61
  254. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.d.ts +0 -3
  255. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.js +0 -20
  256. package/dist/src/generators/setup-mf/lib/setup-serve-target.d.ts +0 -3
  257. package/dist/src/generators/setup-mf/lib/setup-serve-target.js +0 -39
  258. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.d.ts +0 -3
  259. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.js +0 -15
  260. package/dist/src/generators/setup-mf/lib/update-host-app-routes.d.ts +0 -3
  261. package/dist/src/generators/setup-mf/lib/update-host-app-routes.js +0 -39
  262. package/dist/src/generators/setup-mf/lib/update-tsconfig.d.ts +0 -3
  263. package/dist/src/generators/setup-mf/lib/update-tsconfig.js +0 -18
  264. package/dist/src/generators/setup-mf/schema.d.ts +0 -35
  265. package/dist/src/generators/setup-mf/schema.json +0 -99
  266. package/dist/src/generators/setup-mf/setup-mf.d.ts +0 -4
  267. package/dist/src/generators/setup-mf/setup-mf.js +0 -90
  268. package/dist/src/generators/utils/add-mf-env-to-inputs.d.ts +0 -2
  269. package/dist/src/generators/utils/add-mf-env-to-inputs.js +0 -36
  270. package/dist/src/generators/utils/assert-mf-utils.d.ts +0 -1
  271. package/dist/src/generators/utils/assert-mf-utils.js +0 -8
  272. package/dist/src/generators/utils/export-scam.d.ts +0 -11
  273. package/dist/src/generators/utils/export-scam.js +0 -35
  274. package/dist/src/utils/get-mf-projects.d.ts +0 -4
  275. package/dist/src/utils/get-mf-projects.js +0 -31
  276. package/dist/src/utils/module-federation-deprecation.d.ts +0 -4
  277. package/dist/src/utils/module-federation-deprecation.js +0 -29
  278. package/dist/types/nx-angular-mf.d.ts +0 -72
  279. package/dist/types/nx-angular-mf.d.ts.map +0 -1
  280. package/dist/types/nx-angular.d.ts.map +0 -1
@@ -1,99 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/schema",
3
- "$id": "GeneratorAngularMFSetup",
4
- "cli": "nx",
5
- "title": "Generate Module Federation Setup for Angular App",
6
- "description": "Create Module Federation configuration files for given Angular Application.",
7
- "type": "object",
8
- "properties": {
9
- "appName": {
10
- "type": "string",
11
- "description": "The name of the application to generate the Module Federation configuration for.",
12
- "$default": {
13
- "$source": "argv",
14
- "index": 0
15
- },
16
- "x-prompt": "What app would you like to generate a Module Federation configuration for?",
17
- "x-dropdown": "projects"
18
- },
19
- "mfType": {
20
- "type": "string",
21
- "enum": ["host", "remote"],
22
- "description": "Type of application to generate the Module Federation configuration for.",
23
- "default": "remote"
24
- },
25
- "federationType": {
26
- "type": "string",
27
- "enum": ["static", "dynamic"],
28
- "description": "Use either Static or Dynamic Module Federation pattern for the application.",
29
- "default": "static"
30
- },
31
- "port": {
32
- "type": "number",
33
- "description": "The port at which the remote application should be served."
34
- },
35
- "remotes": {
36
- "type": "array",
37
- "description": "A list of remote application names that the Consumer (host) application should consume.",
38
- "alias": "producers"
39
- },
40
- "host": {
41
- "type": "string",
42
- "description": "The name of the host application that the remote application will be consumed by.",
43
- "alias": "consumer"
44
- },
45
- "routing": {
46
- "type": "boolean",
47
- "description": "Generate a routing setup to allow a Consumer (host) application to route to the Producer (remote) application.",
48
- "x-priority": "important"
49
- },
50
- "skipFormat": {
51
- "type": "boolean",
52
- "description": "Skip formatting the workspace after the generator completes.",
53
- "x-priority": "internal"
54
- },
55
- "skipPackageJson": {
56
- "type": "boolean",
57
- "default": false,
58
- "description": "Do not add dependencies to `package.json`.",
59
- "x-priority": "internal"
60
- },
61
- "skipE2E": {
62
- "type": "boolean",
63
- "default": false,
64
- "description": "Do not set up E2E related config."
65
- },
66
- "e2eProjectName": {
67
- "type": "string",
68
- "description": "The project name of the associated E2E project for the application. This is only required for Cypress E2E projects that do not follow the naming convention `<appName>-e2e`."
69
- },
70
- "prefix": {
71
- "type": "string",
72
- "description": "The prefix to use for any generated component."
73
- },
74
- "standalone": {
75
- "type": "boolean",
76
- "description": "Whether the application is a standalone application.",
77
- "default": true
78
- },
79
- "typescriptConfiguration": {
80
- "type": "boolean",
81
- "description": "Whether the module federation configuration and webpack configuration files should use TS.",
82
- "default": true
83
- },
84
- "enableTypedLinting": {
85
- "type": "boolean",
86
- "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
87
- "default": false
88
- },
89
- "setParserOptionsProject": {
90
- "type": "boolean",
91
- "description": "Deprecated alias for `enableTypedLinting`.",
92
- "default": false,
93
- "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
94
- }
95
- },
96
- "required": ["appName", "mfType"],
97
- "additionalProperties": false,
98
- "examplesFile": "../../../docs/setup-mf-examples.md"
99
- }
@@ -1,4 +0,0 @@
1
- import { type GeneratorCallback, type Tree } from '@nx/devkit';
2
- import type { Schema } from './schema';
3
- export declare function setupMf(tree: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
4
- export default setupMf;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupMf = setupMf;
4
- const devkit_1 = require("@nx/devkit");
5
- const assert_supported_angular_version_1 = require("../../utils/assert-supported-angular-version");
6
- const versions_1 = require("../../utils/versions");
7
- const version_utils_1 = require("../utils/version-utils");
8
- const lib_1 = require("./lib");
9
- async function setupMf(tree, rawOptions) {
10
- (0, assert_supported_angular_version_1.assertSupportedAngularVersion)(tree);
11
- const options = (0, lib_1.normalizeOptions)(tree, rawOptions);
12
- const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.appName);
13
- const tasks = [];
14
- if (options.mfType === 'remote') {
15
- (0, lib_1.addRemoteToHost)(tree, {
16
- appName: options.appName,
17
- host: options.host,
18
- standalone: options.standalone,
19
- port: options.port,
20
- });
21
- (0, lib_1.addRemoteEntry)(tree, options, projectConfig.root);
22
- (0, lib_1.removeDeadCodeFromRemote)(tree, options);
23
- (0, lib_1.setupTspathForRemote)(tree, options);
24
- if (!options.skipPackageJson) {
25
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {
26
- '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion,
27
- }, {
28
- '@nx/web': versions_1.nxVersion,
29
- '@nx/webpack': versions_1.nxVersion,
30
- 'webpack-merge': versions_1.webpackMergeVersion,
31
- '@nx/module-federation': versions_1.nxVersion,
32
- }));
33
- }
34
- }
35
- const remotesWithPorts = (0, lib_1.getRemotesWithPorts)(tree, options);
36
- (0, lib_1.generateWebpackConfig)(tree, options, projectConfig.root, remotesWithPorts);
37
- (0, lib_1.changeBuildTarget)(tree, options);
38
- (0, lib_1.updateTsConfig)(tree, options);
39
- (0, lib_1.setupServeTarget)(tree, options);
40
- if (options.mfType === 'host') {
41
- (0, lib_1.setupHostIfDynamic)(tree, options);
42
- (0, lib_1.updateHostAppRoutes)(tree, options);
43
- for (const { remoteName, port } of remotesWithPorts) {
44
- (0, lib_1.addRemoteToHost)(tree, {
45
- appName: remoteName,
46
- host: options.appName,
47
- standalone: options.standalone,
48
- port,
49
- });
50
- }
51
- if (!options.skipPackageJson) {
52
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
53
- '@nx/webpack': versions_1.nxVersion,
54
- 'webpack-merge': versions_1.webpackMergeVersion,
55
- '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion,
56
- '@nx/module-federation': versions_1.nxVersion,
57
- }));
58
- }
59
- }
60
- (0, lib_1.fixBootstrap)(tree, projectConfig.root, options);
61
- if (options.mfType === 'host' || options.federationType === 'dynamic') {
62
- /**
63
- * Host applications and dynamic federation applications generate runtime
64
- * code that depends on the @nx/angular plugin. Ensure that the plugin is
65
- * in the production dependencies.
66
- */
67
- (0, lib_1.moveAngularPluginToDependencies)(tree);
68
- }
69
- if (!options.skipE2E) {
70
- (0, lib_1.addCypressOnErrorWorkaround)(tree, options);
71
- }
72
- if (!options.skipPackageJson && options.typescriptConfiguration) {
73
- // Angular custom-webpack loads webpack.config.ts at build time. Node native
74
- // TS strip can't resolve the extensionless `./module-federation.config`
75
- // import under strict ESM, so loadTsFile needs ts-node as the fallback.
76
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, { 'ts-node': versions_1.tsNodeVersion }, undefined, true));
77
- }
78
- if (!options.skipPackageJson) {
79
- const angularDevkitVersion = (0, version_utils_1.getInstalledAngularDevkitVersion)(tree) ??
80
- (0, version_utils_1.versions)(tree).angularDevkitVersion;
81
- // the executors used by MF require @angular-devkit/build-angular
82
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@angular-devkit/build-angular': angularDevkitVersion }, undefined, true));
83
- }
84
- // format files
85
- if (!options.skipFormat) {
86
- await (0, devkit_1.formatFiles)(tree);
87
- }
88
- return (0, devkit_1.runTasksInSerial)(...tasks);
89
- }
90
- exports.default = setupMf;
@@ -1,2 +0,0 @@
1
- import { type Tree } from '@nx/devkit';
2
- export declare function addMfEnvToTargetDefaultInputs(tree: Tree): void;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addMfEnvToTargetDefaultInputs = addMfEnvToTargetDefaultInputs;
4
- const devkit_1 = require("@nx/devkit");
5
- const internal_1 = require("@nx/devkit/internal");
6
- function addMfEnvToTargetDefaultInputs(tree) {
7
- const nxJson = (0, devkit_1.readNxJson)(tree) ?? {};
8
- const webpackExecutor = '@nx/angular:webpack-browser';
9
- const mfEnvVar = 'NX_MF_DEV_REMOTES';
10
- const defaultInputs = [
11
- ...(nxJson.namedInputs && 'production' in nxJson.namedInputs
12
- ? ['production', '^production']
13
- : ['default', '^default']),
14
- ];
15
- const existing = (0, internal_1.findTargetDefault)(nxJson.targetDefaults, {
16
- executor: webpackExecutor,
17
- });
18
- const inputs = [...(existing?.inputs ?? defaultInputs)];
19
- let mfEnvVarExists = false;
20
- for (const input of inputs) {
21
- if (typeof input === 'object' && input['env'] === mfEnvVar) {
22
- mfEnvVarExists = true;
23
- break;
24
- }
25
- }
26
- if (!mfEnvVarExists) {
27
- inputs.push({ env: mfEnvVar });
28
- }
29
- (0, internal_1.upsertTargetDefault)(tree, nxJson, {
30
- executor: webpackExecutor,
31
- cache: true,
32
- inputs,
33
- dependsOn: existing?.dependsOn ?? ['^build'],
34
- });
35
- (0, devkit_1.updateNxJson)(tree, nxJson);
36
- }
@@ -1 +0,0 @@
1
- export declare function assertRspackIsCSR(bundler: 'webpack' | 'rspack', ssr: boolean): void;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertRspackIsCSR = assertRspackIsCSR;
4
- function assertRspackIsCSR(bundler, ssr) {
5
- if (bundler === 'rspack' && ssr) {
6
- throw new Error('SSR is not currently supported for Angular Rspack Module Federation. Please use webpack instead.');
7
- }
8
- }
@@ -1,11 +0,0 @@
1
- import type { Tree } from '@nx/devkit';
2
- export type GenerationOptions = {
3
- directory: string;
4
- filePath: string;
5
- name: string;
6
- projectName: string;
7
- modulePath: string;
8
- export?: boolean;
9
- inlineScam?: boolean;
10
- };
11
- export declare function exportScam(tree: Tree, options: GenerationOptions): void;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exportScam = exportScam;
4
- const devkit_1 = require("@nx/devkit");
5
- const entry_point_1 = require("./entry-point");
6
- const path_1 = require("./path");
7
- function exportScam(tree, options) {
8
- if (!options.export) {
9
- return;
10
- }
11
- const { projectType, root, sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
12
- const projectSourceRoot = sourceRoot ?? (0, devkit_1.joinPathFragments)(root, 'src');
13
- if (projectType === 'application') {
14
- devkit_1.logger.warn('--export=true was ignored as the project the SCAM is being generated in is not a library.');
15
- return;
16
- }
17
- const entryPointPath = (0, entry_point_1.locateLibraryEntryPointFromDirectory)(tree, options.directory, root, projectSourceRoot);
18
- if (!entryPointPath) {
19
- // Let's not error, simply warn the user
20
- // It's not too much effort to manually do this
21
- // It would be more frustrating to have to find the correct path and re-run the command
22
- devkit_1.logger.warn(`Could not export SCAM. Unable to determine project's entry point. SCAM has still been created.`);
23
- return;
24
- }
25
- const relativePathFromEntryPoint = (0, path_1.getRelativeImportToFile)(entryPointPath, options.filePath);
26
- const entryPointContent = tree.read(entryPointPath, 'utf-8');
27
- let updatedEntryPointContent = (0, devkit_1.stripIndents) `${entryPointContent}
28
- export * from '${relativePathFromEntryPoint}';`;
29
- if (!options.inlineScam) {
30
- const relativePathFromModule = (0, path_1.getRelativeImportToFile)(entryPointPath, options.modulePath);
31
- updatedEntryPointContent = (0, devkit_1.stripIndents) `${updatedEntryPointContent}
32
- export * from '${relativePathFromModule}';`;
33
- }
34
- tree.write(entryPointPath, updatedEntryPointContent);
35
- }
@@ -1,4 +0,0 @@
1
- import type { Tree } from '@nx/devkit';
2
- export declare function getMFProjects(tree: Tree, { legacy }?: {
3
- legacy: boolean;
4
- }): string[];
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMFProjects = getMFProjects;
4
- const internal_1 = require("@nx/devkit/internal");
5
- function _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, projects) {
6
- return (opts, projectName) => {
7
- const webpackPath = opts[CUSTOM_WEBPACK_OPTION]?.path;
8
- if (!webpackPath || !tree.exists(webpackPath)) {
9
- return;
10
- }
11
- const webpackConfig = tree.read(webpackPath, 'utf-8');
12
- const { ast, query } = require('@phenomnomnominal/tsquery');
13
- const sourceFile = ast(webpackConfig);
14
- const moduleFederationWebpackConfig = query(sourceFile, MODULE_FEDERATION_IDENTIFIER);
15
- if (!moduleFederationWebpackConfig ||
16
- moduleFederationWebpackConfig.length === 0) {
17
- return;
18
- }
19
- projects.push(projectName);
20
- };
21
- }
22
- function getMFProjects(tree, { legacy } = { legacy: false }) {
23
- const CUSTOM_WEBPACK_OPTION = 'customWebpackConfig';
24
- const MODULE_FEDERATION_IDENTIFIER = legacy
25
- ? 'Identifier[name=ModuleFederationPlugin]'
26
- : 'Identifier[name=withModuleFederation]';
27
- const projects = [];
28
- (0, internal_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, projects));
29
- (0, internal_1.forEachExecutorOptions)(tree, '@nrwl/angular:webpack-browser', _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, projects));
30
- return projects;
31
- }
@@ -1,4 +0,0 @@
1
- export declare const ANGULAR_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/angular:module-federation-dev-server` executor is deprecated and will be removed in Nx v24. Angular Module Federation in Nx is no longer supported. Use `@angular-architects/native-federation` (https://www.npmjs.com/package/@angular-architects/native-federation) for the supported Angular path. See https://nx.dev/docs/technologies/module-federation/consumer-and-provider for the v23 migration guide.";
2
- export declare const ANGULAR_MF_DEV_SSR_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/angular:module-federation-dev-ssr` executor is deprecated and will be removed in Nx v24. Angular Module Federation in Nx is no longer supported. Use `@angular-architects/native-federation` (https://www.npmjs.com/package/@angular-architects/native-federation) for the supported Angular path. See https://nx.dev/docs/technologies/module-federation/consumer-and-provider for the v23 migration guide.";
3
- export declare function warnAngularMfDevServerExecutorDeprecation(): void;
4
- export declare function warnAngularMfDevSsrExecutorDeprecation(): void;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ANGULAR_MF_DEV_SSR_EXECUTOR_DEPRECATION_MESSAGE = exports.ANGULAR_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = void 0;
4
- exports.warnAngularMfDevServerExecutorDeprecation = warnAngularMfDevServerExecutorDeprecation;
5
- exports.warnAngularMfDevSsrExecutorDeprecation = warnAngularMfDevSsrExecutorDeprecation;
6
- const devkit_1 = require("@nx/devkit");
7
- // TODO(v24): Remove all Angular Module Federation surfaces from @nx/angular.
8
- // Angular Native Federation (@angular-architects/native-federation) is the
9
- // supported Angular MF path going forward; the new @nx/module-federation
10
- // generators are React-only.
11
- const MIGRATION_URL = 'https://nx.dev/docs/technologies/module-federation/consumer-and-provider';
12
- const ANGULAR_NATIVE_FED_URL = 'https://www.npmjs.com/package/@angular-architects/native-federation';
13
- const ANGULAR_MF_TRAILER = `Angular Module Federation in Nx is no longer supported. Use \`@angular-architects/native-federation\` (${ANGULAR_NATIVE_FED_URL}) for the supported Angular path. See ${MIGRATION_URL} for the v23 migration guide.`;
14
- exports.ANGULAR_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = `The \`@nx/angular:module-federation-dev-server\` executor is deprecated and will be removed in Nx v24. ${ANGULAR_MF_TRAILER}`;
15
- exports.ANGULAR_MF_DEV_SSR_EXECUTOR_DEPRECATION_MESSAGE = `The \`@nx/angular:module-federation-dev-ssr\` executor is deprecated and will be removed in Nx v24. ${ANGULAR_MF_TRAILER}`;
16
- // Executor warnings fire once per process to avoid flooding dev-server loops.
17
- const executorWarned = new Set();
18
- function warnOnce(key, message) {
19
- if (executorWarned.has(key))
20
- return;
21
- executorWarned.add(key);
22
- devkit_1.logger.warn(message);
23
- }
24
- function warnAngularMfDevServerExecutorDeprecation() {
25
- warnOnce('angular-mf-dev-server', exports.ANGULAR_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
26
- }
27
- function warnAngularMfDevSsrExecutorDeprecation() {
28
- warnOnce('angular-mf-dev-ssr', exports.ANGULAR_MF_DEV_SSR_EXECUTOR_DEPRECATION_MESSAGE);
29
- }
@@ -1,72 +0,0 @@
1
- type ResolveRemoteUrlFunction = (remoteName: string) => string | Promise<string>;
2
- /**
3
- * @deprecated Use Runtime Helpers from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
4
- */
5
- declare function setRemoteUrlResolver(_resolveRemoteUrl: ResolveRemoteUrlFunction): void;
6
- /**
7
- * @deprecated Use init() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
8
- * If you have a remote app called `my-remote-app` and you want to use the `http://localhost:4201/mf-manifest.json` as the remote url, you should change it from:
9
- * ```ts
10
- * import { setRemoteDefinitions } from '@nx/angular/mf';
11
- *
12
- * setRemoteDefinitions({
13
- * 'my-remote-app': 'http://localhost:4201/mf-manifest.json'
14
- * });
15
- * ```
16
- * to use init():
17
- * ```ts
18
- * import { init } from '@module-federation/enhanced/runtime';
19
- *
20
- * init({
21
- * name: 'host',
22
- * remotes: [{
23
- * name: 'my-remote-app',
24
- * entry: 'http://localhost:4201/mf-manifest.json'
25
- * }]
26
- * });
27
- * ```
28
- */
29
- declare function setRemoteDefinitions(definitions: Record<string, string>): void;
30
- /**
31
- * @deprecated Use registerRemotes() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
32
- * If you set a remote app with `setRemoteDefinition` such as:
33
- * ```ts
34
- * import { setRemoteDefinition } from '@nx/angular/mf';
35
- *
36
- * setRemoteDefinition(
37
- * 'my-remote-app',
38
- * 'http://localhost:4201/mf-manifest.json'
39
- * );
40
- * ```
41
- * change it to use registerRemotes():
42
- * ```ts
43
- * import { registerRemotes } from '@module-federation/enhanced/runtime';
44
- *
45
- * registerRemotes([
46
- * {
47
- * name: 'my-remote-app',
48
- * entry: 'http://localhost:4201/mf-manifest.json'
49
- * }
50
- * ]);
51
- * ```
52
- */
53
- declare function setRemoteDefinition(remoteName: string, remoteUrl: string): void;
54
- /**
55
- * @deprecated Use loadRemote() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
56
- * If you set a load a remote with `loadRemoteModule` such as:
57
- * ```ts
58
- * import { loadRemoteModule } from '@nx/angular/mf';
59
- *
60
- * loadRemoteModule('my-remote-app', './Module').then(m => m.RemoteEntryModule);
61
- * ```
62
- * change it to use loadRemote():
63
- * ```ts
64
- * import { loadRemote } from '@module-federation/enhanced/runtime';
65
- *
66
- * loadRemote<typeof import('my-remote-app/Module')>('my-remote-app/Module').then(m => m.RemoteEntryModule);
67
- * ```
68
- */
69
- declare function loadRemoteModule(remoteName: string, moduleName: string): Promise<any>;
70
-
71
- export { loadRemoteModule, setRemoteDefinition, setRemoteDefinitions, setRemoteUrlResolver };
72
- //# sourceMappingURL=nx-angular-mf.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nx-angular-mf.d.ts","sources":["../../mf/mf.ts"],"mappings":"AAEM,KAAM,wBAAwB,oCAEtB,OAAO;AAOrB;;AAEG;AACH,iBAAgB,oBAAoB,oBACf,wBAAwB;AAO7C;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACH,iBAAgB,oBAAoB,cAAc,MAAM;AAIxD;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACH,iBAAgB,mBAAmB;AAQnC;;;;;;;;;;;;;;AAcG;AACH,iBAAsB,gBAAgB,0CAAuC,OAAA;;;;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"nx-angular.d.ts","sources":[],"mappings":"","names":[]}