@nx/angular 23.0.0-beta.5 → 23.0.0-beta.7

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 (55) hide show
  1. package/package.json +9 -9
  2. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +1 -1
  3. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +4 -5
  4. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +4 -5
  5. package/src/executors/package/package.impl.js +2 -2
  6. package/src/generators/add-linting/add-linting.d.ts.map +1 -1
  7. package/src/generators/add-linting/add-linting.js +5 -5
  8. package/src/generators/application/application.d.ts.map +1 -1
  9. package/src/generators/application/application.js +2 -2
  10. package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
  11. package/src/generators/application/lib/add-e2e.js +1 -1
  12. package/src/generators/application/lib/create-project.d.ts.map +1 -1
  13. package/src/generators/application/lib/create-project.js +3 -3
  14. package/src/generators/application/lib/normalize-options.js +3 -3
  15. package/src/generators/component/lib/normalize-options.js +2 -2
  16. package/src/generators/convert-to-rspack/convert-to-rspack.d.ts.map +1 -1
  17. package/src/generators/convert-to-rspack/convert-to-rspack.js +3 -4
  18. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +2 -2
  19. package/src/generators/directive/lib/normalize-options.js +2 -2
  20. package/src/generators/federate-module/lib/add-remote.js +2 -2
  21. package/src/generators/host/host.d.ts.map +1 -1
  22. package/src/generators/host/host.js +8 -7
  23. package/src/generators/host/schema.d.ts +1 -0
  24. package/src/generators/host/schema.json +4 -0
  25. package/src/generators/init/init.d.ts.map +1 -1
  26. package/src/generators/init/init.js +2 -2
  27. package/src/generators/library/lib/add-project.js +2 -2
  28. package/src/generators/library/lib/normalize-options.js +3 -3
  29. package/src/generators/library/library.d.ts.map +1 -1
  30. package/src/generators/library/library.js +2 -2
  31. package/src/generators/ngrx/lib/normalize-options.js +5 -5
  32. package/src/generators/ngrx-feature-store/lib/normalize-options.js +5 -5
  33. package/src/generators/ngrx-root-store/lib/normalize-options.js +3 -3
  34. package/src/generators/pipe/lib/normalize-options.js +2 -2
  35. package/src/generators/remote/remote.d.ts.map +1 -1
  36. package/src/generators/remote/remote.js +3 -3
  37. package/src/generators/scam/lib/normalize-options.js +2 -2
  38. package/src/generators/scam-directive/lib/normalize-options.js +2 -2
  39. package/src/generators/scam-pipe/lib/normalize-options.js +2 -2
  40. package/src/generators/setup-mf/lib/change-build-target.d.ts.map +1 -1
  41. package/src/generators/setup-mf/lib/change-build-target.js +2 -2
  42. package/src/generators/setup-ssr/lib/normalize-options.d.ts.map +1 -1
  43. package/src/generators/setup-ssr/lib/normalize-options.js +2 -2
  44. package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts.map +1 -1
  45. package/src/migrations/update-17-1-0/browser-target-to-build-target.js +2 -2
  46. package/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js +2 -2
  47. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
  48. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
  49. package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts.map +1 -1
  50. package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +2 -2
  51. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
  52. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
  53. package/src/plugins/plugin.d.ts.map +1 -1
  54. package/src/plugins/plugin.js +14 -17
  55. package/src/utils/get-mf-projects.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "23.0.0-beta.5",
3
+ "version": "23.0.0-beta.7",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -61,14 +61,14 @@
61
61
  "migrations": "./migrations.json"
62
62
  },
