@nx/rspack 19.6.0 → 19.7.0
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/executors.json +15 -0
- package/migrations.json +17 -0
- package/module-federation.d.ts +1 -0
- package/module-federation.js +5 -0
- package/module-federation.js.map +1 -0
- package/package.json +9 -4
- package/src/executors/dev-server/dev-server.impl.d.ts +4 -1
- package/src/executors/dev-server/dev-server.impl.js +11 -11
- package/src/executors/dev-server/dev-server.impl.js.map +1 -1
- package/src/executors/dev-server/lib/get-dev-server-config.d.ts +4 -0
- package/src/executors/dev-server/lib/get-dev-server-config.js +71 -0
- package/src/executors/dev-server/lib/get-dev-server-config.js.map +1 -0
- package/src/executors/dev-server/lib/serve-path.d.ts +3 -0
- package/src/executors/dev-server/lib/serve-path.js +45 -0
- package/src/executors/dev-server/lib/serve-path.js.map +1 -0
- package/src/executors/dev-server/schema.d.ts +5 -1
- package/src/executors/dev-server/schema.json +30 -2
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +19 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +230 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -0
- package/src/executors/module-federation-dev-server/schema.json +100 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +21 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +209 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js.map +1 -0
- package/src/executors/module-federation-ssr-dev-server/schema.json +82 -0
- package/src/executors/rspack/rspack.impl.js +3 -3
- package/src/executors/rspack/rspack.impl.js.map +1 -1
- package/src/executors/rspack/schema.d.ts +10 -1
- package/src/executors/rspack/schema.json +61 -7
- package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts +1 -0
- package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.js +40 -0
- package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.js.map +1 -0
- package/src/executors/ssr-dev-server/schema.d.ts +11 -0
- package/src/executors/ssr-dev-server/schema.json +39 -0
- package/src/executors/ssr-dev-server/ssr-dev-server.impl.d.ts +8 -0
- package/src/executors/ssr-dev-server/ssr-dev-server.impl.js +52 -0
- package/src/executors/ssr-dev-server/ssr-dev-server.impl.js.map +1 -0
- package/src/generators/application/application.js +2 -2
- package/src/generators/application/application.js.map +1 -1
- package/src/utils/create-compiler.d.ts +3 -1
- package/src/utils/create-compiler.js +12 -2
- package/src/utils/create-compiler.js.map +1 -1
- package/src/utils/module-federation/dependencies.d.ts +6 -0
- package/src/utils/module-federation/dependencies.js +58 -0
- package/src/utils/module-federation/dependencies.js.map +1 -0
- package/src/utils/module-federation/get-remotes-for-host.d.ts +16 -0
- package/src/utils/module-federation/get-remotes-for-host.js +103 -0
- package/src/utils/module-federation/get-remotes-for-host.js.map +1 -0
- package/src/utils/module-federation/index.d.ts +6 -0
- package/src/utils/module-federation/index.js +10 -0
- package/src/utils/module-federation/index.js.map +1 -0
- package/src/utils/module-federation/models/index.d.ts +47 -0
- package/src/utils/module-federation/models/index.js +3 -0
- package/src/utils/module-federation/models/index.js.map +1 -0
- package/src/utils/module-federation/package-json.d.ts +8 -0
- package/src/utils/module-federation/package-json.js +13 -0
- package/src/utils/module-federation/package-json.js.map +1 -0
- package/src/utils/module-federation/parse-static-remotes-config.d.ts +13 -0
- package/src/utils/module-federation/parse-static-remotes-config.js +35 -0
- package/src/utils/module-federation/parse-static-remotes-config.js.map +1 -0
- package/src/utils/module-federation/plugins/runtime-library-control.plugin.d.ts +3 -0
- package/src/utils/module-federation/plugins/runtime-library-control.plugin.js +55 -0
- package/src/utils/module-federation/plugins/runtime-library-control.plugin.js.map +1 -0
- package/src/utils/module-federation/public-api.d.ts +8 -0
- package/src/utils/module-federation/public-api.js +21 -0
- package/src/utils/module-federation/public-api.js.map +1 -0
- package/src/utils/module-federation/remotes.d.ts +19 -0
- package/src/utils/module-federation/remotes.js +78 -0
- package/src/utils/module-federation/remotes.js.map +1 -0
- package/src/utils/module-federation/secondary-entry-points.d.ts +12 -0
- package/src/utils/module-federation/secondary-entry-points.js +105 -0
- package/src/utils/module-federation/secondary-entry-points.js.map +1 -0
- package/src/utils/module-federation/share.d.ts +48 -0
- package/src/utils/module-federation/share.js +232 -0
- package/src/utils/module-federation/share.js.map +1 -0
- package/src/utils/module-federation/start-remote-proxies.d.ts +5 -0
- package/src/utils/module-federation/start-remote-proxies.js +46 -0
- package/src/utils/module-federation/start-remote-proxies.js.map +1 -0
- package/src/utils/module-federation/start-ssr-remote-proxies.d.ts +5 -0
- package/src/utils/module-federation/start-ssr-remote-proxies.js +60 -0
- package/src/utils/module-federation/start-ssr-remote-proxies.js.map +1 -0
- package/src/utils/module-federation/typescript.d.ts +4 -0
- package/src/utils/module-federation/typescript.js +53 -0
- package/src/utils/module-federation/typescript.js.map +1 -0
- package/src/utils/module-federation/with-module-federation/package-json.d.ts +8 -0
- package/src/utils/module-federation/with-module-federation/package-json.js +13 -0
- package/src/utils/module-federation/with-module-federation/package-json.js.map +1 -0
- package/src/utils/module-federation/with-module-federation/utils.d.ts +12 -0
- package/src/utils/module-federation/with-module-federation/utils.js +78 -0
- package/src/utils/module-federation/with-module-federation/utils.js.map +1 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation-ssr.d.ts +3 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation-ssr.js +42 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation-ssr.js.map +1 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation.d.ts +8 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation.js +52 -0
- package/src/utils/module-federation/with-module-federation/with-module-federation.js.map +1 -0
- package/src/utils/versions.d.ts +3 -3
- package/src/utils/versions.js +3 -3
- package/src/utils/with-nx.js +41 -15
- package/src/utils/with-nx.js.map +1 -1
package/executors.json
CHANGED
|
@@ -10,6 +10,21 @@
|
|
|
10
10
|
"implementation": "./src/executors/dev-server/dev-server.impl",
|
|
11
11
|
"schema": "./src/executors/dev-server/schema.json",
|
|
12
12
|
"description": "dev-server executor"
|
|
13
|
+
},
|
|
14
|
+
"ssr-dev-server": {
|
|
15
|
+
"implementation": "./src/executors/ssr-dev-server/ssr-dev-server.impl",
|
|
16
|
+
"schema": "./src/executors/ssr-dev-server/schema.json",
|
|
17
|
+
"description": "Serve a SSR application."
|
|
18
|
+
},
|
|
19
|
+
"module-federation-dev-server": {
|
|
20
|
+
"implementation": "./src/executors/module-federation-dev-server/module-federation-dev-server.impl",
|
|
21
|
+
"schema": "./src/executors/module-federation-dev-server/schema.json",
|
|
22
|
+
"description": "Serve a host or remote application."
|
|
23
|
+
},
|
|
24
|
+
"module-federation-ssr-dev-server": {
|
|
25
|
+
"implementation": "./src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl",
|
|
26
|
+
"schema": "./src/executors/module-federation-ssr-dev-server/schema.json",
|
|
27
|
+
"description": "Serve a host application along with it's known remotes."
|
|
13
28
|
}
|
|
14
29
|
}
|
|
15
30
|
}
|
package/migrations.json
CHANGED
|
@@ -75,6 +75,23 @@
|
|
|
75
75
|
"alwaysAddToPackageJson": false
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
},
|
|
79
|
+
"19.7.0": {
|
|
80
|
+
"version": "19.7.0-beta.1",
|
|
81
|
+
"packages": {
|
|
82
|
+
"@rspack/core": {
|
|
83
|
+
"version": "^1.0.0",
|
|
84
|
+
"alwaysAddToPackageJson": false
|
|
85
|
+
},
|
|
86
|
+
"@rspack/dev-server": {
|
|
87
|
+
"version": "^1.0.0",
|
|
88
|
+
"alwaysAddToPackageJson": false
|
|
89
|
+
},
|
|
90
|
+
"@rspack/plugin-react-refresh": {
|
|
91
|
+
"version": "^1.0.0",
|
|
92
|
+
"alwaysAddToPackageJson": false
|
|
93
|
+
}
|
|
94
|
+
}
|
|
78
95
|
}
|
|
79
96
|
},
|
|
80
97
|
"version": "0.1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/utils/module-federation/public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-federation.js","sourceRoot":"","sources":["../../../packages/rspack/module-federation.ts"],"names":[],"mappings":";;;AAAA,mFAAyD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/rspack",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,10 +28,15 @@
|
|
|
28
28
|
"stylus-loader": "^7.1.0",
|
|
29
29
|
"postcss-loader": "^8.1.1",
|
|
30
30
|
"@nx/eslint": "^19.5.7",
|
|
31
|
-
"@rspack/core": "^0.
|
|
32
|
-
"@rspack/plugin-react-refresh": "^0.
|
|
31
|
+
"@rspack/core": "^1.0.2",
|
|
32
|
+
"@rspack/plugin-react-refresh": "^1.0.0",
|
|
33
33
|
"@rspack/plugin-minify": "^0.7.5",
|
|
34
|
-
"
|
|
34
|
+
"chalk": "~4.1.0",
|
|
35
|
+
"@nrwl/rspack": "19.7.0"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@module-federation/enhanced": "~0.6.0",
|
|
39
|
+
"@module-federation/node": "~2.5.10"
|
|
35
40
|
},
|
|
36
41
|
"nx-migrations": {
|
|
37
42
|
"migrations": "./migrations.json"
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { DevServerExecutorSchema } from './schema';
|
|
3
|
-
export default function runExecutor(options: DevServerExecutorSchema, context: ExecutorContext):
|
|
3
|
+
export default function runExecutor(options: DevServerExecutorSchema, context: ExecutorContext): AsyncIterableIterator<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
}>;
|
|
@@ -7,27 +7,27 @@ const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
|
7
7
|
const dev_server_1 = require("@rspack/dev-server");
|
|
8
8
|
const create_compiler_1 = require("../../utils/create-compiler");
|
|
9
9
|
const mode_utils_1 = require("../../utils/mode-utils");
|
|
10
|
+
const get_dev_server_config_1 = require("./lib/get-dev-server-config");
|
|
10
11
|
function runExecutor(options, context) {
|
|
11
12
|
return tslib_1.__asyncGenerator(this, arguments, function* runExecutor_1() {
|
|
12
|
-
var _a, _b
|
|
13
|
-
var
|
|
14
|
-
(_a = (
|
|
13
|
+
var _a, _b;
|
|
14
|
+
var _c;
|
|
15
|
+
(_a = (_c = process.env).NODE_ENV) !== null && _a !== void 0 ? _a : (_c.NODE_ENV = (_b = options.mode) !== null && _b !== void 0 ? _b : 'development');
|
|
15
16
|
if ((0, mode_utils_1.isMode)(process.env.NODE_ENV)) {
|
|
16
17
|
options.mode = process.env.NODE_ENV;
|
|
17
18
|
}
|
|
18
19
|
const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph);
|
|
19
|
-
let devServerConfig = {
|
|
20
|
-
port: (_c = options.port) !== null && _c !== void 0 ? _c : 4200,
|
|
21
|
-
hot: true,
|
|
22
|
-
};
|
|
23
20
|
const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
|
|
21
|
+
let devServerConfig = (0, get_dev_server_config_1.getDevServerOptions)(context.root, options, buildOptions);
|
|
24
22
|
const compiler = yield tslib_1.__await((0, create_compiler_1.createCompiler)(Object.assign(Object.assign({}, buildOptions), { devServer: devServerConfig, mode: options.mode }), context));
|
|
25
23
|
// Use the first one if it's MultiCompiler
|
|
26
24
|
// https://webpack.js.org/configuration/dev-server/#root:~:text=Be%20aware%20that%20when%20exporting%20multiple%20configurations%20only%20the%20devServer%20options%20for%20the%20first%20configuration%20will%20be%20taken%20into%20account%20and%20used%20for%20all%20the%20configurations%20in%20the%20array.
|
|
27
|
-
const firstCompiler = (0, create_compiler_1.isMultiCompiler)(compiler)
|
|
25
|
+
const firstCompiler = (0, create_compiler_1.isMultiCompiler)(compiler)
|
|
26
|
+
? compiler.compilers[0]
|
|
27
|
+
: compiler;
|
|
28
28
|
devServerConfig = Object.assign(Object.assign(Object.assign({}, devServerConfig), firstCompiler.options.devServer), { port: devServerConfig.port });
|
|
29
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, async_iterable_1.createAsyncIterable)(({ next }) => {
|
|
30
|
-
const server = new dev_server_1.RspackDevServer(Object.assign(Object.assign({}, devServerConfig), { onListening: (
|
|
29
|
+
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, async_iterable_1.createAsyncIterable)(({ next }) => {
|
|
30
|
+
const server = new dev_server_1.RspackDevServer(Object.assign(Object.assign({}, devServerConfig), { onListening: () => {
|
|
31
31
|
var _a;
|
|
32
32
|
next({
|
|
33
33
|
success: true,
|
|
@@ -35,7 +35,7 @@ function runExecutor(options, context) {
|
|
|
35
35
|
});
|
|
36
36
|
} }), compiler);
|
|
37
37
|
server.start();
|
|
38
|
-
}))));
|
|
38
|
+
})))));
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=dev-server.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":";;AAcA,8BAuDC;;AArED,uCAIoB;AACpB,wEAA0E;AAE1E,mDAAqD;AACrD,iEAA8E;AAC9E,uDAAgD;AAChD,uEAAkE;AAIlE,SAA+B,WAAW,CACxC,OAAgC,EAChC,OAAwB;;;;QAExB,YAAA,OAAO,CAAC,GAAG,EAAC,Q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EAAE;qBACpD,CAAC,CAAC;gBACL,CAAC,KAGH,QAAQ,CACT,CAAC;YACF,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC,CAAA,CAAA,CAAA,EAAC;IACL,CAAC;CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Configuration as RspackDevServerConfiguration } from '@rspack/dev-server';
|
|
2
|
+
import { RspackExecutorSchema } from '../../rspack/schema';
|
|
3
|
+
import { DevServerExecutorSchema } from '../schema';
|
|
4
|
+
export declare function getDevServerOptions(root: string, serveOptions: DevServerExecutorSchema, buildOptions: RspackExecutorSchema): RspackDevServerConfiguration;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDevServerOptions = getDevServerOptions;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
const serve_path_1 = require("./serve-path");
|
|
9
|
+
function getDevServerOptions(root, serveOptions, buildOptions) {
|
|
10
|
+
const servePath = (0, serve_path_1.buildServePath)(buildOptions);
|
|
11
|
+
let scriptsOptimization;
|
|
12
|
+
let stylesOptimization;
|
|
13
|
+
if (typeof buildOptions.optimization === 'boolean') {
|
|
14
|
+
scriptsOptimization = stylesOptimization = buildOptions.optimization;
|
|
15
|
+
}
|
|
16
|
+
else if (buildOptions.optimization) {
|
|
17
|
+
scriptsOptimization = buildOptions.optimization.scripts;
|
|
18
|
+
stylesOptimization = buildOptions.optimization.styles;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
scriptsOptimization = stylesOptimization = false;
|
|
22
|
+
}
|
|
23
|
+
const config = {
|
|
24
|
+
host: serveOptions.host,
|
|
25
|
+
port: serveOptions.port,
|
|
26
|
+
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
27
|
+
historyApiFallback: {
|
|
28
|
+
index: buildOptions.index &&
|
|
29
|
+
`${servePath}${path.basename(buildOptions.index)}`,
|
|
30
|
+
disableDotRule: true,
|
|
31
|
+
htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'],
|
|
32
|
+
},
|
|
33
|
+
onListening(server) {
|
|
34
|
+
var _a;
|
|
35
|
+
const isHttps = server.options.https ||
|
|
36
|
+
((_a = server.options.server) === null || _a === void 0 ? void 0 : _a.type) === 'https';
|
|
37
|
+
devkit_1.logger.info(`NX Web Development Server is listening at ${isHttps ? 'https' : 'http'}://${server.options.host}:${server.options.port}${(0, serve_path_1.buildServePath)(buildOptions)}`);
|
|
38
|
+
},
|
|
39
|
+
open: false,
|
|
40
|
+
static: false,
|
|
41
|
+
compress: scriptsOptimization || stylesOptimization,
|
|
42
|
+
devMiddleware: {
|
|
43
|
+
publicPath: servePath,
|
|
44
|
+
stats: false,
|
|
45
|
+
},
|
|
46
|
+
client: {
|
|
47
|
+
webSocketURL: serveOptions.publicHost,
|
|
48
|
+
overlay: {
|
|
49
|
+
errors: !(scriptsOptimization || stylesOptimization),
|
|
50
|
+
warnings: false,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
hot: true,
|
|
54
|
+
};
|
|
55
|
+
if (serveOptions.ssl) {
|
|
56
|
+
config.server = {
|
|
57
|
+
type: 'https',
|
|
58
|
+
};
|
|
59
|
+
if (serveOptions.sslKey && serveOptions.sslCert) {
|
|
60
|
+
config.server.options = getSslConfig(root, serveOptions);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return config;
|
|
64
|
+
}
|
|
65
|
+
function getSslConfig(root, options) {
|
|
66
|
+
return {
|
|
67
|
+
key: (0, fs_1.readFileSync)(path.resolve(root, options.sslKey), 'utf-8'),
|
|
68
|
+
cert: (0, fs_1.readFileSync)(path.resolve(root, options.sslCert), 'utf-8'),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=get-dev-server-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-dev-server-config.js","sourceRoot":"","sources":["../../../../../../../packages/rspack/src/executors/dev-server/lib/get-dev-server-config.ts"],"names":[],"mappings":";;AAQA,kDAoEC;;AA5ED,uCAAoC;AAEpC,2BAAkC;AAClC,mDAA6B;AAG7B,6CAA8C;AAE9C,SAAgB,mBAAmB,CACjC,IAAY,EACZ,YAAqC,EACrC,YAAkC;IAElC,MAAM,SAAS,GAAG,IAAA,2BAAc,EAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,mBAA4B,CAAC;IACjC,IAAI,kBAA2B,CAAC;IAChC,IAAI,OAAO,YAAY,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnD,mBAAmB,GAAG,kBAAkB,GAAG,YAAY,CAAC,YAAY,CAAC;IACvE,CAAC;SAAM,IAAI,YAAY,CAAC,YAAY,EAAE,CAAC;QACrC,mBAAmB,GAAG,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC;QACxD,kBAAkB,GAAG,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC;IACxD,CAAC;SAAM,CAAC;QACN,mBAAmB,GAAG,kBAAkB,GAAG,KAAK,CAAC;IACnD,CAAC;IAED,MAAM,MAAM,GAAiC;QAC3C,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,OAAO,EAAE,EAAE,6BAA6B,EAAE,GAAG,EAAE;QAC/C,kBAAkB,EAAE;YAClB,KAAK,EACH,YAAY,CAAC,KAAK;gBAClB,GAAG,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YACpD,cAAc,EAAE,IAAI;YACpB,iBAAiB,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC;SAC1D;QACD,WAAW,CAAC,MAAM;;YAChB,MAAM,OAAO,GACX,MAAM,CAAC,OAAO,CAAC,KAAK;gBACp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AAO,CAAC,EAAE,OAAO,CAAC;KACjE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildServePath = buildServePath;
|
|
4
|
+
exports._findDefaultServePath = _findDefaultServePath;
|
|
5
|
+
function buildServePath(browserOptions) {
|
|
6
|
+
let servePath = _findDefaultServePath(browserOptions.baseHref, browserOptions.deployUrl) ||
|
|
7
|
+
'/';
|
|
8
|
+
if (servePath.endsWith('/')) {
|
|
9
|
+
servePath = servePath.slice(0, -1);
|
|
10
|
+
}
|
|
11
|
+
if (!servePath.startsWith('/')) {
|
|
12
|
+
servePath = `/${servePath}`;
|
|
13
|
+
}
|
|
14
|
+
return servePath;
|
|
15
|
+
}
|
|
16
|
+
function _findDefaultServePath(baseHref, deployUrl) {
|
|
17
|
+
if (!baseHref && !deployUrl) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
if (/^(\w+:)?\/\//.test(baseHref || '') ||
|
|
21
|
+
/^(\w+:)?\/\//.test(deployUrl || '')) {
|
|
22
|
+
// If baseHref or deployUrl is absolute, unsupported by nx serve
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
// normalize baseHref
|
|
26
|
+
// for nx serve the starting base is always `/` so a relative
|
|
27
|
+
// and root relative value are identical
|
|
28
|
+
const baseHrefParts = (baseHref || '')
|
|
29
|
+
.split('/')
|
|
30
|
+
.filter((part) => part !== '');
|
|
31
|
+
if (baseHref && !baseHref.endsWith('/')) {
|
|
32
|
+
baseHrefParts.pop();
|
|
33
|
+
}
|
|
34
|
+
const normalizedBaseHref = baseHrefParts.length === 0 ? '/' : `/${baseHrefParts.join('/')}/`;
|
|
35
|
+
if (deployUrl && deployUrl[0] === '/') {
|
|
36
|
+
if (baseHref && baseHref[0] === '/' && normalizedBaseHref !== deployUrl) {
|
|
37
|
+
// If baseHref and deployUrl are root relative and not equivalent, unsupported by nx serve
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return deployUrl;
|
|
41
|
+
}
|
|
42
|
+
// Join together baseHref and deployUrl
|
|
43
|
+
return `${normalizedBaseHref}${deployUrl || ''}`;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=serve-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve-path.js","sourceRoot":"","sources":["../../../../../../../packages/rspack/src/executors/dev-server/lib/serve-path.ts"],"names":[],"mappings":";;AAEA,wCAYC;AAED,sDAuCC;AArDD,SAAgB,cAAc,CAAC,cAAoC;IACjE,IAAI,SAAS,GACX,qBAAqB,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,SAAS,CAAC;QACxE,GAAG,CAAC;IACN,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5B,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,qBAAqB,CACnC,QAAiB,EACjB,SAAkB;IAElB,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IACE,cAAc,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;QACnC,cAAc,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,EACpC,CAAC;QACD,gEAAgE;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,qBAAqB;IACrB,6DAA6D;IAC7D,wCAAwC;IACxC,MAAM,aAAa,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;SACnC,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACjC,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxC,aAAa,CAAC,GAAG,EAAE,CAAC;IACtB,CAAC;IACD,MAAM,kBAAkB,GACtB,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAEpE,IAAI,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACtC,IAAI,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACxE,0FAA0F;YAC1F,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,uCAAuC;IACvC,OAAO,GAAG,kBAAkB,GAAG,SAAS,IAAI,EAAE,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -16,8 +16,36 @@
|
|
|
16
16
|
"mode": {
|
|
17
17
|
"type": "string",
|
|
18
18
|
"description": "Mode to run the server in.",
|
|
19
|
-
"enum": [
|
|
19
|
+
"enum": [
|
|
20
|
+
"development",
|
|
21
|
+
"production",
|
|
22
|
+
"none"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"host": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Host to listen on.",
|
|
28
|
+
"default": "localhost"
|
|
29
|
+
},
|
|
30
|
+
"ssl": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Serve using `HTTPS`.",
|
|
33
|
+
"default": false
|
|
34
|
+
},
|
|
35
|
+
"sslKey": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "SSL key to use for serving `HTTPS`."
|
|
38
|
+
},
|
|
39
|
+
"sslCert": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "SSL certificate to use for serving `HTTPS`."
|
|
42
|
+
},
|
|
43
|
+
"publicHost": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Public URL where the application will be served."
|
|
20
46
|
}
|
|
21
47
|
},
|
|
22
|
-
"required": [
|
|
48
|
+
"required": [
|
|
49
|
+
"buildTarget"
|
|
50
|
+
]
|
|
23
51
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { DevServerExecutorSchema } from '../dev-server/schema';
|
|
3
|
+
type ModuleFederationDevServerOptions = DevServerExecutorSchema & {
|
|
4
|
+
devRemotes?: (string | {
|
|
5
|
+
remoteName: string;
|
|
6
|
+
configuration: string;
|
|
7
|
+
})[];
|
|
8
|
+
skipRemotes?: string[];
|
|
9
|
+
static?: boolean;
|
|
10
|
+
isInitialHost?: boolean;
|
|
11
|
+
parallel?: number;
|
|
12
|
+
staticRemotesPort?: number;
|
|
13
|
+
pathToManifestFile?: string;
|
|
14
|
+
};
|
|
15
|
+
export default function moduleFederationDevServer(options: ModuleFederationDevServerOptions, context: ExecutorContext): AsyncIterableIterator<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
}>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = moduleFederationDevServer;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
7
|
+
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
8
|
+
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const node_child_process_1 = require("node:child_process");
|
|
11
|
+
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
12
|
+
const path_1 = require("path");
|
|
13
|
+
const module_federation_1 = require("../../utils/module-federation");
|
|
14
|
+
const parse_static_remotes_config_1 = require("../../utils/module-federation/parse-static-remotes-config");
|
|
15
|
+
const start_remote_proxies_1 = require("../../utils/module-federation/start-remote-proxies");
|
|
16
|
+
const dev_server_impl_1 = tslib_1.__importDefault(require("../dev-server/dev-server.impl"));
|
|
17
|
+
function getBuildOptions(buildTarget, context) {
|
|
18
|
+
const target = (0, devkit_1.parseTargetString)(buildTarget, context);
|
|
19
|
+
const buildOptions = (0, devkit_1.readTargetOptions)(target, context);
|
|
20
|
+
return Object.assign({}, buildOptions);
|
|
21
|
+
}
|
|
22
|
+
function startStaticRemotesFileServer(staticRemotesConfig, context, options) {
|
|
23
|
+
if (!staticRemotesConfig.remotes ||
|
|
24
|
+
staticRemotesConfig.remotes.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
let shouldMoveToCommonLocation = false;
|
|
28
|
+
let commonOutputDirectory;
|
|
29
|
+
for (const app of staticRemotesConfig.remotes) {
|
|
30
|
+
const remoteBasePath = staticRemotesConfig.config[app].basePath;
|
|
31
|
+
if (!commonOutputDirectory) {
|
|
32
|
+
commonOutputDirectory = remoteBasePath;
|
|
33
|
+
}
|
|
34
|
+
else if (commonOutputDirectory !== remoteBasePath) {
|
|
35
|
+
shouldMoveToCommonLocation = true;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (shouldMoveToCommonLocation) {
|
|
40
|
+
commonOutputDirectory = (0, path_1.join)(devkit_1.workspaceRoot, 'tmp/static-remotes');
|
|
41
|
+
for (const app of staticRemotesConfig.remotes) {
|
|
42
|
+
const remoteConfig = staticRemotesConfig.config[app];
|
|
43
|
+
(0, fs_1.cpSync)(remoteConfig.outputPath, (0, path_1.join)(commonOutputDirectory, remoteConfig.urlSegment), {
|
|
44
|
+
force: true,
|
|
45
|
+
recursive: true,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const staticRemotesIter = (0, file_server_impl_1.default)({
|
|
50
|
+
cors: true,
|
|
51
|
+
watch: false,
|
|
52
|
+
staticFilePath: commonOutputDirectory,
|
|
53
|
+
parallel: false,
|
|
54
|
+
spa: false,
|
|
55
|
+
withDeps: false,
|
|
56
|
+
host: options.host,
|
|
57
|
+
port: options.staticRemotesPort,
|
|
58
|
+
ssl: options.ssl,
|
|
59
|
+
sslCert: options.sslCert,
|
|
60
|
+
sslKey: options.sslKey,
|
|
61
|
+
cacheSeconds: -1,
|
|
62
|
+
}, context);
|
|
63
|
+
return staticRemotesIter;
|
|
64
|
+
}
|
|
65
|
+
function startRemotes(remotes_1, context_1, options_1) {
|
|
66
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (remotes, context, options, target = 'serve') {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
const remoteIters = [];
|
|
69
|
+
for (const app of remotes) {
|
|
70
|
+
const remoteProjectServeTarget = context.projectGraph.nodes[app].data.targets[target];
|
|
71
|
+
const isUsingModuleFederationDevServerExecutor = remoteProjectServeTarget.executor.includes('module-federation-dev-server');
|
|
72
|
+
const configurationOverride = (_b = (_a = options.devRemotes) === null || _a === void 0 ? void 0 : _a.find((r) => typeof r !== 'string' && r.remoteName === app)) === null || _b === void 0 ? void 0 : _b.configuration;
|
|
73
|
+
const defaultOverrides = Object.assign(Object.assign(Object.assign(Object.assign({}, (options.host ? { host: options.host } : {})), (options.ssl ? { ssl: options.ssl } : {})), (options.sslCert ? { sslCert: options.sslCert } : {})), (options.sslKey ? { sslKey: options.sslKey } : {}));
|
|
74
|
+
const overrides = target === 'serve'
|
|
75
|
+
? Object.assign(Object.assign({ watch: true }, (isUsingModuleFederationDevServerExecutor
|
|
76
|
+
? { isInitialHost: false }
|
|
77
|
+
: {})), defaultOverrides) : Object.assign({}, defaultOverrides);
|
|
78
|
+
remoteIters.push(yield (0, devkit_1.runExecutor)({
|
|
79
|
+
project: app,
|
|
80
|
+
target,
|
|
81
|
+
configuration: configurationOverride !== null && configurationOverride !== void 0 ? configurationOverride : context.configurationName,
|
|
82
|
+
}, overrides, context));
|
|
83
|
+
}
|
|
84
|
+
return remoteIters;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function buildStaticRemotes(staticRemotesConfig, nxBin, context, options) {
|
|
88
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (!staticRemotesConfig.remotes.length) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
devkit_1.logger.info(`NX Building ${staticRemotesConfig.remotes.length} static remotes...`);
|
|
93
|
+
const mappedLocationOfRemotes = {};
|
|
94
|
+
for (const app of staticRemotesConfig.remotes) {
|
|
95
|
+
mappedLocationOfRemotes[app] = `http${options.ssl ? 's' : ''}://${options.host}:${options.staticRemotesPort}/${staticRemotesConfig.config[app].urlSegment}`;
|
|
96
|
+
}
|
|
97
|
+
yield new Promise((res, rej) => {
|
|
98
|
+
const staticProcess = (0, node_child_process_1.fork)(nxBin, [
|
|
99
|
+
'run-many',
|
|
100
|
+
`--target=build`,
|
|
101
|
+
`--projects=${staticRemotesConfig.remotes.join(',')}`,
|
|
102
|
+
...(context.configurationName
|
|
103
|
+
? [`--configuration=${context.configurationName}`]
|
|
104
|
+
: []),
|
|
105
|
+
...(options.parallel ? [`--parallel=${options.parallel}`] : []),
|
|
106
|
+
], {
|
|
107
|
+
cwd: context.root,
|
|
108
|
+
stdio: ['ignore', 'pipe', 'pipe', 'ipc'],
|
|
109
|
+
});
|
|
110
|
+
// File to debug build failures e.g. 2024-01-01T00_00_0_0Z-build.log'
|
|
111
|
+
const remoteBuildLogFile = (0, path_1.join)(cache_directory_1.workspaceDataDirectory,
|
|
112
|
+
// eslint-disable-next-line
|
|
113
|
+
`${new Date().toISOString().replace(/[:\.]/g, '_')}-build.log`);
|
|
114
|
+
const stdoutStream = (0, fs_1.createWriteStream)(remoteBuildLogFile);
|
|
115
|
+
staticProcess.stdout.on('data', (data) => {
|
|
116
|
+
const ANSII_CODE_REGEX =
|
|
117
|
+
// eslint-disable-next-line no-control-regex
|
|
118
|
+
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
|
119
|
+
const stdoutString = data.toString().replace(ANSII_CODE_REGEX, '');
|
|
120
|
+
stdoutStream.write(stdoutString);
|
|
121
|
+
// in addition to writing into the stdout stream, also show error directly in console
|
|
122
|
+
// so the error is easily discoverable. 'ERROR in' is the key word to search in webpack output.
|
|
123
|
+
if (stdoutString.includes('ERROR in')) {
|
|
124
|
+
devkit_1.logger.log(stdoutString);
|
|
125
|
+
}
|
|
126
|
+
if (stdoutString.includes('Successfully ran target build')) {
|
|
127
|
+
staticProcess.stdout.removeAllListeners('data');
|
|
128
|
+
devkit_1.logger.info(`NX Built ${staticRemotesConfig.remotes.length} static remotes`);
|
|
129
|
+
res();
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
staticProcess.stderr.on('data', (data) => devkit_1.logger.info(data.toString()));
|
|
133
|
+
staticProcess.once('exit', (code) => {
|
|
134
|
+
stdoutStream.end();
|
|
135
|
+
staticProcess.stdout.removeAllListeners('data');
|
|
136
|
+
staticProcess.stderr.removeAllListeners('data');
|
|
137
|
+
if (code !== 0) {
|
|
138
|
+
rej(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
res();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
process.on('SIGTERM', () => staticProcess.kill('SIGTERM'));
|
|
145
|
+
process.on('exit', () => staticProcess.kill('SIGTERM'));
|
|
146
|
+
});
|
|
147
|
+
return mappedLocationOfRemotes;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function moduleFederationDevServer(options, context) {
|
|
151
|
+
return tslib_1.__asyncGenerator(this, arguments, function* moduleFederationDevServer_1() {
|
|
152
|
+
var _a, _b, _c;
|
|
153
|
+
// Force Node to resolve to look for the nx binary that is inside node_modules
|
|
154
|
+
const nxBin = require.resolve('nx/bin/nx');
|
|
155
|
+
const currIter = options.static
|
|
156
|
+
? (0, file_server_impl_1.default)(Object.assign(Object.assign({}, options), { parallel: false, withDeps: false, spa: false, cors: true, cacheSeconds: -1 }), context)
|
|
157
|
+
: (0, dev_server_impl_1.default)(options, context);
|
|
158
|
+
const p = context.projectsConfigurations.projects[context.projectName];
|
|
159
|
+
const buildOptions = getBuildOptions(options.buildTarget, context);
|
|
160
|
+
let pathToManifestFile = (0, path_1.join)(context.root, p.sourceRoot, 'assets/module-federation.manifest.json');
|
|
161
|
+
if (options.pathToManifestFile) {
|
|
162
|
+
const userPathToManifestFile = (0, path_1.join)(context.root, options.pathToManifestFile);
|
|
163
|
+
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
164
|
+
throw new Error(`The provided Module Federation manifest file path does not exist. Please check the file exists at "${userPathToManifestFile}".`);
|
|
165
|
+
}
|
|
166
|
+
else if ((0, path_1.extname)(options.pathToManifestFile) !== '.json') {
|
|
167
|
+
throw new Error(`The Module Federation manifest file must be a JSON. Please ensure the file at ${userPathToManifestFile} is a JSON.`);
|
|
168
|
+
}
|
|
169
|
+
pathToManifestFile = userPathToManifestFile;
|
|
170
|
+
}
|
|
171
|
+
if (!options.isInitialHost) {
|
|
172
|
+
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(currIter))));
|
|
173
|
+
}
|
|
174
|
+
const moduleFederationConfig = (0, module_federation_1.getModuleFederationConfig)(buildOptions.tsConfig, context.root, p.root, 'react');
|
|
175
|
+
const remoteNames = (_a = options.devRemotes) === null || _a === void 0 ? void 0 : _a.map((r) => typeof r === 'string' ? r : r.remoteName);
|
|
176
|
+
const remotes = (0, module_federation_1.getRemotes)(remoteNames, options.skipRemotes, moduleFederationConfig, {
|
|
177
|
+
projectName: context.projectName,
|
|
178
|
+
projectGraph: context.projectGraph,
|
|
179
|
+
root: context.root,
|
|
180
|
+
}, pathToManifestFile);
|
|
181
|
+
(_b = options.staticRemotesPort) !== null && _b !== void 0 ? _b : (options.staticRemotesPort = remotes.staticRemotePort);
|
|
182
|
+
// Set NX_MF_DEV_REMOTES for the Nx Runtime Library Control Plugin
|
|
183
|
+
process.env.NX_MF_DEV_REMOTES = JSON.stringify([
|
|
184
|
+
...((_c = remotes.devRemotes.map((r) => typeof r === 'string' ? r : r.remoteName)) !== null && _c !== void 0 ? _c : []),
|
|
185
|
+
p.name,
|
|
186
|
+
]);
|
|
187
|
+
const staticRemotesConfig = (0, parse_static_remotes_config_1.parseStaticRemotesConfig)([...remotes.staticRemotes, ...remotes.dynamicRemotes], context);
|
|
188
|
+
const mappedLocationsOfStaticRemotes = yield tslib_1.__await(buildStaticRemotes(staticRemotesConfig, nxBin, context, options));
|
|
189
|
+
const devRemoteIters = yield tslib_1.__await(startRemotes(remotes.devRemotes, context, options, 'serve'));
|
|
190
|
+
const staticRemotesIter = startStaticRemotesFileServer(staticRemotesConfig, context, options);
|
|
191
|
+
(0, start_remote_proxies_1.startRemoteProxies)(staticRemotesConfig, mappedLocationsOfStaticRemotes, options.ssl
|
|
192
|
+
? {
|
|
193
|
+
pathToCert: (0, path_1.join)(devkit_1.workspaceRoot, options.sslCert),
|
|
194
|
+
pathToKey: (0, path_1.join)(devkit_1.workspaceRoot, options.sslKey),
|
|
195
|
+
}
|
|
196
|
+
: undefined);
|
|
197
|
+
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, async_iterable_1.combineAsyncIterables)(currIter, ...devRemoteIters, ...(staticRemotesIter ? [staticRemotesIter] : []), (0, async_iterable_1.createAsyncIterable)((_a) => tslib_1.__awaiter(this, [_a], void 0, function* ({ next, done }) {
|
|
198
|
+
var _b;
|
|
199
|
+
if (!options.isInitialHost) {
|
|
200
|
+
done();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (remotes.remotePorts.length === 0) {
|
|
204
|
+
done();
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
try {
|
|
208
|
+
const host = (_b = options.host) !== null && _b !== void 0 ? _b : 'localhost';
|
|
209
|
+
const baseUrl = `http${options.ssl ? 's' : ''}://${host}:${options.port}`;
|
|
210
|
+
const portsToWaitFor = staticRemotesIter
|
|
211
|
+
? [options.staticRemotesPort, ...remotes.remotePorts]
|
|
212
|
+
: [...remotes.remotePorts];
|
|
213
|
+
yield Promise.all(portsToWaitFor.map((port) => (0, wait_for_port_open_1.waitForPortOpen)(port, {
|
|
214
|
+
retries: 480,
|
|
215
|
+
retryDelay: 2500,
|
|
216
|
+
host: host,
|
|
217
|
+
})));
|
|
218
|
+
devkit_1.logger.info(`NX All remotes started, server ready at ${baseUrl}`);
|
|
219
|
+
next({ success: true, baseUrl: baseUrl });
|
|
220
|
+
}
|
|
221
|
+
catch (err) {
|
|
222
|
+
throw new Error(`Failed to start remotes. Check above for any errors.`);
|
|
223
|
+
}
|
|
224
|
+
finally {
|
|
225
|
+
done();
|
|
226
|
+
}
|
|
227
|
+
})))))));
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=module-federation-dev-server.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-federation-dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":";;AAsQA,4CAiKC;;AAvaD,uCAOoB;AACpB,wEAG6C;AAC7C,kHAAoF;AACpF,6EAAuE;AACvE,2BAA2D;AAC3D,2DAA0C;AAC1C,kEAAsE;AACtE,+BAAqC;AACrC,qEAGuC;AACvC,2GAGmE;AACnE,6FAAwF;AACxF,4F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