@nrwl/angular 13.10.3 → 14.0.0-beta.2
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/README.md +1 -1
- package/executors.json +10 -0
- package/generators.d.ts +2 -4
- package/generators.js +2 -4
- package/generators.js.map +1 -1
- package/generators.json +16 -40
- package/migrations.json +6 -0
- package/module-federation/index.d.ts +1 -0
- package/module-federation/index.js +2 -0
- package/module-federation/index.js.map +1 -1
- package/ng-package.json +1 -0
- package/package.json +8 -6
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.d.ts +6 -0
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +38 -0
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -0
- package/src/builders/module-federation-dev-server/schema.d.ts +20 -0
- package/src/builders/module-federation-dev-server/schema.json +108 -0
- package/src/generators/add-linting/schema.json +1 -0
- package/src/generators/application/files/tsconfig.editor.json__tpl__ +1 -7
- package/src/generators/application/lib/update-editor-tsconfig.d.ts +1 -1
- package/src/generators/application/lib/update-editor-tsconfig.js +14 -2
- package/src/generators/application/lib/update-editor-tsconfig.js.map +1 -1
- package/src/generators/application/schema.json +11 -5
- package/src/generators/component/schema.json +1 -1
- package/src/generators/component-cypress-spec/schema.json +1 -0
- package/src/generators/component-story/schema.json +1 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +4 -4
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js.map +1 -1
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +1 -1
- package/src/generators/convert-to-with-mf/schema.json +1 -1
- package/src/generators/convert-tslint-to-eslint/schema.json +1 -1
- package/src/generators/downgrade-module/schema.json +1 -1
- package/src/generators/{mfe-host/mfe-host.compat.d.ts → host/host.compat.d.ts} +0 -0
- package/src/generators/host/host.compat.js +6 -0
- package/src/generators/host/host.compat.js.map +1 -0
- package/src/generators/host/host.d.ts +3 -0
- package/src/generators/host/host.js +34 -0
- package/src/generators/host/host.js.map +1 -0
- package/src/generators/{mfe-host → host}/schema.d.ts +0 -0
- package/src/generators/{mfe-host → host}/schema.json +5 -5
- package/src/generators/init/schema.json +1 -1
- package/src/generators/karma/karma.js +1 -0
- package/src/generators/karma/karma.js.map +1 -1
- package/src/generators/library/library.js +2 -7
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/ng-add/migrate-from-angular-cli.js +32 -10
- package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -1
- package/src/generators/ng-add/schema.d.ts +0 -1
- package/src/generators/ng-add/schema.json +0 -7
- package/src/generators/ng-add/utilities/app.migrator.d.ts +2 -3
- package/src/generators/ng-add/utilities/app.migrator.js +92 -56
- package/src/generators/ng-add/utilities/app.migrator.js.map +1 -1
- package/src/generators/ng-add/utilities/{e2e-project.migrator.d.ts → e2e.migrator.d.ts} +5 -1
- package/src/generators/ng-add/utilities/e2e.migrator.js +298 -0
- package/src/generators/ng-add/utilities/e2e.migrator.js.map +1 -0
- package/src/generators/ng-add/utilities/lib.migrator.d.ts +26 -0
- package/src/generators/ng-add/utilities/lib.migrator.js +351 -0
- package/src/generators/ng-add/utilities/lib.migrator.js.map +1 -0
- package/src/generators/ng-add/utilities/logger.d.ts +8 -0
- package/src/generators/ng-add/utilities/logger.js +21 -0
- package/src/generators/ng-add/utilities/logger.js.map +1 -0
- package/src/generators/ng-add/utilities/normalize-options.js +5 -2
- package/src/generators/ng-add/utilities/normalize-options.js.map +1 -1
- package/src/generators/ng-add/utilities/project.migrator.d.ts +13 -2
- package/src/generators/ng-add/utilities/project.migrator.js +83 -3
- package/src/generators/ng-add/utilities/project.migrator.js.map +1 -1
- package/src/generators/ng-add/utilities/types.d.ts +13 -1
- package/src/generators/ng-add/utilities/validate-projects.d.ts +2 -0
- package/src/generators/ng-add/utilities/validate-projects.js +46 -0
- package/src/generators/ng-add/utilities/validate-projects.js.map +1 -0
- package/src/generators/ng-add/utilities/validation-logging.d.ts +2 -0
- package/src/generators/ng-add/utilities/validation-logging.js +20 -0
- package/src/generators/ng-add/utilities/validation-logging.js.map +1 -0
- package/src/generators/ng-add/utilities/workspace.d.ts +5 -3
- package/src/generators/ng-add/utilities/workspace.js +105 -67
- package/src/generators/ng-add/utilities/workspace.js.map +1 -1
- package/src/generators/{mfe-remote/mfe-remote.compat.d.ts → remote/remote.compat.d.ts} +0 -0
- package/src/generators/remote/remote.compat.js +6 -0
- package/src/generators/remote/remote.compat.js.map +1 -0
- package/src/generators/remote/remote.d.ts +3 -0
- package/src/generators/remote/remote.js +76 -0
- package/src/generators/remote/remote.js.map +1 -0
- package/src/generators/{mfe-remote → remote}/schema.d.ts +0 -0
- package/src/generators/{mfe-remote → remote}/schema.json +5 -5
- package/src/generators/scam/schema.json +1 -1
- package/src/generators/scam-directive/schema.json +1 -1
- package/src/generators/scam-pipe/schema.json +1 -1
- package/src/generators/setup-mfe/files/webpack/{mfe.config.js__tmpl__ → module-federation.config.js__tmpl__} +0 -0
- package/src/generators/setup-mfe/files/webpack/webpack.config.js__tmpl__ +1 -1
- package/src/generators/setup-mfe/files/webpack/webpack.prod.config.js__tmpl__ +1 -1
- package/src/generators/setup-mfe/lib/add-remote-to-host.js +10 -10
- package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-mfe/lib/fix-bootstrap.js +3 -3
- package/src/generators/setup-mfe/lib/fix-bootstrap.js.map +1 -1
- package/src/generators/setup-mfe/lib/generate-config.js +1 -1
- package/src/generators/setup-mfe/lib/generate-config.js.map +1 -1
- package/src/generators/setup-mfe/lib/setup-host-if-dynamic.js +3 -3
- package/src/generators/setup-mfe/lib/setup-host-if-dynamic.js.map +1 -1
- package/src/generators/setup-mfe/lib/setup-serve-target.js +3 -23
- package/src/generators/setup-mfe/lib/setup-serve-target.js.map +1 -1
- package/src/generators/stories/schema.json +1 -1
- package/src/generators/utils/dependencies.d.ts +2 -0
- package/src/generators/utils/dependencies.js +15 -0
- package/src/generators/utils/dependencies.js.map +1 -0
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js +2 -2
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js.map +1 -1
- package/src/migrations/update-14-0-0/rename-mf-config.d.ts +2 -0
- package/src/migrations/update-14-0-0/rename-mf-config.js +27 -0
- package/src/migrations/update-14-0-0/rename-mf-config.js.map +1 -0
- package/src/utils/{get-mfe-projects.d.ts → get-mf-projects.d.ts} +1 -1
- package/src/utils/{get-mfe-projects.js → get-mf-projects.js} +4 -4
- package/src/utils/get-mf-projects.js.map +1 -0
- package/src/utils/versions.js +1 -1
- package/src/generators/mfe-host/mfe-host.compat.js +0 -6
- package/src/generators/mfe-host/mfe-host.compat.js.map +0 -1
- package/src/generators/mfe-host/mfe-host.d.ts +0 -3
- package/src/generators/mfe-host/mfe-host.js +0 -22
- package/src/generators/mfe-host/mfe-host.js.map +0 -1
- package/src/generators/mfe-remote/mfe-remote.compat.js +0 -6
- package/src/generators/mfe-remote/mfe-remote.compat.js.map +0 -1
- package/src/generators/mfe-remote/mfe-remote.d.ts +0 -3
- package/src/generators/mfe-remote/mfe-remote.js +0 -31
- package/src/generators/mfe-remote/mfe-remote.js.map +0 -1
- package/src/generators/ng-add/utilities/e2e-project.migrator.js +0 -186
- package/src/generators/ng-add/utilities/e2e-project.migrator.js.map +0 -1
- package/src/generators/ng-add/utilities/e2e-utils.d.ts +0 -7
- package/src/generators/ng-add/utilities/e2e-utils.js +0 -46
- package/src/generators/ng-add/utilities/e2e-utils.js.map +0 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/compat.d.ts +0 -2
- package/src/generators/storybook-migrate-defaults-5-to-6/compat.js +0 -6
- package/src/generators/storybook-migrate-defaults-5-to-6/compat.js.map +0 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/schema.d.ts +0 -5
- package/src/generators/storybook-migrate-defaults-5-to-6/schema.json +0 -30
- package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.d.ts +0 -4
- package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js +0 -14
- package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js.map +0 -1
- package/src/generators/storybook-migrate-stories-to-6-2/compat.d.ts +0 -2
- package/src/generators/storybook-migrate-stories-to-6-2/compat.js +0 -6
- package/src/generators/storybook-migrate-stories-to-6-2/compat.js.map +0 -1
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.d.ts +0 -3
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js +0 -13
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js.map +0 -1
- package/src/generators/storybook-migrate-stories-to-6-2/schema.json +0 -11
- package/src/utils/get-mfe-projects.js.map +0 -1
package/README.md
CHANGED
|
@@ -79,6 +79,6 @@ A few links to help you get started:
|
|
|
79
79
|
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
80
80
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
81
|
|
|
82
|
-
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
82
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
83
83
|
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
84
84
|
|
package/executors.json
CHANGED
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"implementation": "./src/builders/webpack-server/webpack-server.impl",
|
|
25
25
|
"schema": "./src/builders/webpack-server/schema.json",
|
|
26
26
|
"description": "The `webpack-server` executor is very similar to the standard `dev-server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration."
|
|
27
|
+
},
|
|
28
|
+
"module-federation-dev-server": {
|
|
29
|
+
"implementation": "./src/builders/module-federation-dev-server/module-federation-dev-server.impl",
|
|
30
|
+
"schema": "./src/builders/module-federation-dev-server/schema.json",
|
|
31
|
+
"description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host."
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
34
|
"builders": {
|
|
@@ -51,6 +56,11 @@
|
|
|
51
56
|
"implementation": "./src/builders/webpack-server/webpack-server.impl",
|
|
52
57
|
"schema": "./src/builders/webpack-server/schema.json",
|
|
53
58
|
"description": "The `webpack-server` executor is very similar to the standard `dev-server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration."
|
|
59
|
+
},
|
|
60
|
+
"module-federation-dev-server": {
|
|
61
|
+
"implementation": "./src/builders/module-federation-dev-server/module-federation-dev-server.impl",
|
|
62
|
+
"schema": "./src/builders/module-federation-dev-server/schema.json",
|
|
63
|
+
"description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host."
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
66
|
}
|
package/generators.d.ts
CHANGED
|
@@ -11,11 +11,9 @@ export * from './src/generators/ngrx/ngrx';
|
|
|
11
11
|
export * from './src/generators/setup-tailwind/setup-tailwind';
|
|
12
12
|
export * from './src/generators/stories/stories';
|
|
13
13
|
export * from './src/generators/storybook-configuration/storybook-configuration';
|
|
14
|
-
export * from './src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6';
|
|
15
|
-
export * from './src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2';
|
|
16
14
|
export * from './src/generators/upgrade-module/upgrade-module';
|
|
17
15
|
export * from './src/generators/setup-mfe/setup-mfe';
|
|
18
|
-
export * from './src/generators/
|
|
16
|
+
export * from './src/generators/host/host';
|
|
19
17
|
export * from './src/generators/scam/scam';
|
|
20
18
|
export * from './src/generators/scam-directive/scam-directive';
|
|
21
19
|
export * from './src/generators/scam-pipe/scam-pipe';
|
|
@@ -23,4 +21,4 @@ export * from './src/generators/add-linting/add-linting';
|
|
|
23
21
|
export * from './src/generators/component-cypress-spec/component-cypress-spec';
|
|
24
22
|
export * from './src/generators/component-story/component-story';
|
|
25
23
|
export * from './src/generators/web-worker/web-worker';
|
|
26
|
-
export * from './src/generators/
|
|
24
|
+
export * from './src/generators/remote/remote';
|
package/generators.js
CHANGED
|
@@ -14,11 +14,9 @@ tslib_1.__exportStar(require("./src/generators/ngrx/ngrx"), exports);
|
|
|
14
14
|
tslib_1.__exportStar(require("./src/generators/setup-tailwind/setup-tailwind"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./src/generators/stories/stories"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./src/generators/storybook-configuration/storybook-configuration"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2"), exports);
|
|
19
17
|
tslib_1.__exportStar(require("./src/generators/upgrade-module/upgrade-module"), exports);
|
|
20
18
|
tslib_1.__exportStar(require("./src/generators/setup-mfe/setup-mfe"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./src/generators/
|
|
19
|
+
tslib_1.__exportStar(require("./src/generators/host/host"), exports);
|
|
22
20
|
tslib_1.__exportStar(require("./src/generators/scam/scam"), exports);
|
|
23
21
|
tslib_1.__exportStar(require("./src/generators/scam-directive/scam-directive"), exports);
|
|
24
22
|
tslib_1.__exportStar(require("./src/generators/scam-pipe/scam-pipe"), exports);
|
|
@@ -26,5 +24,5 @@ tslib_1.__exportStar(require("./src/generators/add-linting/add-linting"), export
|
|
|
26
24
|
tslib_1.__exportStar(require("./src/generators/component-cypress-spec/component-cypress-spec"), exports);
|
|
27
25
|
tslib_1.__exportStar(require("./src/generators/component-story/component-story"), exports);
|
|
28
26
|
tslib_1.__exportStar(require("./src/generators/web-worker/web-worker"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./src/generators/
|
|
27
|
+
tslib_1.__exportStar(require("./src/generators/remote/remote"), exports);
|
|
30
28
|
//# sourceMappingURL=generators.js.map
|
package/generators.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,mFAAyD;AACzD,6GAAmF;AACnF,6FAAmE;AACnE,qEAA2C;AAC3C,uEAA6C;AAC7C,uFAA6D;AAC7D,2EAAiD;AACjD,uHAA6F;AAC7F,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,2EAAiD;AACjD,2GAAiF;AACjF
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,mFAAyD;AACzD,6GAAmF;AACnF,6FAAmE;AACnE,qEAA2C;AAC3C,uEAA6C;AAC7C,uFAA6D;AAC7D,2EAAiD;AACjD,uHAA6F;AAC7F,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,2EAAiD;AACjD,2GAAiF;AACjF,yFAA+D;AAC/D,+EAAqD;AACrD,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,+EAAqD;AACrD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,iFAAuD;AACvD,yEAA+C"}
|
package/generators.json
CHANGED
|
@@ -71,11 +71,10 @@
|
|
|
71
71
|
"aliases": ["secondary-entry-point", "entry-point"],
|
|
72
72
|
"description": "Creates a secondary entry point for an Angular publishable library."
|
|
73
73
|
},
|
|
74
|
-
"
|
|
75
|
-
"factory": "./src/generators/
|
|
76
|
-
"schema": "./src/generators/
|
|
77
|
-
"
|
|
78
|
-
"description": "Generate a Remote Angular Micro-Frontend Application."
|
|
74
|
+
"remote": {
|
|
75
|
+
"factory": "./src/generators/remote/remote.compat",
|
|
76
|
+
"schema": "./src/generators/remote/schema.json",
|
|
77
|
+
"description": "Generate a Remote Angular Module Federation Application."
|
|
79
78
|
},
|
|
80
79
|
"move": {
|
|
81
80
|
"factory": "./src/generators/move/move#angularMoveSchematic",
|
|
@@ -88,11 +87,10 @@
|
|
|
88
87
|
"schema": "./src/generators/convert-to-with-mf/schema.json",
|
|
89
88
|
"description": "Converts an old micro frontend configuration to use the new `withModuleFederation` helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n _**Note:** This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!_"
|
|
90
89
|
},
|
|
91
|
-
"
|
|
92
|
-
"factory": "./src/generators/
|
|
93
|
-
"schema": "./src/generators/
|
|
94
|
-
"
|
|
95
|
-
"description": "Generate a Host Angular Micro Frontend Application."
|
|
90
|
+
"host": {
|
|
91
|
+
"factory": "./src/generators/host/host.compat",
|
|
92
|
+
"schema": "./src/generators/host/schema.json",
|
|
93
|
+
"description": "Generate a Host Angular Module Federation Application."
|
|
96
94
|
},
|
|
97
95
|
"ng-add": {
|
|
98
96
|
"factory": "./src/generators/ng-add/compat",
|
|
@@ -140,16 +138,6 @@
|
|
|
140
138
|
"schema": "./src/generators/storybook-configuration/schema.json",
|
|
141
139
|
"description": "Adds Storybook configuration to a project."
|
|
142
140
|
},
|
|
143
|
-
"storybook-migrate-defaults-5-to-6": {
|
|
144
|
-
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/compat",
|
|
145
|
-
"schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
|
|
146
|
-
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
|
|
147
|
-
},
|
|
148
|
-
"storybook-migrate-stories-to-6-2": {
|
|
149
|
-
"factory": "./src/generators/storybook-migrate-stories-to-6-2/compat",
|
|
150
|
-
"schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
|
|
151
|
-
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
|
|
152
|
-
},
|
|
153
141
|
"upgrade-module": {
|
|
154
142
|
"factory": "./src/generators/upgrade-module/compat",
|
|
155
143
|
"schema": "./src/generators/upgrade-module/schema.json",
|
|
@@ -230,11 +218,10 @@
|
|
|
230
218
|
"aliases": ["secondary-entry-point", "entry-point"],
|
|
231
219
|
"description": "Creates a secondary entry point for an Angular publishable library."
|
|
232
220
|
},
|
|
233
|
-
"
|
|
234
|
-
"factory": "./src/generators/
|
|
235
|
-
"schema": "./src/generators/
|
|
236
|
-
"
|
|
237
|
-
"description": "Generate a Remote Angular Micro-Frontend Application."
|
|
221
|
+
"remote": {
|
|
222
|
+
"factory": "./src/generators/remote/remote",
|
|
223
|
+
"schema": "./src/generators/remote/schema.json",
|
|
224
|
+
"description": "Generate a Remote Angular Module Federation Application."
|
|
238
225
|
},
|
|
239
226
|
"move": {
|
|
240
227
|
"factory": "./src/generators/move/move#angularMoveGenerator",
|
|
@@ -247,11 +234,10 @@
|
|
|
247
234
|
"schema": "./src/generators/convert-to-with-mf/schema.json",
|
|
248
235
|
"description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n _**Note:** This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!_"
|
|
249
236
|
},
|
|
250
|
-
"
|
|
251
|
-
"factory": "./src/generators/
|
|
252
|
-
"schema": "./src/generators/
|
|
253
|
-
"
|
|
254
|
-
"description": "Generate a Host Angular Micro Frontend Application."
|
|
237
|
+
"host": {
|
|
238
|
+
"factory": "./src/generators/host/host",
|
|
239
|
+
"schema": "./src/generators/host/schema.json",
|
|
240
|
+
"description": "Generate a Host Angular Module Federation Application."
|
|
255
241
|
},
|
|
256
242
|
"ng-add": {
|
|
257
243
|
"factory": "./src/generators/ng-add/ng-add",
|
|
@@ -299,16 +285,6 @@
|
|
|
299
285
|
"schema": "./src/generators/storybook-configuration/schema.json",
|
|
300
286
|
"description": "Adds Storybook configuration to a project."
|
|
301
287
|
},
|
|
302
|
-
"storybook-migrate-defaults-5-to-6": {
|
|
303
|
-
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6",
|
|
304
|
-
"schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
|
|
305
|
-
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
|
|
306
|
-
},
|
|
307
|
-
"storybook-migrate-stories-to-6-2": {
|
|
308
|
-
"factory": "./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2",
|
|
309
|
-
"schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
|
|
310
|
-
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
|
|
311
|
-
},
|
|
312
288
|
"upgrade-module": {
|
|
313
289
|
"factory": "./src/generators/upgrade-module/upgrade-module",
|
|
314
290
|
"schema": "./src/generators/upgrade-module/schema.json",
|
package/migrations.json
CHANGED
|
@@ -106,6 +106,12 @@
|
|
|
106
106
|
"version": "13.9.0-beta.4",
|
|
107
107
|
"description": "Set buildLibsFromSource property to false to not break existing usage.",
|
|
108
108
|
"factory": "./src/migrations/update-13-9-0/set-build-libs-from-source"
|
|
109
|
+
},
|
|
110
|
+
"rename-module-federation-config": {
|
|
111
|
+
"cli": "nx",
|
|
112
|
+
"version": "14.0.0-beta.1",
|
|
113
|
+
"description": "Rename mfe.config.js to module-federation.config.js for consistent terminology.",
|
|
114
|
+
"factory": "./src/migrations/update-14-0-0/rename-mf-config"
|
|
109
115
|
}
|
|
110
116
|
},
|
|
111
117
|
"packageJsonUpdates": {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withModuleFederation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
var with_module_federation_1 = require("../src/utils/mfe/with-module-federation");
|
|
5
6
|
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
|
|
7
|
+
tslib_1.__exportStar(require("../src/utils/mfe/mfe-webpack"), exports);
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/module-federation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/module-federation/index.ts"],"names":[],"mappings":";;;;AAAA,kFAA+E;AAAtE,8HAAA,oBAAoB,OAAA;AAC7B,uEAA6C"}
|
package/ng-package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0-beta.2",
|
|
4
4
|
"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, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,13 +65,15 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@angular-devkit/schematics": "~13.3.0",
|
|
68
|
-
"@nrwl/cypress": "
|
|
69
|
-
"@nrwl/devkit": "
|
|
70
|
-
"@nrwl/jest": "
|
|
71
|
-
"@nrwl/linter": "
|
|
72
|
-
"@nrwl/storybook": "
|
|
68
|
+
"@nrwl/cypress": "14.0.0-beta.2",
|
|
69
|
+
"@nrwl/devkit": "14.0.0-beta.2",
|
|
70
|
+
"@nrwl/jest": "14.0.0-beta.2",
|
|
71
|
+
"@nrwl/linter": "14.0.0-beta.2",
|
|
72
|
+
"@nrwl/storybook": "14.0.0-beta.2",
|
|
73
|
+
"@nrwl/workspace": "14.0.0-beta.2",
|
|
73
74
|
"@schematics/angular": "~13.3.0",
|
|
74
75
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
76
|
+
"chalk": "4.1.0",
|
|
75
77
|
"ignore": "^5.0.4",
|
|
76
78
|
"jasmine-marbles": "~0.8.4",
|
|
77
79
|
"rxjs-for-await": "0.0.2",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Schema } from './schema';
|
|
2
|
+
import { BuilderContext } from '@angular-devkit/architect';
|
|
3
|
+
import { JsonObject } from '@angular-devkit/core';
|
|
4
|
+
export declare function moduleFederationDevServer(schema: Schema, context: BuilderContext): import("rxjs").Observable<import("@angular-devkit/build-angular").DevServerBuilderOutput>;
|
|
5
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<JsonObject & Schema>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moduleFederationDevServer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
7
|
+
const architect_1 = require("@angular-devkit/architect");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const webpack_server_impl_1 = require("../webpack-server/webpack-server.impl");
|
|
10
|
+
function moduleFederationDevServer(schema, context) {
|
|
11
|
+
const workspaces = new devkit_1.Workspaces(context.workspaceRoot);
|
|
12
|
+
const workspaceConfig = workspaces.readWorkspaceConfiguration();
|
|
13
|
+
const p = workspaceConfig.projects[context.target.project];
|
|
14
|
+
const mfConfigPath = (0, path_1.join)(context.workspaceRoot, p.root, 'module-federation.config.js');
|
|
15
|
+
let mfeConfig;
|
|
16
|
+
try {
|
|
17
|
+
mfeConfig = require(mfConfigPath);
|
|
18
|
+
}
|
|
19
|
+
catch (_a) {
|
|
20
|
+
throw new Error(`Could not load ${mfConfigPath}. Was this project generated with "@nrwl/angular:host"?`);
|
|
21
|
+
}
|
|
22
|
+
const options = tslib_1.__rest(schema, []);
|
|
23
|
+
const unparsedRemotes = mfeConfig.remotes.length > 0 ? mfeConfig.remotes : [];
|
|
24
|
+
const remotes = unparsedRemotes.map((a) => (Array.isArray(a) ? a[0] : a));
|
|
25
|
+
for (const remote of remotes) {
|
|
26
|
+
(0, ngcli_adapter_1.scheduleTarget)(context.workspaceRoot, {
|
|
27
|
+
project: remote,
|
|
28
|
+
target: 'serve',
|
|
29
|
+
configuration: context.target.configuration,
|
|
30
|
+
runOptions: {},
|
|
31
|
+
executor: context.builder.builderName,
|
|
32
|
+
}, options.verbose);
|
|
33
|
+
}
|
|
34
|
+
return (0, webpack_server_impl_1.webpackServer)(options, context);
|
|
35
|
+
}
|
|
36
|
+
exports.moduleFederationDevServer = moduleFederationDevServer;
|
|
37
|
+
exports.default = (0, architect_1.createBuilder)(moduleFederationDevServer);
|
|
38
|
+
//# sourceMappingURL=module-federation-dev-server.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-federation-dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":";;;;AACA,yCAA0C;AAC1C,gEAA8D;AAC9D,yDAA0E;AAE1E,+BAA4B;AAC5B,+EAAsE;AAEtE,SAAgB,yBAAyB,CACvC,MAAc,EACd,OAAuB;IAEvB,MAAM,UAAU,GAAG,IAAI,mBAAU,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACzD,MAAM,eAAe,GAAG,UAAU,CAAC,0BAA0B,EAAE,CAAC;IAEhE,MAAM,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE3D,MAAM,YAAY,GAAG,IAAA,WAAI,EACvB,OAAO,CAAC,aAAa,EACrB,CAAC,CAAC,IAAI,EACN,6BAA6B,CAC9B,CAAC;IAEF,IAAI,SAAgC,CAAC;IACrC,IAAI;QACF,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;KACnC;IAAC,WAAM;QACN,MAAM,IAAI,KAAK,CACb,kBAAkB,YAAY,yDAAyD,CACxF,CAAC;KACH;IAED,MAAW,OAAO,kBAAK,MAAM,EAAvB,EAAc,CAAS,CAAC;IAC9B,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,IAAA,8BAAc,EACZ,OAAO,CAAC,aAAa,EACrB;YACE,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,OAAO;YACf,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa;YAC3C,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW;SACtC,EACD,OAAO,CAAC,OAAO,CAChB,CAAC;KACH;IAED,OAAO,IAAA,mCAAa,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AA3CD,8DA2CC;AAED,kBAAe,IAAA,yBAAa,EAAsB,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Schema {
|
|
2
|
+
browserTarget: string;
|
|
3
|
+
port: number;
|
|
4
|
+
host: string;
|
|
5
|
+
proxyConfig?: string;
|
|
6
|
+
ssl: boolean;
|
|
7
|
+
sslKey?: string;
|
|
8
|
+
sslCert?: string;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
open: boolean;
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
liveReload: boolean;
|
|
13
|
+
publicHost?: string;
|
|
14
|
+
allowedHosts?: string[];
|
|
15
|
+
servePath?: string;
|
|
16
|
+
disableHostCheck?: boolean;
|
|
17
|
+
hmr?: boolean;
|
|
18
|
+
watch?: boolean;
|
|
19
|
+
poll?: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Schema for Module Federation Dev Server",
|
|
4
|
+
"description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"presets": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Using a Different Port",
|
|
9
|
+
"keys": ["browserTarget", "port"]
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"browserTarget": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
|
16
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
17
|
+
},
|
|
18
|
+
"port": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"description": "Port to listen on.",
|
|
21
|
+
"default": 4200
|
|
22
|
+
},
|
|
23
|
+
"host": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Host to listen on.",
|
|
26
|
+
"default": "localhost"
|
|
27
|
+
},
|
|
28
|
+
"proxyConfig": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server."
|
|
31
|
+
},
|
|
32
|
+
"ssl": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "Serve using HTTPS.",
|
|
35
|
+
"default": false
|
|
36
|
+
},
|
|
37
|
+
"sslKey": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "SSL key to use for serving HTTPS."
|
|
40
|
+
},
|
|
41
|
+
"sslCert": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "SSL certificate to use for serving HTTPS."
|
|
44
|
+
},
|
|
45
|
+
"headers": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"description": "Custom HTTP headers to be added to all responses.",
|
|
48
|
+
"propertyNames": {
|
|
49
|
+
"pattern": "^[-_A-Za-z0-9]+$"
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"open": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"description": "Opens the url in default browser.",
|
|
58
|
+
"default": false,
|
|
59
|
+
"alias": "o"
|
|
60
|
+
},
|
|
61
|
+
"verbose": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"description": "Adds more details to output logging."
|
|
64
|
+
},
|
|
65
|
+
"liveReload": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Whether to reload the page on change, using live-reload.",
|
|
68
|
+
"default": true
|
|
69
|
+
},
|
|
70
|
+
"publicHost": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
|
|
73
|
+
},
|
|
74
|
+
"allowedHosts": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"description": "List of hosts that are allowed to access the dev server.",
|
|
77
|
+
"default": [],
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"servePath": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "The pathname where the app will be served."
|
|
85
|
+
},
|
|
86
|
+
"disableHostCheck": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Don't verify connected clients are part of allowed hosts.",
|
|
89
|
+
"default": false
|
|
90
|
+
},
|
|
91
|
+
"hmr": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"description": "Enable hot module replacement.",
|
|
94
|
+
"default": false
|
|
95
|
+
},
|
|
96
|
+
"watch": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"description": "Rebuild on change.",
|
|
99
|
+
"default": true
|
|
100
|
+
},
|
|
101
|
+
"poll": {
|
|
102
|
+
"type": "number",
|
|
103
|
+
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["browserTarget"]
|
|
108
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Tree } from '@nrwl/devkit';
|
|
2
2
|
import type { NormalizedSchema } from './normalized-schema';
|
|
3
|
-
export declare function updateEditorTsConfig(
|
|
3
|
+
export declare function updateEditorTsConfig(tree: Tree, options: NormalizedSchema): void;
|
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateEditorTsConfig = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
function
|
|
5
|
+
function getCompilerOptionsTypes(tsConfig) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return (_b = (_a = tsConfig === null || tsConfig === void 0 ? void 0 : tsConfig.compilerOptions) === null || _a === void 0 ? void 0 : _a.types) !== null && _b !== void 0 ? _b : [];
|
|
8
|
+
}
|
|
9
|
+
function updateEditorTsConfig(tree, options) {
|
|
10
|
+
const types = getCompilerOptionsTypes((0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json')));
|
|
11
|
+
if (options.unitTestRunner !== 'none') {
|
|
12
|
+
types.concat(getCompilerOptionsTypes((0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.spec.json'))));
|
|
13
|
+
}
|
|
14
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.editor.json'), (json) => {
|
|
15
|
+
json.compilerOptions.types = types;
|
|
16
|
+
return json;
|
|
17
|
+
});
|
|
6
18
|
// This should be the last tsconfig references so it's not in the template
|
|
7
|
-
(0, devkit_1.updateJson)(
|
|
19
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json'), (json) => {
|
|
8
20
|
json.references.push({
|
|
9
21
|
path: './tsconfig.editor.json',
|
|
10
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-editor-tsconfig.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/update-editor-tsconfig.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"update-editor-tsconfig.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/update-editor-tsconfig.ts"],"names":[],"mappings":";;;AAGA,yCAAuE;AAMvE,SAAS,uBAAuB,CAAC,QAAkB;;IACjD,OAAO,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,eAAe,0CAAE,KAAK,mCAAI,EAAE,CAAC;AAChD,CAAC;AAED,SAAgB,oBAAoB,CAAC,IAAU,EAAE,OAAyB;IACxE,MAAM,KAAK,GAAG,uBAAuB,CACnC,IAAA,iBAAQ,EACN,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAC/D,CACF,CAAC;IAEF,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;QACrC,KAAK,CAAC,MAAM,CACV,uBAAuB,CACrB,IAAA,iBAAQ,EACN,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAChE,CACF,CACF,CAAC;KACH;IAED,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,sBAAsB,CAAC,EACjE,CAAC,IAAI,EAAE,EAAE;QACP,IAAI,CAAC,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;IAEF,0EAA0E;IAC1E,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,EAC1D,CAAC,IAAI,EAAE,EAAE;QACP,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,wBAAwB;SAC/B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;AACJ,CAAC;AAvCD,oDAuCC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "GeneratorNxApp",
|
|
4
4
|
"title": "Creates an Angular application.",
|
|
5
|
+
"description": "Creates an Angular application.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"cli": "nx",
|
|
7
8
|
"properties": {
|
|
@@ -130,19 +131,22 @@
|
|
|
130
131
|
"mfe": {
|
|
131
132
|
"description": "Generate a Module Federation configuration for the application",
|
|
132
133
|
"type": "boolean",
|
|
133
|
-
"default": false
|
|
134
|
+
"default": false,
|
|
135
|
+
"x-deprecated": "Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version."
|
|
134
136
|
},
|
|
135
137
|
"mfeType": {
|
|
136
138
|
"type": "string",
|
|
137
139
|
"enum": ["host", "remote"],
|
|
138
140
|
"description": "Type of application to generate the Module Federation configuration for.",
|
|
139
|
-
"default": "remote"
|
|
141
|
+
"default": "remote",
|
|
142
|
+
"x-deprecated": "Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version."
|
|
140
143
|
},
|
|
141
144
|
"federationType": {
|
|
142
145
|
"type": "string",
|
|
143
146
|
"enum": ["static", "dynamic"],
|
|
144
147
|
"description": "Use either Static or Dynamic Module Federation pattern for the application.",
|
|
145
|
-
"default": "static"
|
|
148
|
+
"default": "static",
|
|
149
|
+
"x-deprecated": "Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version."
|
|
146
150
|
},
|
|
147
151
|
"port": {
|
|
148
152
|
"type": "number",
|
|
@@ -150,11 +154,13 @@
|
|
|
150
154
|
},
|
|
151
155
|
"remotes": {
|
|
152
156
|
"type": "array",
|
|
153
|
-
"description": "A list of remote application names that the host application should consume."
|
|
157
|
+
"description": "A list of remote application names that the host application should consume.",
|
|
158
|
+
"x-deprecated": "Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version."
|
|
154
159
|
},
|
|
155
160
|
"host": {
|
|
156
161
|
"type": "string",
|
|
157
|
-
"description": "The name of the host application that the remote application will be consumed by."
|
|
162
|
+
"description": "The name of the host application that the remote application will be consumed by.",
|
|
163
|
+
"x-deprecated": "Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version."
|
|
158
164
|
},
|
|
159
165
|
"setParserOptionsProject": {
|
|
160
166
|
"type": "boolean",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Angular Component Schema",
|
|
5
5
|
"cli": "nx",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"description": "Creates a new, generic component definition in the given or default project.",
|
|
7
|
+
"description": "Creates a new, generic Angular component definition in the given or default project.",
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"path": {
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const devkit_2 = require("@nrwl/devkit");
|
|
6
|
-
const
|
|
6
|
+
const get_mf_projects_1 = require("../../utils/get-mf-projects");
|
|
7
7
|
const lib_1 = require("./lib");
|
|
8
8
|
function convertToWithMF(tree, schema) {
|
|
9
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
-
const projects = new Set((0,
|
|
10
|
+
const projects = new Set((0, get_mf_projects_1.getMFProjects)(tree, { legacy: true }));
|
|
11
11
|
if (!projects.has(schema.project)) {
|
|
12
12
|
throw new Error(`Could not find project "${schema.project}" with a Micro Frontend configuration in your workspace. Please check the name of the project you're wishing to convert exists.`);
|
|
13
13
|
}
|
|
@@ -23,9 +23,9 @@ function convertToWithMF(tree, schema) {
|
|
|
23
23
|
There are npm packages being shared with a custom configuration in webpack config (${pathToWebpackConfig}).`);
|
|
24
24
|
}
|
|
25
25
|
devkit_1.logger.warn(`This Micro Frontend configuration conversion will overwrite "${schema.project}"'s current webpack config. If you have anything custom that is not related to Micro Frontends, it will be lost. You should be able to see the changes in your version control system.`);
|
|
26
|
-
const [updatedWebpackConfig,
|
|
26
|
+
const [updatedWebpackConfig, mfConfig] = (0, lib_1.writeNewWebpackConfig)(webpackAst, (0, lib_1.isHostRemoteConfig)(webpackAst), schema.project);
|
|
27
27
|
tree.write(pathToWebpackConfig, updatedWebpackConfig);
|
|
28
|
-
tree.write((0, devkit_1.joinPathFragments)(project.root, '
|
|
28
|
+
tree.write((0, devkit_1.joinPathFragments)(project.root, 'module-federation.config.js'), mfConfig);
|
|
29
29
|
yield (0, devkit_2.formatFiles)(tree);
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-with-mf.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAG/D,yCAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"convert-to-with-mf.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAG/D,yCAAqE;AACrE,iEAA4D;AAC5D,+BAOe;AAEf,SAA8B,eAAe,CAAC,IAAU,EAAE,MAAc;;QACtE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAA,+BAAa,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEhE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACjC,MAAM,IAAI,KAAK,CACb,2BAA2B,MAAM,CAAC,OAAO,iIAAiI,CAC3K,CAAC;SACH;QAED,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,mBAAmB,GAAG,IAAA,0BAAoB,EAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC1E,MAAM,UAAU,GAAG,IAAA,6BAAuB,EAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;QAEtE,IAAI,CAAC,IAAA,uCAAiC,EAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;YAClE,MAAM,IAAI,KAAK,CACb,iCAAiC,MAAM,CAAC,OAAO;wCACb,mBAAmB,gCAAgC,CACtF,CAAC;SACH;QAED,IAAI,CAAC,IAAA,yCAAmC,EAAC,UAAU,CAAC,EAAE;YACpD,MAAM,IAAI,KAAK,CACb,iCAAiC,MAAM,CAAC,OAAO;6FACwC,mBAAmB,IAAI,CAC/G,CAAC;SACH;QAED,eAAM,CAAC,IAAI,CACT,gEAAgE,MAAM,CAAC,OAAO,wLAAwL,CACvQ,CAAC;QAEF,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CAAC,GAAG,IAAA,2BAAqB,EAC5D,UAAU,EACV,IAAA,wBAAkB,EAAC,UAAU,CAAC,EAC9B,MAAM,CAAC,OAAO,CACf,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,6BAA6B,CAAC,EAC9D,QAAQ,CACT,CAAC;QAEF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AA3CD,kCA2CC"}
|