63
63
  "dependencies": {
64
- "@nx/devkit": "23.0.0-beta.5",
65
- "@nx/eslint": "23.0.0-beta.5",
66
- "@nx/js": "23.0.0-beta.5",
67
- "@nx/module-federation": "23.0.0-beta.5",
68
- "@nx/rspack": "23.0.0-beta.5",
69
- "@nx/web": "23.0.0-beta.5",
70
- "@nx/webpack": "23.0.0-beta.5",
71
- "@phenomnomnominal/tsquery": "~6.1.4",
64
+ "@nx/devkit": "23.0.0-beta.7",
65
+ "@nx/eslint": "23.0.0-beta.7",
66
+ "@nx/js": "23.0.0-beta.7",
67
+ "@nx/module-federation": "23.0.0-beta.7",
68
+ "@nx/rspack": "23.0.0-beta.7",
69
+ "@nx/web": "23.0.0-beta.7",
70
+ "@nx/webpack": "23.0.0-beta.7",
71
+ "@phenomnomnominal/tsquery": "~6.2.0",
72
72
  "@typescript-eslint/type-utils": "^8.0.0",
73
73
  "enquirer": "~2.3.6",
74
74
  "magic-string": "~0.30.2",
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAwCvC,wBAAuB,iCAAiC,CACtD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,iCAgIzB;AAED,eAAe,iCAAiC,CAAC"}
1
+ {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAkCvC,wBAAuB,iCAAiC,CACtD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,iCAgIzB;AAED,eAAe,iCAAiC,CAAC"}
@@ -2,10 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.moduleFederationDevServerExecutor = moduleFederationDevServerExecutor;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const lib_1 = require("./lib");
7
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
8
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
9
8
  const utils_1 = require("@nx/module-federation/src/executors/utils");
10
9
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
11
10
  const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
@@ -46,7 +45,7 @@ async function* moduleFederationDevServerExecutor(schema, context) {
46
45
  cors: true,
47
46
  cacheSeconds: -1,
48
47
  }, context)
49
- : (0, rxjs_for_await_1.eachValueFrom)((0, dev_server_impl_1.executeDevServerBuilder)(options, await (0, ngcli_adapter_1.createBuilderContext)({
48
+ : (0, internal_1.eachValueFrom)((0, dev_server_impl_1.executeDevServerBuilder)(options, await (0, ngcli_adapter_1.createBuilderContext)({
50
49
  builderName: '@nx/angular:webpack-browser',
51
50
  description: 'Build a browser application',
52
51
  optionSchema: require('../../builders/webpack-browser/schema.json'),
@@ -70,11 +69,11 @@ async function* moduleFederationDevServerExecutor(schema, context) {
70
69
  }
71
70
  (0, module_federation_1.validateDevRemotes)(options, workspaceProjects);
72
71
  const { remotes, staticRemotesIter, devRemoteIters } = await (0, utils_1.startRemoteIterators)(options, context, lib_1.startRemotes, pathToManifestFile, 'angular');
73
- const removeBaseUrlEmission = (iter) => (0, async_iterable_1.mapAsyncIterable)(iter, (v) => ({
72
+ const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
74
73
  ...v,
75
74
  baseUrl: undefined,
76
75
  }));
77
- return yield* (0, async_iterable_1.combineAsyncIterables)(removeBaseUrlEmission(currIter), ...devRemoteIters.map(removeBaseUrlEmission), ...(staticRemotesIter ? [removeBaseUrlEmission(staticRemotesIter)] : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
76
+ return yield* (0, internal_1.combineAsyncIterables)(removeBaseUrlEmission(currIter), ...devRemoteIters.map(removeBaseUrlEmission), ...(staticRemotesIter ? [removeBaseUrlEmission(staticRemotesIter)] : []), (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
78
77
  if (!options.isInitialHost) {
79
78
  done();
80
79
  return;
@@ -35,8 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.moduleFederationSsrDevServerExecutor = moduleFederationSsrDevServerExecutor;
37
37
  const devkit_1 = require("@nx/devkit");
38
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
39
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
38
+ const internal_1 = require("@nx/devkit/internal");
40
39
  const utils_1 = require("@nx/module-federation/src/executors/utils");
41
40
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
42
41
  const fs_1 = require("fs");
@@ -67,7 +66,7 @@ async function* moduleFederationSsrDevServerExecutor(schema, context) {
67
66
  const options = (0, normalize_options_1.normalizeOptions)(schema);
68
67
  (0, builder_package_1.assertBuilderPackageIsInstalled)('@angular-devkit/build-angular');
69
68
  const { executeSSRDevServerBuilder } = await Promise.resolve().then(() => __importStar(require('@angular-devkit/build-angular')));
70
- const currIter = (0, rxjs_for_await_1.eachValueFrom)(executeSSRDevServerBuilder(options, await (0, ngcli_adapter_1.createBuilderContext)({
69
+ const currIter = (0, internal_1.eachValueFrom)(executeSSRDevServerBuilder(options, await (0, ngcli_adapter_1.createBuilderContext)({
71
70
  builderName: '@nx/angular:webpack-server',
72
71
  description: 'Build a ssr application',
73
72
  optionSchema: require('../../builders/webpack-server/schema.json'),
@@ -93,11 +92,11 @@ async function* moduleFederationSsrDevServerExecutor(schema, context) {
93
92
  }
94
93
  (0, module_federation_1.validateDevRemotes)({ devRemotes: options.devRemotes }, workspaceProjects);
95
94
  const { remotes, staticRemotesIter, devRemoteIters } = await (0, utils_1.startRemoteIterators)(options, context, start_dev_remotes_1.startRemotes, pathToManifestFile, 'angular', true);
96
- const removeBaseUrlEmission = (iter) => (0, async_iterable_1.mapAsyncIterable)(iter, (v) => ({
95
+ const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
97
96
  ...v,
98
97
  baseUrl: undefined,
99
98
  }));
100
- const combined = (0, async_iterable_1.combineAsyncIterables)(removeBaseUrlEmission(staticRemotesIter), ...(devRemoteIters ? devRemoteIters.map(removeBaseUrlEmission) : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
99
+ const combined = (0, internal_1.combineAsyncIterables)(removeBaseUrlEmission(staticRemotesIter), ...(devRemoteIters ? devRemoteIters.map(removeBaseUrlEmission) : []), (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
101
100
  if (!options.isInitialHost) {
102
101
  done();
103
102
  return;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageExecutor = void 0;
4
4
  exports.createLibraryExecutor = createLibraryExecutor;
5
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  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");
@@ -29,7 +29,7 @@ function createLibraryExecutor(initializeNgPackagr) {
29
29
  options.project ??= (0, path_1.join)(context.projectsConfigurations.projects[context.projectName].root, 'ng-package.json');
30
30
  const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
31
31
  if (options.watch) {
32
- 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 })));
32
+ return yield* (0, internal_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
33
33
  }
34
34
  return (0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies))
35
35
  .pipe((0, operators_1.switchMap)((packagr) => packagr.build()), (0, operators_1.mapTo)({ success: true }))
@@ -1 +1 @@
1
- {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/add-linting/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAgBpB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAG1D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,iBAAiB,CAAC,CA6I5B;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/add-linting/add-linting.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAepB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAG1D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,iBAAiB,CAAC,CA6I5B;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLintingGenerator = addLintingGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
6
6
  const eslint_1 = require("@nx/eslint");
7
7
  const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
8
8
  const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
@@ -43,7 +43,7 @@ async function addLintingGenerator(tree, options) {
43
43
  'error',
44
44
  {
45
45
  type: 'attribute',
46
- prefix: (0, string_utils_1.camelize)(options.prefix),
46
+ prefix: (0, internal_1.camelize)(options.prefix),
47
47
  style: 'camelCase',
48
48
  },
49
49
  ],
@@ -51,7 +51,7 @@ async function addLintingGenerator(tree, options) {
51
51
  'error',
52
52
  {
53
53
  type: 'element',
54
- prefix: (0, string_utils_1.dasherize)(options.prefix),
54
+ prefix: (0, internal_1.dasherize)(options.prefix),
55
55
  style: 'kebab-case',
56
56
  },
57
57
  ],
@@ -83,7 +83,7 @@ async function addLintingGenerator(tree, options) {
83
83
  'error',
84
84
  {
85
85
  type: 'attribute',
86
- prefix: (0, string_utils_1.camelize)(options.prefix),
86
+ prefix: (0, internal_1.camelize)(options.prefix),
87
87
  style: 'camelCase',
88
88
  },
89
89
  ],
@@ -91,7 +91,7 @@ async function addLintingGenerator(tree, options) {
91
91
  'error',
92
92
  {
93
93
  type: 'element',
94
- prefix: (0, string_utils_1.dasherize)(options.prefix),
94
+ prefix: (0, internal_1.dasherize)(options.prefix),
95
95
  style: 'kebab-case',
96
96
  },
97
97
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAEL,MAAM,YAAY,CAAC;AA0BpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CA8H5B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAyBpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CA8H5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationGenerator = applicationGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  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
7
  const convert_to_rspack_1 = require("../convert-to-rspack/convert-to-rspack");
8
8
  const init_1 = require("../init/init");
@@ -105,7 +105,7 @@ async function applicationGenerator(tree, schema) {
105
105
  }
106
106
  return () => {
107
107
  (0, devkit_1.installPackagesTask)(tree);
108
- (0, log_show_project_command_1.logShowProjectCommand)(options.name);
108
+ (0, internal_1.logShowProjectCommand)(options.name);
109
109
  };
110
110
  }
111
111
  exports.default = applicationGenerator;
@@ -1 +1 @@
1
- {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,mBAsEjE"}
1
+ {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAUlC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,mBAsEjE"}
@@ -74,7 +74,7 @@ function getAngularE2EWebServerInfo(tree, projectName, portOverride) {
74
74
  }
75
75
  const pm = (0, devkit_1.getPackageManagerCommand)();
76
76
  return {
77
- e2eCiBaseUrl: 'http://localhost:4200',
77
+ e2eCiBaseUrl: `http://localhost:${e2ePort}`,
78
78
  e2eCiWebServerCommand: `${pm.exec} nx run ${projectName}:serve-static`,
79
79
  e2eWebServerCommand: `${pm.exec} nx run ${projectName}:serve`,
80
80
  e2eWebServerAddress: `http://localhost:${e2ePort}`,
@@ -1 +1 @@
1
- {"version":3,"file":"create-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/create-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAUlE"}
1
+ {"version":3,"file":"create-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/create-project.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAUlE"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createProject = createProject;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
6
6
  const version_utils_1 = require("../../utils/version-utils");
7
7
  function createProject(tree, options) {
8
8
  let project;
@@ -19,7 +19,7 @@ function createProjectForEsbuild(tree, options) {
19
19
  const buildExecutor = angularMajorVersion >= 20
20
20
  ? '@angular/build:application'
21
21
  : '@angular-devkit/build-angular:application';
22
- (0, target_defaults_utils_1.addBuildTargetDefaults)(tree, buildExecutor);
22
+ (0, internal_1.addBuildTargetDefaults)(tree, buildExecutor);
23
23
  let budgets = undefined;
24
24
  if (options.strict) {
25
25
  budgets = [
@@ -115,7 +115,7 @@ function createProjectForEsbuild(tree, options) {
115
115
  }
116
116
  function createProjectForWebpack(tree, options) {
117
117
  const buildExecutor = '@angular-devkit/build-angular:browser';
118
- (0, target_defaults_utils_1.addBuildTargetDefaults)(tree, buildExecutor);
118
+ (0, internal_1.addBuildTargetDefaults)(tree, buildExecutor);
119
119
  let budgets = undefined;
120
120
  if (options.strict) {
121
121
  budgets = [
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const test_runners_1 = require("../../../utils/test-runners");
7
7
  const version_utils_1 = require("../../utils/version-utils");
8
8
  function arePluginsExplicitlyDisabled(host) {
@@ -17,8 +17,8 @@ function validateBundler(bundler) {
17
17
  throw new Error(`Invalid bundler: ${bundler}. Please use one of the following: 'esbuild', 'webpack', 'rspack'.`);
18
18
  }
19
19
  async function normalizeOptions(host, options, isRspack) {
20
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
21
- const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
20
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
21
+ const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
22
22
  name: options.name,
23
23
  projectType: 'application',
24
24
  directory: options.directory,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const selector_1 = require("../../utils/selector");
7
7
  const validations_1 = require("../../utils/validations");
8
8
  const version_utils_1 = require("../../utils/version-utils");
@@ -11,7 +11,7 @@ async function normalizeOptions(tree, options) {
11
11
  if (angularMajorVersion < 20) {
12
12
  options.type ??= 'component';
13
13
  }
14
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
14
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
15
15
  name: options.name,
16
16
  path: options.path,
17
17
  suffix: options.type,
@@ -1 +1 @@
1
- {"version":3,"file":"convert-to-rspack.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAapB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA6StD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,qBAAqB,8BAiZ9B;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"convert-to-rspack.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts"],"names":[],"mappings":"AACA,OAAO,EAcL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAWpB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA6StD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,qBAAqB,8BAiZ9B;AAED,eAAe,eAAe,CAAC"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToRspack = convertToRspack;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
7
6
  const enquirer_1 = require("enquirer");
8
7
  const path_1 = require("path");
9
8
  const posix_1 = require("path/posix");
@@ -222,7 +221,7 @@ function handleDevServerTargetOptions(tree, options, newConfigurationOptions, ro
222
221
  async function getProjectToConvert(tree) {
223
222
  const projects = new Set();
224
223
  for (const executor of SUPPORTED_EXECUTORS) {
225
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, executor, (_, project) => {
224
+ (0, internal_1.forEachExecutorOptions)(tree, executor, (_, project) => {
226
225
  projects.add(project);
227
226
  });
228
227
  }
@@ -363,7 +362,7 @@ async function convertToRspack(tree, schema) {
363
362
  // check whether the existing inputs would match the inferred task
364
363
  // inputs with the exception of the @rspack/cli external dependency
365
364
  // which webpack tasks wouldn't have
366
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(project.root, {
365
+ const namedInputs = (0, internal_1.getNamedInputs)(project.root, {
367
366
  nxJsonConfiguration: nxJson,
368
367
  workspaceRoot: devkit_1.workspaceRoot,
369
368
  });
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCustomWebpackConfig = getCustomWebpackConfig;
4
4
  exports.convertWebpackConfigToUseNxModuleFederationPlugin = convertWebpackConfigToUseNxModuleFederationPlugin;
5
5
  const devkit_1 = require("@nx/devkit");
6
- const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
6
+ const internal_1 = require("@nx/devkit/internal");
7
7
  const path_1 = require("path");
8
8
  const tsquery_1 = require("@phenomnomnominal/tsquery");
9
9
  const FILE_EXTENSION_REGEX = /\.[^.]+$/;
@@ -17,7 +17,7 @@ async function getCustomWebpackConfig(tree, projectRoot, pathToCustomWebpackConf
17
17
  normalizedPathToCustomWebpackConfig: `./${(0, path_1.relative)(projectRoot, pathToCustomWebpackConfig).replace(FILE_EXTENSION_REGEX, '')}`,
18
18
  };
19
19
  }
20
- const configFile = await (0, config_utils_1.loadConfigFile)((0, path_1.join)(tree.root, pathToCustomWebpackConfig));
20
+ const configFile = await (0, internal_1.loadConfigFile)((0, path_1.join)(tree.root, pathToCustomWebpackConfig));
21
21
  const webpackConfig = 'default' in configFile ? configFile.default : configFile;
22
22
  return {
23
23
  isWebpackConfigFunction: typeof webpackConfig === 'function',
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const selector_1 = require("../../utils/selector");
7
7
  const validations_1 = require("../../utils/validations");
8
8
  const version_utils_1 = require("../../utils/version-utils");
@@ -11,7 +11,7 @@ async function normalizeOptions(tree, options) {
11
11
  if (angularMajorVersion < 20) {
12
12
  options.type ??= 'directive';
13
13
  }
14
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
14
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
15
15
  name: options.name,
16
16
  path: options.path,
17
17
  suffix: options.type,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addRemote = addRemote;
4
4
  const tslib_1 = require("tslib");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const test_runners_1 = require("../../../utils/test-runners");
7
7
  const remote_1 = tslib_1.__importDefault(require("../../remote/remote"));
8
8
  const check_remote_exists_1 = require("./check-remote-exists");
@@ -21,7 +21,7 @@ async function addRemote(tree, schema) {
21
21
  skipFormat: true,
22
22
  });
23
23
  tasks.push(remoteGeneratorCallback);
24
- const { projectName, projectRoot: remoteRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
24
+ const { projectName, projectRoot: remoteRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
25
25
  name: schema.remote,
26
26
  directory: schema.remoteDirectory,
27
27
  projectType: 'application',
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/host/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAgBpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAgIpD;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/host/host.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAkIpD;AAED,eAAe,IAAI,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.host = host;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
7
7
  const js_1 = require("@nx/js");
8
8
  const test_runners_1 = require("../../utils/test-runners");
9
9
  const application_1 = tslib_1.__importDefault(require("../application/application"));
@@ -49,17 +49,18 @@ async function host(tree, schema) {
49
49
  }
50
50
  });
51
51
  }
52
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
53
- const { projectName: hostProjectName, projectRoot: appRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
52
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
53
+ const { projectName: hostProjectName, projectRoot: appRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
54
54
  name: options.name,
55
55
  projectType: 'application',
56
56
  directory: options.directory,
57
57
  });
58
+ const hostPort = options.port ?? 4200;
58
59
  const appInstallTask = await (0, application_1.default)(tree, {
59
60
  ...options,
60
61
  standalone: options.standalone,
61
62
  routing: true,
62
- port: 4200,
63
+ port: hostPort,
63
64
  skipFormat: true,
64
65
  bundler: 'webpack',
65
66
  });
@@ -68,7 +69,7 @@ async function host(tree, schema) {
68
69
  appName: hostProjectName,
69
70
  mfType: 'host',
70
71
  routing: true,
71
- port: 4200,
72
+ port: hostPort,
72
73
  remotes: remotesToIntegrate ?? [],
73
74
  federationType: options.dynamic ? 'dynamic' : 'static',
74
75
  skipPackageJson: options.skipPackageJson,
@@ -97,7 +98,7 @@ async function host(tree, schema) {
97
98
  name: remote,
98
99
  directory: remoteDirectory,
99
100
  host: hostProjectName,
100
- port: isRspack ? 4200 + i + 1 : undefined,
101
+ port: isRspack ? hostPort + i + 1 : undefined,
101
102
  skipFormat: true,
102
103
  standalone: options.standalone,
103
104
  typescriptConfiguration,
@@ -114,7 +115,7 @@ async function host(tree, schema) {
114
115
  const project = (0, devkit_1.readProjectConfiguration)(tree, hostProjectName);
115
116
  project.targets.serve ??= {};
116
117
  project.targets.serve.options ??= {};
117
- project.targets.serve.options.port = 4200;
118
+ project.targets.serve.options.port = hostPort;
118
119
  (0, devkit_1.updateProjectConfiguration)(tree, hostProjectName, project);
119
120
  if (!options.skipFormat) {
120
121
  await (0, devkit_1.formatFiles)(tree);
@@ -6,6 +6,7 @@ export interface Schema {
6
6
  directory: string;
7
7
  name?: string;
8
8
  bundler?: 'webpack' | 'rspack';
9
+ port?: number;
9
10
  remotes?: string[];
10
11
  dynamic?: boolean;
11
12
  setParserOptionsProject?: boolean;
@@ -43,6 +43,10 @@
43
43
  "default": "webpack",
44
44
  "enum": ["webpack", "rspack"]
45
45
  },
46
+ "port": {
47
+ "type": "number",
48
+ "description": "The port at which the Consumer (host) application should be served. Defaults to 4200."
49
+ },
46
50
  "dynamic": {
47
51
  "type": "boolean",
48
52
  "description": "Should the host application use dynamic federation?",
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EAItB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,CAAC,CA8B5B;AA2ED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,iBAAiB,EAItB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,CAAC,CA8B5B;AA2ED,eAAe,oBAAoB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.angularInitGenerator = angularInitGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
6
6
  const plugin_1 = require("../../plugins/plugin");
7
7
  const validations_1 = require("../utils/validations");
8
8
  const version_utils_1 = require("../utils/version-utils");
@@ -16,7 +16,7 @@ async function angularInitGenerator(tree, options) {
16
16
  // by most folks we've talked to.
17
17
  options.addPlugin ??= process.env.NX_RUNNING_NX_IMPORT === 'true';
18
18
  if (options.addPlugin) {
19
- await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/angular/plugin', plugin_1.createNodesV2, {
19
+ await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/angular/plugin', plugin_1.createNodesV2, {
20
20
  targetNamePrefix: ['', 'angular:', 'angular-'],
21
21
  }, options.updatePackageScripts);
22
22
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addProject = addProject;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
6
6
  const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
7
7
  async function addProject(tree, libraryOptions) {
8
8
  const project = {
@@ -18,7 +18,7 @@ async function addProject(tree, libraryOptions) {
18
18
  const executor = libraryOptions.publishable
19
19
  ? '@nx/angular:package'
20
20
  : '@nx/angular:ng-packagr-lite';
21
- (0, target_defaults_utils_1.addBuildTargetDefaults)(tree, executor);
21
+ (0, internal_1.addBuildTargetDefaults)(tree, executor);
22
22
  project.targets.build = {
23
23
  executor,
24
24
  outputs: ['{workspaceRoot}/dist/{projectRoot}'],
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const test_runners_1 = require("../../../utils/test-runners");
7
7
  const artifact_types_1 = require("../../utils/artifact-types");
8
8
  const version_utils_1 = require("../../utils/version-utils");
@@ -21,8 +21,8 @@ async function normalizeOptions(host, schema) {
21
21
  skipModule: schema.skipModule || schema.standalone,
22
22
  ...schema,
23
23
  };
24
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'library');
25
- const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
24
+ await (0, internal_1.ensureRootProjectName)(options, 'library');
25
+ const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
26
26
  name: options.name,
27
27
  projectType: 'library',
28
28
  directory: options.directory,
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAuBpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAiE5B;AAoED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAsBpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAiE5B;AAoED,eAAe,gBAAgB,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGenerator = libraryGenerator;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
7
7
  const js_1 = require("@nx/js");
8
8
  const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
9
9
  const init_1 = tslib_1.__importDefault(require("../../generators/init/init"));
@@ -68,7 +68,7 @@ async function libraryGenerator(tree, schema) {
68
68
  if (libraryOptions.publishable) {
69
69
  tasks.push(await (0, add_release_config_1.releaseTasks)(tree));
70
70
  }
71
- tasks.push(() => (0, log_show_project_command_1.logShowProjectCommand)(libraryOptions.name));
71
+ tasks.push(() => (0, internal_1.logShowProjectCommand)(libraryOptions.name));
72
72
  return (0, devkit_1.runTasksInSerial)(...tasks);
73
73
  }
74
74
  async function addUnitTestRunner(host, options) {
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const semver_1 = require("@nx/devkit/src/utils/semver");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const path_1 = require("path");
7
- const semver_2 = require("semver");
7
+ const semver_1 = require("semver");
8
8
  const versions_1 = require("../../../utils/versions");
9
9
  function normalizeOptions(tree, options) {
10
10
  let rxjsVersion;
11
11
  try {
12
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
12
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
13
13
  }
14
14
  catch {
15
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
15
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
16
16
  }
17
- const rxjsMajorVersion = (0, semver_2.major)(rxjsVersion);
17
+ const rxjsMajorVersion = (0, semver_1.major)(rxjsVersion);
18
18
  return {
19
19
  ...options,
20
20
  parentDirectory: options.module
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const semver_1 = require("@nx/devkit/src/utils/semver");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const path_1 = require("path");
7
- const semver_2 = require("semver");
7
+ const semver_1 = require("semver");
8
8
  const versions_1 = require("../../../utils/versions");
9
9
  function normalizeOptions(tree, options) {
10
10
  let rxjsVersion;
11
11
  try {
12
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
12
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
13
13
  }
14
14
  catch {
15
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
15
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
16
16
  }
17
- const rxjsMajorVersion = (0, semver_2.major)(rxjsVersion);
17
+ const rxjsMajorVersion = (0, semver_1.major)(rxjsVersion);
18
18
  const { subdirectory, name } = determineSubdirectoryAndName(options.name);
19
19
  return {
20
20
  ...options,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const semver_1 = require("@nx/devkit/src/utils/semver");
6
6
  const versions_1 = require("../../../utils/versions");
7
7
  const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
8
8
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
@@ -10,10 +10,10 @@ function normalizeOptions(tree, options) {
10
10
  let rxjsVersion;
11
11
  try {
12
12
  const rxjsVersionFromPackageJson = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'rxjs', 'package.json', ['dependencies']);
13
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', rxjsVersionFromPackageJson);
13
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', rxjsVersionFromPackageJson);
14
14
  }
15
15
  catch {
16
- rxjsVersion = (0, semver_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
16
+ rxjsVersion = (0, internal_1.checkAndCleanWithSemver)(tree, 'rxjs', versions_1.rxjsVersion);
17
17
  }
18
18
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
19
19
  const isStandalone = (0, ast_utils_1.isNgStandaloneApp)(tree, options.project);
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const validations_1 = require("../../utils/validations");
7
7
  const version_utils_1 = require("../../utils/version-utils");
8
8
  async function normalizeOptions(tree, options) {
9
9
  const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
10
10
  options.typeSeparator ??= angularMajorVersion < 20 ? '.' : '-';
11
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
11
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
12
12
  name: options.name,
13
13
  path: options.path,
14
14
  suffix: 'pipe',
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,IAAI,EAEL,MAAM,YAAY,CAAC;AAepB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAqHtD;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":"AAIA,OAAO,EAOL,IAAI,EAEL,MAAM,YAAY,CAAC;AAWpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAqHtD;AAED,eAAe,MAAM,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.remote = remote;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
7
7
  const versions_1 = require("@nx/js/src/utils/versions");
8
8
  const test_runners_1 = require("../../utils/test-runners");
9
9
  const application_1 = require("../application/application");
@@ -29,8 +29,8 @@ async function remote(tree, schema) {
29
29
  if (options.host && !projects.has(options.host)) {
30
30
  throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
31
31
  }
32
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
33
- const { projectName: remoteProjectName } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
32
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
33
+ const { projectName: remoteProjectName } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
34
34
  name: options.name,
35
35
  projectType: 'application',
36
36
  directory: options.directory,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const artifact_types_1 = require("../../utils/artifact-types");
7
7
  const validations_1 = require("../../utils/validations");
8
8
  const version_utils_1 = require("../../utils/version-utils");
@@ -11,7 +11,7 @@ async function normalizeOptions(tree, options) {
11
11
  if (angularMajorVersion < 20) {
12
12
  options.type ??= 'component';
13
13
  }
14
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
14
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
15
15
  name: options.name,
16
16
  path: options.path,
17
17
  suffix: options.type,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const artifact_types_1 = require("../../utils/artifact-types");
7
7
  const validations_1 = require("../../utils/validations");
8
8
  const version_utils_1 = require("../../utils/version-utils");
@@ -11,7 +11,7 @@ async function normalizeOptions(tree, options) {
11
11
  if (angularMajorVersion < 20) {
12
12
  options.type ??= 'directive';
13
13
  }
14
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
14
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
15
15
  name: options.name,
16
16
  path: options.path,
17
17
  suffix: options.type,
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const artifact_types_1 = require("../../utils/artifact-types");
7
7
  const validations_1 = require("../../utils/validations");
8
8
  const version_utils_1 = require("../../utils/version-utils");
9
9
  async function normalizeOptions(tree, options) {
10
10
  const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
11
11
  options.typeSeparator ??= angularMajorVersion < 20 ? '.' : '-';
12
- const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
12
+ const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
13
13
  name: options.name,
14
14
  path: options.path,
15
15
  suffix: 'pipe',
@@ -1 +1 @@
1
- {"version":3,"file":"change-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/change-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAQxC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAuB5D"}
1
+ {"version":3,"file":"change-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/change-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOxC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAuB5D"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.changeBuildTarget = changeBuildTarget;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
6
6
  function changeBuildTarget(host, options) {
7
7
  const appConfig = (0, devkit_1.readProjectConfiguration)(host, options.appName);
8
8
  const configExtName = options.typescriptConfiguration ? 'ts' : 'js';
@@ -20,5 +20,5 @@ function changeBuildTarget(host, options) {
20
20
  },
21
21
  };
22
22
  (0, devkit_1.updateProjectConfiguration)(host, options.appName, appConfig);
23
- (0, target_defaults_utils_1.addBuildTargetDefaults)(host, '@nx/angular:webpack-browser');
23
+ (0, internal_1.addBuildTargetDefaults)(host, '@nx/angular:webpack-browser');
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-ssr/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEpE,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,0BAA0B,CAAC,CA+CrC"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-ssr/lib/normalize-options.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEpE,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,0BAA0B,CAAC,CA+CrC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const prompt_1 = require("@nx/devkit/src/generators/prompt");
6
6
  const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
7
7
  const version_utils_1 = require("../../utils/version-utils");
8
8
  async function normalizeOptions(tree, options) {
@@ -13,7 +13,7 @@ async function normalizeOptions(tree, options) {
13
13
  if (options.serverRouting === undefined && isUsingApplicationBuilder) {
14
14
  const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
15
15
  if (angularMajorVersion === 19) {
16
- options.serverRouting = await (0, prompt_1.promptWhenInteractive)({
16
+ options.serverRouting = await (0, internal_1.promptWhenInteractive)({
17
17
  type: 'confirm',
18
18
  name: 'serverRouting',
19
19
  message: 'Would you like to use the Server Routing and App Engine APIs (Developer Preview) for this server application?',
@@ -1 +1 @@
1
- {"version":3,"file":"browser-target-to-build-target.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,SAAS,UAKrB,CAAC;AAEF,yBAA+B,IAAI,EAAE,IAAI,iBA8CxC"}
1
+ {"version":3,"file":"browser-target-to-build-target.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-17-1-0/browser-target-to-build-target.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,SAAS,UAKrB,CAAC;AAEF,yBAA+B,IAAI,EAAE,IAAI,iBA8CxC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executors = void 0;
4
4
  exports.default = default_1;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
7
7
  exports.executors = [
8
8
  '@angular-devkit/build-angular:dev-server',
9
9
  '@angular-devkit/build-angular:extract-i18n',
@@ -13,7 +13,7 @@ exports.executors = [
13
13
  async function default_1(tree) {
14
14
  // update options from project configs
15
15
  exports.executors.forEach((executor) => {
16
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, executor, (_, project, target, configuration) => {
16
+ (0, internal_1.forEachExecutorOptions)(tree, executor, (_, project, target, configuration) => {
17
17
  const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, project);
18
18
  const config = configuration
19
19
  ? projectConfiguration.targets[target].configurations[configuration]
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  async function default_1(tree) {
7
7
  let usesModuleFederation = false;
8
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', (options, projectName, targetName) => {
8
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', (options, projectName, targetName) => {
9
9
  const webpackConfig = options.webpackConfig;
10
10
  if (!webpackConfig) {
11
11
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AASpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
1
+ {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAQpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = migrateWithMfImport;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
7
7
  const versions_1 = require("../../utils/versions");
8
8
  const NX_ANGULAR_MODULE_FEDERATION_IMPORT_SELECTOR = 'ImportDeclaration > StringLiteral[value=@nx/angular/module-federation], VariableStatement CallExpression:has(Identifier[name=require]) > StringLiteral[value=@nx/angular/module-federation]';
9
9
  const NEW_IMPORT_PATH = `'@nx/module-federation/angular'`;
10
10
  async function migrateWithMfImport(tree) {
11
11
  const projects = new Set();
12
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', (options, project, target) => {
12
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', (options, project, target) => {
13
13
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
14
14
  projects.add(projectConfig.root);
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"remove-tailwind-config-from-ng-packagr-executors.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,SAAS,UAAyD,CAAC;AAEhF,yBAA+B,IAAI,EAAE,IAAI,iBA4FxC"}
1
+ {"version":3,"file":"remove-tailwind-config-from-ng-packagr-executors.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,SAAS,UAAyD,CAAC;AAEhF,yBAA+B,IAAI,EAAE,IAAI,iBA4FxC"}
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executors = void 0;
4
4
  exports.default = default_1;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
7
7
  exports.executors = ['@nx/angular:ng-packagr-lite', '@nx/angular:package'];
8
8
  async function default_1(tree) {
9
9
  // update options from project configs
10
10
  exports.executors.forEach((executor) => {
11
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, executor, (options, project, target, configuration) => {
11
+ (0, internal_1.forEachExecutorOptions)(tree, executor, (options, project, target, configuration) => {
12
12
  if (options.tailwindConfig === undefined) {
13
13
  return;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAIpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
1
+ {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAGpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ensureMfPackage;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const versions_1 = require("../../utils/versions");
7
7
  async function ensureMfPackage(tree) {
8
8
  const projects = new Set();
9
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/angular:module-federation-dev-server', (options, project, target) => {
9
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/angular:module-federation-dev-server', (options, project, target) => {
10
10
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
11
11
  projects.add(projectConfig.root);
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAYpB,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACtD,CAAC;AAgDF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAwB7D,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/plugins/plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,aAAa,EAOnB,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACtD,CAAC;AAqCF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CA+B7D,CAAC"}
@@ -2,9 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodesV2 = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
7
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
8
7
  const js_1 = require("@nx/js");
9
8
  const node_fs_1 = require("node:fs");
10
9
  const node_path_1 = require("node:path");
@@ -46,37 +45,35 @@ const knownExecutors = {
46
45
  '@angular/build:unit-test',
47
46
  ]),
48
47
  };
49
- function readProjectsCache(cachePath) {
50
- return (0, node_fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
51
- }
52
- function writeProjectsToCache(cachePath, results) {
53
- (0, devkit_1.writeJsonFile)(cachePath, results);
54
- }
55
48
  exports.createNodesV2 = [
56
49
  '**/angular.json',
57
50
  async (configFiles, options, context) => {
58
51
  const optionsHash = (0, devkit_internals_1.hashObject)(options);
59
52
  const cachePath = (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `angular-${optionsHash}.hash`);
60
- const projectsCache = readProjectsCache(cachePath);
61
- const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
53
+ const projectsCache = new internal_1.PluginCache(cachePath);
54
+ const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
55
+ const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
56
+ const lockFileName = (0, js_1.getLockFileName)(packageManager);
62
57
  try {
63
- return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, projectsCache, pmc), configFiles, options, context);
58
+ return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, projectsCache, pmc, lockFileName), configFiles, options, context);
64
59
  }
65
60
  finally {
66
- writeProjectsToCache(cachePath, projectsCache);
61
+ projectsCache.writeToDisk();
67
62
  }
68
63
  },
69
64
  ];
70
- async function createNodesInternal(configFilePath, options, context, projectsCache, pmc) {
65
+ async function createNodesInternal(configFilePath, options, context, projectsCache, pmc, lockFileName) {
71
66
  const angularWorkspaceRoot = (0, node_path_1.dirname)(configFilePath);
72
67
  // Do not create a project if package.json isn't there
73
68
  const siblingFiles = (0, node_fs_1.readdirSync)((0, node_path_1.join)(context.workspaceRoot, angularWorkspaceRoot));
74
69
  if (!siblingFiles.includes('package.json')) {
75
70
  return {};
76
71
  }
77
- const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(angularWorkspaceRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
78
- projectsCache[hash] ??= await buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context, pmc);
79
- return { projects: projectsCache[hash] };
72
+ const hash = await (0, internal_1.calculateHashForCreateNodes)(angularWorkspaceRoot, options, context, [lockFileName]);
73
+ if (!projectsCache.has(hash)) {
74
+ projectsCache.set(hash, await buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context, pmc));
75
+ }
76
+ return { projects: projectsCache.get(hash) };
80
77
  }
81
78
  async function buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context, pmc) {
82
79
  const projects = {};
@@ -90,7 +87,7 @@ async function buildAngularProjects(configFilePath, options, angularWorkspaceRoo
90
87
  if (!projectTargets) {
91
88
  continue;
92
89
  }
93
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(project.root, context);
90
+ const namedInputs = (0, internal_1.getNamedInputs)(project.root, context);
94
91
  for (const [angularTargetName, angularTarget] of Object.entries(projectTargets)) {
95
92
  const nxTargetName = options?.targetNamePrefix
96
93
  ? `${options.targetNamePrefix}${angularTargetName}`
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMFProjects = getMFProjects;
4
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
4
+ const internal_1 = require("@nx/devkit/internal");
5
5
  function _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, projects) {
6
6
  return (opts, projectName) => {
7
7
  const webpackPath = opts[CUSTOM_WEBPACK_OPTION]?.path;
@@ -25,7 +25,7 @@ function getMFProjects(tree, { legacy } = { legacy: false }) {
25
25
  ? 'Identifier[name=ModuleFederationPlugin]'
26
26
  : 'Identifier[name=withModuleFederation]';
27
27
  const projects = [];
28
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/angular:webpack-browser', _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, projects));
29
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/angular:webpack-browser', _getMfProjects(tree, CUSTOM_WEBPACK_OPTION, MODULE_FEDERATION_IDENTIFIER, 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
30
  return projects;
31
31
  }