@nx/angular 18.3.0-canary.20240405-fc8d5ba → 18.3.0-canary.20240406-a9e554f
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "18.3.0-canary.
|
3
|
+
"version": "18.3.0-canary.20240406-a9e554f",
|
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, Tailwind CSS, 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": {
|
@@ -78,14 +78,14 @@
|
|
78
78
|
"tslib": "^2.3.0",
|
79
79
|
"webpack": "^5.80.0",
|
80
80
|
"webpack-merge": "^5.8.0",
|
81
|
-
"@nx/devkit": "18.3.0-canary.
|
82
|
-
"@nx/js": "18.3.0-canary.
|
83
|
-
"@nx/eslint": "18.3.0-canary.
|
84
|
-
"@nx/webpack": "18.3.0-canary.
|
85
|
-
"@nx/web": "18.3.0-canary.
|
86
|
-
"@nx/workspace": "18.3.0-canary.
|
81
|
+
"@nx/devkit": "18.3.0-canary.20240406-a9e554f",
|
82
|
+
"@nx/js": "18.3.0-canary.20240406-a9e554f",
|
83
|
+
"@nx/eslint": "18.3.0-canary.20240406-a9e554f",
|
84
|
+
"@nx/webpack": "18.3.0-canary.20240406-a9e554f",
|
85
|
+
"@nx/web": "18.3.0-canary.20240406-a9e554f",
|
86
|
+
"@nx/workspace": "18.3.0-canary.20240406-a9e554f",
|
87
87
|
"piscina": "^4.4.0",
|
88
|
-
"@nrwl/angular": "18.3.0-canary.
|
88
|
+
"@nrwl/angular": "18.3.0-canary.20240406-a9e554f"
|
89
89
|
},
|
90
90
|
"peerDependencies": {
|
91
91
|
"@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { type Schema } from '../schema';
|
2
2
|
import { type ExecutorContext, type ProjectConfiguration } from '@nx/devkit';
|
3
|
-
export declare function
|
4
|
-
remotePorts: any[];
|
5
|
-
staticRemotes: string[];
|
6
|
-
devRemotes: string[];
|
7
|
-
}, workspaceProjects: Record<string, ProjectConfiguration>, options: Schema, context: ExecutorContext): Promise<AsyncIterable<{
|
3
|
+
export declare function startRemotes(remotes: string[], workspaceProjects: Record<string, ProjectConfiguration>, options: Schema, context: ExecutorContext, target?: 'serve' | 'serve-static'): Promise<AsyncIterable<{
|
8
4
|
success: boolean;
|
9
5
|
}>[]>;
|
@@ -1,29 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.startRemotes = void 0;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
|
-
async function
|
6
|
-
const
|
7
|
-
for (const app of remotes
|
8
|
-
if (!workspaceProjects[app].targets?.[
|
9
|
-
throw new Error(`Could not find "
|
5
|
+
async function startRemotes(remotes, workspaceProjects, options, context, target = 'serve') {
|
6
|
+
const remoteIters = [];
|
7
|
+
for (const app of remotes) {
|
8
|
+
if (!workspaceProjects[app].targets?.[target]) {
|
9
|
+
throw new Error(`Could not find "${target}" target in "${app}" project.`);
|
10
10
|
}
|
11
|
-
else if (!workspaceProjects[app].targets?.[
|
12
|
-
throw new Error(`Could not find executor for "
|
11
|
+
else if (!workspaceProjects[app].targets?.[target].executor) {
|
12
|
+
throw new Error(`Could not find executor for "${target}" target in "${app}" project.`);
|
13
13
|
}
|
14
|
-
const [collection, executor] = workspaceProjects[app].targets[
|
14
|
+
const [collection, executor] = workspaceProjects[app].targets[target].executor.split(':');
|
15
15
|
const isUsingModuleFederationDevServerExecutor = executor.includes('module-federation-dev-server');
|
16
|
-
|
16
|
+
remoteIters.push(await (0, devkit_1.runExecutor)({
|
17
17
|
project: app,
|
18
|
-
target
|
18
|
+
target,
|
19
19
|
configuration: context.configurationName,
|
20
20
|
}, {
|
21
|
-
verbose: options.verbose ?? false,
|
21
|
+
...(target === 'serve' ? { verbose: options.verbose ?? false } : {}),
|
22
22
|
...(isUsingModuleFederationDevServerExecutor
|
23
23
|
? { isInitialHost: false }
|
24
24
|
: {}),
|
25
25
|
}, context));
|
26
26
|
}
|
27
|
-
return
|
27
|
+
return remoteIters;
|
28
28
|
}
|
29
|
-
exports.
|
29
|
+
exports.startRemotes = startRemotes;
|
@@ -70,7 +70,8 @@ async function* moduleFederationDevServerExecutor(schema, context) {
|
|
70
70
|
}
|
71
71
|
const staticRemotesConfig = (0, lib_1.parseStaticRemotesConfig)(remotes.staticRemotes, context);
|
72
72
|
await (0, lib_1.buildStaticRemotes)(staticRemotesConfig, nxBin, context, options);
|
73
|
-
const devRemoteIters = await (0, lib_1.
|
73
|
+
const devRemoteIters = await (0, lib_1.startRemotes)(remotes.devRemotes, workspaceProjects, options, context, 'serve');
|
74
|
+
const dynamicRemoteIters = await (0, lib_1.startRemotes)(remotes.dynamicRemotes, workspaceProjects, options, context, 'serve-static');
|
74
75
|
const staticRemotesIter = remotes.staticRemotes.length > 0
|
75
76
|
? (0, lib_1.startStaticRemotesFileServer)(staticRemotesConfig, context, options)
|
76
77
|
: undefined;
|
@@ -78,7 +79,7 @@ async function* moduleFederationDevServerExecutor(schema, context) {
|
|
78
79
|
...v,
|
79
80
|
baseUrl: undefined,
|
80
81
|
}));
|
81
|
-
return yield* (0, async_iterable_1.combineAsyncIterables)(removeBaseUrlEmission(currIter), ...devRemoteIters.map(removeBaseUrlEmission), ...(staticRemotesIter ? [removeBaseUrlEmission(staticRemotesIter)] : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
|
82
|
+
return yield* (0, async_iterable_1.combineAsyncIterables)(removeBaseUrlEmission(currIter), ...devRemoteIters.map(removeBaseUrlEmission), ...dynamicRemoteIters.map(removeBaseUrlEmission), ...(staticRemotesIter ? [removeBaseUrlEmission(staticRemotesIter)] : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
|
82
83
|
if (!options.isInitialHost) {
|
83
84
|
done();
|
84
85
|
return;
|