@nx/angular 23.0.0-canary.20260429-0205b22 → 23.0.0-canary.20260504-e8aa612
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.
- package/generators.d.ts +0 -1
- package/generators.d.ts.map +1 -1
- package/generators.js +0 -1
- package/generators.json +0 -7
- package/migrations.json +5 -0
- package/package.json +8 -10
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +4 -5
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +4 -5
- package/src/executors/package/package.impl.js +2 -2
- package/src/generators/add-linting/add-linting.d.ts.map +1 -1
- package/src/generators/add-linting/add-linting.js +5 -5
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +2 -2
- package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
- package/src/generators/application/lib/add-e2e.js +1 -1
- package/src/generators/application/lib/create-project.d.ts.map +1 -1
- package/src/generators/application/lib/create-project.js +3 -3
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/component/lib/normalize-options.js +2 -2
- package/src/generators/convert-to-rspack/convert-to-rspack.d.ts.map +1 -1
- package/src/generators/convert-to-rspack/convert-to-rspack.js +3 -4
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +2 -2
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts.map +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +3 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +1 -1
- package/src/generators/directive/lib/normalize-options.js +2 -2
- package/src/generators/federate-module/lib/add-remote.js +2 -2
- package/src/generators/host/host.d.ts.map +1 -1
- package/src/generators/host/host.js +8 -7
- package/src/generators/host/schema.d.ts +1 -0
- package/src/generators/host/schema.json +4 -0
- package/src/generators/init/init.d.ts.map +1 -1
- package/src/generators/init/init.js +2 -2
- package/src/generators/library/lib/add-project.js +2 -2
- package/src/generators/library/lib/normalize-options.js +3 -3
- package/src/generators/library/library.d.ts.map +1 -1
- package/src/generators/library/library.js +2 -2
- package/src/generators/ngrx/lib/normalize-options.js +5 -5
- package/src/generators/ngrx-feature-store/lib/normalize-options.js +5 -5
- package/src/generators/ngrx-root-store/lib/normalize-options.js +3 -3
- package/src/generators/pipe/lib/normalize-options.js +2 -2
- package/src/generators/remote/remote.d.ts.map +1 -1
- package/src/generators/remote/remote.js +3 -3
- package/src/generators/scam/lib/normalize-options.js +2 -2
- package/src/generators/scam-directive/lib/normalize-options.js +2 -2
- package/src/generators/scam-pipe/lib/normalize-options.js +2 -2
- package/src/generators/setup-mf/lib/change-build-target.d.ts.map +1 -1
- package/src/generators/setup-mf/lib/change-build-target.js +2 -2
- package/src/generators/setup-ssr/lib/normalize-options.d.ts.map +1 -1
- package/src/generators/setup-ssr/lib/normalize-options.js +2 -2
- package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts.map +1 -1
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +2 -2
- package/src/migrations/update-19-6-1/ensure-depends-on-for-mf.js +2 -2
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts.map +1 -1
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +2 -2
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.d.ts +3 -0
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -0
- package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.js +45 -0
- package/src/plugins/plugin.d.ts.map +1 -1
- package/src/plugins/plugin.js +9 -14
- package/src/utils/get-mf-projects.js +3 -3
- package/module-federation/index.d.ts +0 -6
- package/module-federation/index.d.ts.map +0 -1
- package/module-federation/index.js +0 -6
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +0 -16
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts.map +0 -1
- package/src/generators/add-linting/lib/create-eslint-configuration.js +0 -121
- package/src/generators/move/move.d.ts +0 -7
- package/src/generators/move/move.d.ts.map +0 -1
- package/src/generators/move/move.js +0 -11
- package/src/generators/move/schema.d.ts +0 -8
- package/src/generators/move/schema.json +0 -56
package/generators.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from './src/generators/host/host';
|
|
|
8
8
|
export * from './src/generators/init/init';
|
|
9
9
|
export * from './src/generators/library-secondary-entry-point/library-secondary-entry-point';
|
|
10
10
|
export * from './src/generators/library/library';
|
|
11
|
-
export * from './src/generators/move/move';
|
|
12
11
|
export * from './src/generators/ngrx/ngrx';
|
|
13
12
|
export * from './src/generators/ngrx-feature-store/ngrx-feature-store';
|
|
14
13
|
export * from './src/generators/ngrx-root-store/ngrx-root-store';
|
package/generators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8EAA8E,CAAC;AAC7F,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8EAA8E,CAAC;AAC7F,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wDAAwD,CAAC;AACvE,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wDAAwD,CAAC;AACvE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kEAAkE,CAAC;AACjF,cAAc,wCAAwC,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kFAAkF,CAAC;AACjI,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0BAA0B,CAAC"}
|
package/generators.js
CHANGED
|
@@ -12,7 +12,6 @@ tslib_1.__exportStar(require("./src/generators/host/host"), exports);
|
|
|
12
12
|
tslib_1.__exportStar(require("./src/generators/init/init"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./src/generators/library-secondary-entry-point/library-secondary-entry-point"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./src/generators/library/library"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./src/generators/move/move"), exports);
|
|
16
15
|
tslib_1.__exportStar(require("./src/generators/ngrx/ngrx"), exports);
|
|
17
16
|
tslib_1.__exportStar(require("./src/generators/ngrx-feature-store/ngrx-feature-store"), exports);
|
|
18
17
|
tslib_1.__exportStar(require("./src/generators/ngrx-root-store/ngrx-root-store"), exports);
|
package/generators.json
CHANGED
|
@@ -81,13 +81,6 @@
|
|
|
81
81
|
"description": "Generate a Remote Angular Module Federation Application.",
|
|
82
82
|
"aliases": ["producer"]
|
|
83
83
|
},
|
|
84
|
-
"move": {
|
|
85
|
-
"factory": "./src/generators/move/move#angularMoveGenerator",
|
|
86
|
-
"schema": "./src/generators/move/schema.json",
|
|
87
|
-
"aliases": ["mv"],
|
|
88
|
-
"description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration.",
|
|
89
|
-
"x-deprecated": "Use the `@nx/workspace:move` generator instead. This generator will be removed in Nx v22."
|
|
90
|
-
},
|
|
91
84
|
"convert-to-with-mf": {
|
|
92
85
|
"factory": "./src/generators/convert-to-with-mf/convert-to-with-mf",
|
|
93
86
|
"schema": "./src/generators/convert-to-with-mf/schema.json",
|
package/migrations.json
CHANGED
|
@@ -389,6 +389,11 @@
|
|
|
389
389
|
},
|
|
390
390
|
"description": "Replace 'jest-preset-angular/setup-jest' imports with the new 'setupZoneTestEnv' function.",
|
|
391
391
|
"factory": "./src/migrations/update-22-3-0/update-jest-preset-angular-setup"
|
|
392
|
+
},
|
|
393
|
+
"update-23-0-0-update-with-module-federation-import": {
|
|
394
|
+
"version": "23.0.0-beta.0",
|
|
395
|
+
"description": "Update the @nx/angular/module-federation import to use @nx/module-federation/angular.",
|
|
396
|
+
"factory": "./src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package"
|
|
392
397
|
}
|
|
393
398
|
},
|
|
394
399
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "23.0.0-canary.
|
|
3
|
+
"version": "23.0.0-canary.20260504-e8aa612",
|
|
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": {
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"./executors": "./executors.js",
|
|
25
25
|
"./plugin": "./plugin.js",
|
|
26
26
|
"./tailwind": "./tailwind.js",
|
|
27
|
-
"./module-federation": "./module-federation/index.js",
|
|
28
27
|
"./src/utils": "./src/utils/index.js",
|
|
29
28
|
"./plugins/component-testing": "./plugins/component-testing.js",
|
|
30
29
|
"./src/generators/utils": "./src/generators/utils/index.js",
|
|
@@ -62,14 +61,13 @@
|
|
|
62
61
|
"migrations": "./migrations.json"
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
65
|
-
"@nx/devkit": "23.0.0-canary.
|
|
66
|
-
"@nx/eslint": "23.0.0-canary.
|
|
67
|
-
"@nx/js": "23.0.0-canary.
|
|
68
|
-
"@nx/module-federation": "23.0.0-canary.
|
|
69
|
-
"@nx/rspack": "23.0.0-canary.
|
|
70
|
-
"@nx/web": "23.0.0-canary.
|
|
71
|
-
"@nx/webpack": "23.0.0-canary.
|
|
72
|
-
"@nx/workspace": "23.0.0-canary.20260429-0205b22",
|
|
64
|
+
"@nx/devkit": "23.0.0-canary.20260504-e8aa612",
|
|
65
|
+
"@nx/eslint": "23.0.0-canary.20260504-e8aa612",
|
|
66
|
+
"@nx/js": "23.0.0-canary.20260504-e8aa612",
|
|
67
|
+
"@nx/module-federation": "23.0.0-canary.20260504-e8aa612",
|
|
68
|
+
"@nx/rspack": "23.0.0-canary.20260504-e8aa612",
|
|
69
|
+
"@nx/web": "23.0.0-canary.20260504-e8aa612",
|
|
70
|
+
"@nx/webpack": "23.0.0-canary.20260504-e8aa612",
|
|
73
71
|
"@phenomnomnominal/tsquery": "~6.1.4",
|
|
74
72
|
"@typescript-eslint/type-utils": "^8.0.0",
|
|
75
73
|
"enquirer": "~2.3.6",
|
package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map
CHANGED
|
@@ -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":"
|
|
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,
|
|
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,
|
|
72
|
+
const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
|
|
74
73
|
...v,
|
|
75
74
|
baseUrl: undefined,
|
|
76
75
|
}));
|
|
77
|
-
return yield* (0,
|
|
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;
|
package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js
CHANGED
|
@@ -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
|
|
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,
|
|
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,
|
|
95
|
+
const removeBaseUrlEmission = (iter) => (0, internal_1.mapAsyncIterable)(iter, (v) => ({
|
|
97
96
|
...v,
|
|
98
97
|
baseUrl: undefined,
|
|
99
98
|
}));
|
|
100
|
-
const combined = (0,
|
|
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
|
|
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,
|
|
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":"
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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":"
|
|
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,
|
|
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;
|
|
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:
|
|
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":"
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
21
|
-
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0,
|
|
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
|
|
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,
|
|
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":"
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
2
|
import type { Schema } from './schema';
|
|
3
|
-
export declare function convertToWithMF(tree: Tree, schema: Schema): Promise<
|
|
3
|
+
export declare function convertToWithMF(tree: Tree, schema: Schema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
4
|
export default convertToWithMF;
|
|
5
5
|
//# sourceMappingURL=convert-to-with-mf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-with-mf.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"convert-to-with-mf.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAYvC,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAqD/D;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.convertToWithMF = convertToWithMF;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const get_mf_projects_1 = require("../../utils/get-mf-projects");
|
|
6
|
+
const versions_1 = require("../../utils/versions");
|
|
6
7
|
const lib_1 = require("./lib");
|
|
7
8
|
async function convertToWithMF(tree, schema) {
|
|
8
9
|
const projects = new Set((0, get_mf_projects_1.getMFProjects)(tree, { legacy: true }));
|
|
@@ -24,8 +25,10 @@ async function convertToWithMF(tree, schema) {
|
|
|
24
25
|
const [updatedWebpackConfig, mfConfig] = (0, lib_1.writeNewWebpackConfig)(webpackAst, (0, lib_1.isHostRemoteConfig)(webpackAst), schema.project);
|
|
25
26
|
tree.write(pathToWebpackConfig, updatedWebpackConfig);
|
|
26
27
|
tree.write((0, devkit_1.joinPathFragments)(project.root, 'module-federation.config.js'), mfConfig);
|
|
28
|
+
const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@nx/module-federation': versions_1.nxVersion });
|
|
27
29
|
if (!schema.skipFormat) {
|
|
28
30
|
await (0, devkit_1.formatFiles)(tree);
|
|
29
31
|
}
|
|
32
|
+
return installTask;
|
|
30
33
|
}
|
|
31
34
|
exports.default = convertToWithMF;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.writeNewWebpackConfig = writeNewWebpackConfig;
|
|
4
4
|
const is_host_remote_config_1 = require("./is-host-remote-config");
|
|
5
5
|
function writeNewWebpackConfig(ast, mfType, projectName) {
|
|
6
|
-
const webpackConfig = `const { withModuleFederation } = require('@nx/
|
|
6
|
+
const webpackConfig = `const { withModuleFederation } = require('@nx/module-federation/angular');
|
|
7
7
|
const config = require('./module-federation.config');
|
|
8
8
|
module.exports = withModuleFederation(config);
|
|
9
9
|
`;
|
|
@@ -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
|
|
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,
|
|
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
|
|
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,
|
|
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":"
|
|
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,
|
|
53
|
-
const { projectName: hostProjectName, projectRoot: appRoot } = await (0,
|
|
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:
|
|
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:
|
|
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 ?
|
|
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 =
|
|
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);
|
|
@@ -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":"
|
|
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,
|
|
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
|
}
|