Skip to content

Commit fbd2b4b

Browse files
committed
feat(mf): skip-confirmation withholds the question about webpack
1 parent b5abc28 commit fbd2b4b

File tree

9 files changed

+17
-10
lines changed

9 files changed

+17
-10
lines changed

libs/mf-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@angular-architects/module-federation-runtime",
33
"license": "MIT",
4-
"version": "19.0.2",
4+
"version": "19.0.3",
55
"peerDependencies": {
66
"@angular/common": ">=18.0.0",
77
"@angular/core": ">=18.0.0",

libs/mf-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation-tools",
3-
"version": "19.0.2",
3+
"version": "19.0.3",
44
"license": "MIT",
55
"peerDependencies": {},
66
"dependencies": {

libs/mf/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation",
3-
"version": "19.0.2",
3+
"version": "19.0.3",
44
"license": "MIT",
55
"repository": {
66
"type": "GitHub",
@@ -17,7 +17,7 @@
1717
"schematics": "./collection.json",
1818
"builders": "./builders.json",
1919
"dependencies": {
20-
"@angular-architects/module-federation-runtime": "19.0.2",
20+
"@angular-architects/module-federation-runtime": "19.0.3",
2121
"word-wrap": "^1.2.3",
2222
"callsite": "^1.0.0",
2323
"node-fetch": "^2.6.7",

libs/mf/src/schematics/init-webpack/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export interface MfSchematicSchema {
22
project: string;
33
port: string;
44
nxBuilders: boolean | undefined;
5+
skipConfirmation: boolean;
56
type: 'host' | 'dynamic-host' | 'remote' | 'legacy';
67
}

libs/mf/src/schematics/init-webpack/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
"nxBuilders": {
3434
"type": "boolean",
3535
"description": "Use builders provided by Nx instead of ngx-build-plus? Defaults to true for Nx workspaces and false for CLI workspaces."
36+
},
37+
"skip-confirmation": {
38+
"type": "boolean",
39+
"default": false
3640
}
3741
},
3842
"required": ["port"]

libs/mf/src/schematics/init-webpack/schematic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default function config(options: MfSchematicSchema): Rule {
234234
const isApplicationBuilder =
235235
buildConfig?.builder === '@angular-devkit/build-angular:application';
236236

237-
if (isApplicationBuilder) {
237+
if (isApplicationBuilder && !options.skipConfirmation) {
238238
console.warn(
239239
`\nWARNING: This package uses the traditional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.`
240240
);

libs/mf/src/schematics/init/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export interface InitSchema {
33
port: string | number;
44
nxBuilders: boolean | undefined;
55
type: 'host' | 'dynamic-host' | 'remote' | 'legacy';
6+
skipConfirmation: boolean;
67
stack:
78
| 'module-federation-webpack'
89
| 'module-federation-rsbuild-experimental'

libs/mf/src/schematics/init/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
"nxBuilders": {
6262
"type": "boolean",
6363
"description": "Use builders provided by Nx instead of ngx-build-plus? Defaults to true for Nx workspaces and false for CLI workspaces."
64+
},
65+
"skip-confirmation": {
66+
"type": "boolean",
67+
"default": false
6468
}
6569
},
6670
"required": ["port", "stack"]

libs/native-federation-node/src/lib/node/init-node-federation.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,9 @@ async function loadFsManifest(
7373
}
7474

7575
async function loadFsFederationInfo(
76-
relBundlePath: string,
76+
relBundlePath: string
7777
): Promise<FederationInfo> {
78-
const manifestPath = path.join(
79-
relBundlePath,
80-
'remoteEntry.json'
81-
);
78+
const manifestPath = path.join(relBundlePath, 'remoteEntry.json');
8279
const content = await fs.readFile(manifestPath, 'utf-8');
8380
const manifest = JSON.parse(content) as FederationInfo;
8481
return manifest;

0 commit comments

Comments
 (0)