@nx/angular 19.6.0-canary.20240724-684d2a9 → 19.6.0-canary.20240726-b3c67de
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/mf/mf.mjs +5 -2
- package/fesm2022/nx-angular-mf.mjs +4 -1
- package/fesm2022/nx-angular-mf.mjs.map +1 -1
- package/mf/mf.d.ts +1 -0
- package/migrations.json +16 -0
- package/package.json +8 -8
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +10 -3
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/esm2022/mf/mf.mjs
CHANGED
@@ -2,10 +2,13 @@ let resolveRemoteUrl;
|
|
2
2
|
export function setRemoteUrlResolver(_resolveRemoteUrl) {
|
3
3
|
resolveRemoteUrl = _resolveRemoteUrl;
|
4
4
|
}
|
5
|
-
let remoteUrlDefinitions;
|
5
|
+
let remoteUrlDefinitions = {};
|
6
6
|
export function setRemoteDefinitions(definitions) {
|
7
7
|
remoteUrlDefinitions = definitions;
|
8
8
|
}
|
9
|
+
export function setRemoteDefinition(remoteName, remoteUrl) {
|
10
|
+
remoteUrlDefinitions[remoteName] = remoteUrl;
|
11
|
+
}
|
9
12
|
let remoteModuleMap = new Map();
|
10
13
|
let remoteContainerMap = new Map();
|
11
14
|
export async function loadRemoteModule(remoteName, moduleName) {
|
@@ -45,4 +48,4 @@ async function loadRemoteContainer(remoteName) {
|
|
45
48
|
remoteContainerMap.set(remoteName, container);
|
46
49
|
return container;
|
47
50
|
}
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyL21mL21mLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU9BLElBQUksZ0JBQTBDLENBQUM7QUFDL0MsTUFBTSxVQUFVLG9CQUFvQixDQU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haW5lclVybCA9IGAke3JlbW90ZVVybH0ke1xuICAgICAgcmVtb3RlVXJsLmVuZHNXaXRoKCcvJykgPyAnJyA6ICcvJ1xuICAgIH1yZW1vdGVFbnRyeS5tanNgO1xuICB9XG5cbiAgY29uc3QgY29udGFpbmVyID0gYXdhaXQgbG9hZE1vZHVsZShjb250YWluZXJVcmwpO1xuICBhd2FpdCBjb250YWluZXIuaW5pdChfX3dlYnBhY2tfc2hhcmVfc2NvcGVzX18uZGVmYXVsdCk7XG5cbiAgcmVtb3RlQ29udGFpbmVyTWFwLnNldChyZW1vdGVOYW1lLCBjb250YWluZXIpO1xuICByZXR1cm4gY29udGFpbmVyO1xufVxuIl19
|
@@ -2,10 +2,13 @@ let resolveRemoteUrl;
|
|
2
2
|
function setRemoteUrlResolver(_resolveRemoteUrl) {
|
3
3
|
resolveRemoteUrl = _resolveRemoteUrl;
|
4
4
|
}
|
5
|
-
let remoteUrlDefinitions;
|
5
|
+
let remoteUrlDefinitions = {};
|
6
6
|
function setRemoteDefinitions(definitions) {
|
7
7
|
remoteUrlDefinitions = definitions;
|
8
8
|
}
|
9
|
+
function setRemoteDefinition(remoteName, remoteUrl) {
|
10
|
+
remoteUrlDefinitions[remoteName] = remoteUrl;
|
11
|
+
}
|
9
12
|
let remoteModuleMap = new Map();
|
10
13
|
let remoteContainerMap = new Map();
|
11
14
|
async function loadRemoteModule(remoteName, moduleName) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nx-angular-mf.mjs","sources":["../../../../packages/angular/mf/mf.ts","../../../../packages/angular/mf/nx-angular-mf.ts"],"sourcesContent":["export type ResolveRemoteUrlFunction = (\n remoteName: string\n) => string | Promise<string>;\n\ndeclare const __webpack_init_sharing__: (scope: 'default') => Promise<void>;\ndeclare const __webpack_share_scopes__: { default: unknown };\n\nlet resolveRemoteUrl: ResolveRemoteUrlFunction;\nexport function setRemoteUrlResolver(\n _resolveRemoteUrl: ResolveRemoteUrlFunction\n) {\n resolveRemoteUrl = _resolveRemoteUrl;\n}\n\nlet remoteUrlDefinitions: Record<string, string
|
1
|
+
{"version":3,"file":"nx-angular-mf.mjs","sources":["../../../../packages/angular/mf/mf.ts","../../../../packages/angular/mf/nx-angular-mf.ts"],"sourcesContent":["export type ResolveRemoteUrlFunction = (\n remoteName: string\n) => string | Promise<string>;\n\ndeclare const __webpack_init_sharing__: (scope: 'default') => Promise<void>;\ndeclare const __webpack_share_scopes__: { default: unknown };\n\nlet resolveRemoteUrl: ResolveRemoteUrlFunction;\nexport function setRemoteUrlResolver(\n _resolveRemoteUrl: ResolveRemoteUrlFunction\n) {\n resolveRemoteUrl = _resolveRemoteUrl;\n}\n\nlet remoteUrlDefinitions: Record<string, string> = {};\nexport function setRemoteDefinitions(definitions: Record<string, string>) {\n remoteUrlDefinitions = definitions;\n}\n\nexport function setRemoteDefinition(remoteName: string, remoteUrl: string) {\n remoteUrlDefinitions[remoteName] = remoteUrl;\n}\n\nlet remoteModuleMap = new Map<string, unknown>();\nlet remoteContainerMap = new Map<string, unknown>();\nexport async function loadRemoteModule(remoteName: string, moduleName: string) {\n const remoteModuleKey = `${remoteName}:${moduleName}`;\n if (remoteModuleMap.has(remoteModuleKey)) {\n return remoteModuleMap.get(remoteModuleKey);\n }\n\n const container = remoteContainerMap.has(remoteName)\n ? remoteContainerMap.get(remoteName)\n : await loadRemoteContainer(remoteName);\n\n const factory = await container.get(moduleName);\n const Module = factory();\n\n remoteModuleMap.set(remoteModuleKey, Module);\n\n return Module;\n}\n\nfunction loadModule(url: string) {\n return import(/* webpackIgnore:true */ url);\n}\n\nlet initialSharingScopeCreated = false;\nasync function loadRemoteContainer(remoteName: string) {\n if (!resolveRemoteUrl && !remoteUrlDefinitions) {\n throw new Error(\n 'Call setRemoteDefinitions or setRemoteUrlResolver to allow Dynamic Federation to find the remote apps correctly.'\n );\n }\n\n if (!initialSharingScopeCreated) {\n initialSharingScopeCreated = true;\n await __webpack_init_sharing__('default');\n }\n\n const remoteUrl = remoteUrlDefinitions\n ? remoteUrlDefinitions[remoteName]\n : await resolveRemoteUrl(remoteName);\n\n let containerUrl = remoteUrl;\n if (!remoteUrl.endsWith('.mjs') && !remoteUrl.endsWith('.js')) {\n containerUrl = `${remoteUrl}${\n remoteUrl.endsWith('/') ? '' : '/'\n }remoteEntry.mjs`;\n }\n\n const container = await loadModule(containerUrl);\n await container.init(__webpack_share_scopes__.default);\n\n remoteContainerMap.set(remoteName, container);\n return container;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAOA,IAAI,gBAA0C,CAAC;AACzC,SAAU,oBAAoB,CAClC,iBAA2C,EAAA;IAE3C,gBAAgB,GAAG,iBAAiB,CAAC;AACvC,CAAC;AAED,IAAI,oBAAoB,GAA2B,EAAE,CAAC;AAChD,SAAU,oBAAoB,CAAC,WAAmC,EAAA;IACtE,oBAAoB,GAAG,WAAW,CAAC;AACrC,CAAC;AAEe,SAAA,mBAAmB,CAAC,UAAkB,EAAE,SAAiB,EAAA;AACvE,IAAA,oBAAoB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;AAC/C,CAAC;AAED,IAAI,eAAe,GAAG,IAAI,GAAG,EAAmB,CAAC;AACjD,IAAI,kBAAkB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAC7C,eAAe,gBAAgB,CAAC,UAAkB,EAAE,UAAkB,EAAA;AAC3E,IAAA,MAAM,eAAe,GAAG,CAAA,EAAG,UAAU,CAAI,CAAA,EAAA,UAAU,EAAE,CAAC;AACtD,IAAA,IAAI,eAAe,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE;AACxC,QAAA,OAAO,eAAe,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;KAC7C;AAED,IAAA,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC;AAClD,UAAE,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC;AACpC,UAAE,MAAM,mBAAmB,CAAC,UAAU,CAA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C,UAAU,EAAE,SAAS,CAAC,CAAC;AAC9C,IAAA,OAAO,SAAS,CAAC;AACnB;;AC5EA;;AAEG;;;;"}
|
package/mf/mf.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export type ResolveRemoteUrlFunction = (remoteName: string) => string | Promise<string>;
|
2
2
|
export declare function setRemoteUrlResolver(_resolveRemoteUrl: ResolveRemoteUrlFunction): void;
|
3
3
|
export declare function setRemoteDefinitions(definitions: Record<string, string>): void;
|
4
|
+
export declare function setRemoteDefinition(remoteName: string, remoteUrl: string): void;
|
4
5
|
export declare function loadRemoteModule(remoteName: string, moduleName: string): Promise<any>;
|
package/migrations.json
CHANGED
@@ -2012,6 +2012,22 @@
|
|
2012
2012
|
"alwaysAddToPackageJson": false
|
2013
2013
|
}
|
2014
2014
|
}
|
2015
|
+
},
|
2016
|
+
"19.5.4-ngrx": {
|
2017
|
+
"version": "19.5.4-beta.0",
|
2018
|
+
"requires": {
|
2019
|
+
"@angular/core": "^18.0.0"
|
2020
|
+
},
|
2021
|
+
"packages": {
|
2022
|
+
"@ngrx/store": {
|
2023
|
+
"version": "^18.0.1",
|
2024
|
+
"alwaysAddToPackageJson": false
|
2025
|
+
},
|
2026
|
+
"@ngrx/operators": {
|
2027
|
+
"version": "^18.0.1",
|
2028
|
+
"alwaysAddToPackageJson": false
|
2029
|
+
}
|
2030
|
+
}
|
2015
2031
|
}
|
2016
2032
|
}
|
2017
2033
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "19.6.0-canary.
|
3
|
+
"version": "19.6.0-canary.20240726-b3c67de",
|
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, 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": {
|
@@ -80,14 +80,14 @@
|
|
80
80
|
"webpack-merge": "^5.8.0",
|
81
81
|
"webpack": "^5.88.0",
|
82
82
|
"@module-federation/enhanced": "~0.2.3",
|
83
|
-
"@nx/devkit": "19.6.0-canary.
|
84
|
-
"@nx/js": "19.6.0-canary.
|
85
|
-
"@nx/eslint": "19.6.0-canary.
|
86
|
-
"@nx/webpack": "19.6.0-canary.
|
87
|
-
"@nx/web": "19.6.0-canary.
|
88
|
-
"@nx/workspace": "19.6.0-canary.
|
83
|
+
"@nx/devkit": "19.6.0-canary.20240726-b3c67de",
|
84
|
+
"@nx/js": "19.6.0-canary.20240726-b3c67de",
|
85
|
+
"@nx/eslint": "19.6.0-canary.20240726-b3c67de",
|
86
|
+
"@nx/webpack": "19.6.0-canary.20240726-b3c67de",
|
87
|
+
"@nx/web": "19.6.0-canary.20240726-b3c67de",
|
88
|
+
"@nx/workspace": "19.6.0-canary.20240726-b3c67de",
|
89
89
|
"piscina": "^4.4.0",
|
90
|
-
"@nrwl/angular": "19.6.0-canary.
|
90
|
+
"@nrwl/angular": "19.6.0-canary.20240726-b3c67de"
|
91
91
|
},
|
92
92
|
"peerDependencies": {
|
93
93
|
"@angular-devkit/build-angular": ">= 16.0.0 < 19.0.0",
|
@@ -14,7 +14,7 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
14
14
|
for (const app of staticRemotesConfig.remotes) {
|
15
15
|
mappedLocationOfRemotes[app] = `http${options.ssl ? 's' : ''}://${options.host}:${options.staticRemotesPort}/${staticRemotesConfig.config[app].urlSegment}`;
|
16
16
|
}
|
17
|
-
await new Promise((res) => {
|
17
|
+
await new Promise((res, rej) => {
|
18
18
|
devkit_1.logger.info(`NX Building ${staticRemotesConfig.remotes.length} static remotes...`);
|
19
19
|
const staticProcess = (0, node_child_process_1.fork)(nxBin, [
|
20
20
|
'run-many',
|
@@ -35,6 +35,11 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
35
35
|
const ANSII_CODE_REGEX = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
36
36
|
const stdoutString = data.toString().replace(ANSII_CODE_REGEX, '');
|
37
37
|
stdoutStream.write(stdoutString);
|
38
|
+
// in addition to writing into the stdout stream, also show error directly in console
|
39
|
+
// so the error is easily discoverable. 'ERROR in' is the key word to search in webpack output.
|
40
|
+
if (stdoutString.includes('ERROR in')) {
|
41
|
+
devkit_1.logger.log(stdoutString);
|
42
|
+
}
|
38
43
|
if (stdoutString.includes('Successfully ran target build')) {
|
39
44
|
staticProcess.stdout.removeAllListeners('data');
|
40
45
|
devkit_1.logger.info(`NX Built ${staticRemotesConfig.remotes.length} static remotes`);
|
@@ -47,9 +52,11 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
47
52
|
staticProcess.stdout.removeAllListeners('data');
|
48
53
|
staticProcess.stderr.removeAllListeners('data');
|
49
54
|
if (code !== 0) {
|
50
|
-
|
55
|
+
rej(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
res();
|
51
59
|
}
|
52
|
-
res();
|
53
60
|
});
|
54
61
|
process.on('SIGTERM', () => staticProcess.kill('SIGTERM'));
|
55
62
|
process.on('exit', () => staticProcess.kill('SIGTERM'));
|
package/src/utils/versions.d.ts
CHANGED
@@ -2,7 +2,7 @@ export declare const nxVersion: any;
|
|
2
2
|
export declare const angularVersion = "~18.1.0";
|
3
3
|
export declare const angularDevkitVersion = "~18.1.0";
|
4
4
|
export declare const ngPackagrVersion = "~18.1.0";
|
5
|
-
export declare const ngrxVersion = "^18.0.
|
5
|
+
export declare const ngrxVersion = "^18.0.1";
|
6
6
|
export declare const rxjsVersion = "~7.8.0";
|
7
7
|
export declare const zoneJsVersion = "~0.14.3";
|
8
8
|
export declare const angularJsVersion = "1.7.9";
|
package/src/utils/versions.js
CHANGED
@@ -5,7 +5,7 @@ exports.nxVersion = require('../../package.json').version;
|
|
5
5
|
exports.angularVersion = '~18.1.0';
|
6
6
|
exports.angularDevkitVersion = '~18.1.0';
|
7
7
|
exports.ngPackagrVersion = '~18.1.0';
|
8
|
-
exports.ngrxVersion = '^18.0.
|
8
|
+
exports.ngrxVersion = '^18.0.1';
|
9
9
|
exports.rxjsVersion = '~7.8.0';
|
10
10
|
exports.zoneJsVersion = '~0.14.3';
|
11
11
|
exports.angularJsVersion = '1.7.9';
|