@nrwl/angular 13.9.3 → 13.10.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/esm2020/mfe/index.mjs +2 -0
- package/esm2020/mfe/mfe.mjs +45 -0
- package/esm2020/mfe/nrwl-angular-mfe.mjs +5 -0
- package/executors.json +4 -4
- package/fesm2015/nrwl-angular-mfe.mjs +57 -0
- package/fesm2015/nrwl-angular-mfe.mjs.map +1 -0
- package/fesm2020/nrwl-angular-mfe.mjs +51 -0
- package/fesm2020/nrwl-angular-mfe.mjs.map +1 -0
- package/generators.json +32 -2
- package/mfe/index.d.ts +1 -0
- package/mfe/index.js +7 -0
- package/mfe/index.js.map +1 -0
- package/mfe/mfe.d.ts +4 -0
- package/mfe/mfe.js +56 -0
- package/mfe/mfe.js.map +1 -0
- package/mfe/ng-package.json +6 -0
- package/mfe/nrwl-angular-mfe.d.ts +5 -0
- package/mfe/package.json +10 -0
- package/migrations.json +89 -0
- package/module-federation/index.d.ts +1 -0
- package/module-federation/index.js +6 -0
- package/module-federation/index.js.map +1 -0
- package/package.json +17 -8
- package/scripts/nx-cli-warning.js +1 -1
- package/src/builders/webpack-browser/schema.json +3 -2
- package/src/builders/webpack-browser/webpack-browser.impl.js +10 -10
- package/src/builders/webpack-browser/webpack-browser.impl.js.map +1 -1
- package/src/builders/webpack-server/schema.json +3 -2
- package/src/builders/webpack-server/webpack-server.impl.js +8 -9
- package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +2 -2
- package/src/executors/delegate-build/delegate-build.impl.js.map +1 -1
- package/src/executors/package/package.impl.js +4 -4
- package/src/executors/package/package.impl.js.map +1 -1
- package/src/executors/utilities/tailwindcss.js +3 -3
- package/src/executors/utilities/tailwindcss.js.map +1 -1
- package/src/generators/component/component.compat.d.ts +2 -0
- package/src/generators/component/component.compat.js +6 -0
- package/src/generators/component/component.compat.js.map +1 -0
- package/src/generators/component/component.d.ts +4 -0
- package/src/generators/component/component.js +78 -0
- package/src/generators/component/component.js.map +1 -0
- package/src/generators/component/schema.d.ts +17 -0
- package/src/generators/component/schema.json +101 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.d.ts +2 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.js +6 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.js.map +1 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +3 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +32 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js.map +1 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +5 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +449 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +24 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +49 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +20 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/index.d.ts +6 -0
- package/src/generators/convert-to-with-mf/lib/index.js +10 -0
- package/src/generators/convert-to-with-mf/lib/index.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +5 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +63 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +13 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +3 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +48 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/schema.d.ts +3 -0
- package/src/generators/convert-to-with-mf/schema.json +20 -0
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +15 -1
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.d.ts +2 -2
- package/src/generators/init/schema.json +5 -0
- package/src/generators/mfe-host/schema.json +1 -1
- package/src/generators/mfe-remote/mfe-remote.js +14 -1
- package/src/generators/mfe-remote/mfe-remote.js.map +1 -1
- package/src/generators/mfe-remote/schema.json +1 -1
- package/src/generators/move/lib/update-ng-package.js +2 -2
- package/src/generators/move/lib/update-ng-package.js.map +1 -1
- package/src/generators/ng-add/compat.d.ts +2 -0
- package/src/generators/ng-add/compat.js +6 -0
- package/src/generators/ng-add/compat.js.map +1 -0
- package/src/generators/ng-add/files/decorate-angular-cli/decorate-angular-cli.js__tmpl__ +69 -0
- package/src/generators/ng-add/files/prettier/__dot__prettierignore +1 -0
- package/src/generators/ng-add/files/root/karma.conf.js__tmpl__ +43 -0
- package/src/generators/ng-add/files/root/libs/__dot__gitkeep +0 -0
- package/src/generators/ng-add/files/root/nx.json__tmpl__ +29 -0
- package/src/generators/ng-add/files/root/tools/schematics/__dot__gitkeep +0 -0
- package/src/generators/ng-add/files/root/tools/tsconfig.tools.json__tmpl__ +12 -0
- package/src/generators/ng-add/migrate-from-angular-cli.d.ts +3 -0
- package/src/generators/ng-add/migrate-from-angular-cli.js +627 -0
- package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -0
- package/src/generators/ng-add/ng-add.d.ts +4 -0
- package/src/generators/ng-add/ng-add.js +20 -0
- package/src/generators/ng-add/ng-add.js.map +1 -0
- package/src/generators/ng-add/schema.d.ts +19 -0
- package/src/generators/ng-add/schema.json +71 -0
- package/src/generators/scam/lib/create-module.js +1 -1
- package/src/generators/scam/lib/create-module.js.map +1 -1
- package/src/generators/scam/scam.js +2 -2
- package/src/generators/scam/scam.js.map +1 -1
- package/src/generators/scam-directive/lib/create-module.js +1 -1
- package/src/generators/scam-directive/lib/create-module.js.map +1 -1
- package/src/generators/scam-directive/scam-directive.js +2 -2
- package/src/generators/scam-directive/scam-directive.js.map +1 -1
- package/src/generators/scam-pipe/lib/create-module.js +1 -1
- package/src/generators/scam-pipe/lib/create-module.js.map +1 -1
- package/src/generators/scam-pipe/scam-pipe.js +2 -2
- package/src/generators/scam-pipe/scam-pipe.js.map +1 -1
- package/src/generators/setup-mfe/files/webpack/webpack.config.js__tmpl__ +8 -59
- package/src/generators/setup-mfe/lib/add-remote-to-host.d.ts +1 -0
- package/src/generators/setup-mfe/lib/add-remote-to-host.js +15 -6
- package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-mfe/lib/generate-config.js +1 -12
- package/src/generators/setup-mfe/lib/generate-config.js.map +1 -1
- package/src/generators/setup-mfe/setup-mfe.d.ts +2 -2
- package/src/generators/setup-mfe/setup-mfe.js +0 -9
- package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
- package/src/generators/utils/path.d.ts +1 -0
- package/src/generators/utils/path.js +11 -0
- package/src/generators/utils/path.js.map +1 -0
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js +2 -2
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js.map +1 -1
- package/src/utils/get-mfe-projects.d.ts +3 -1
- package/src/utils/get-mfe-projects.js +5 -2
- package/src/utils/get-mfe-projects.js.map +1 -1
- package/src/utils/mfe/mfe-webpack.d.ts +17 -0
- package/src/utils/{mfe-webpack.js → mfe/mfe-webpack.js} +8 -8
- package/src/utils/mfe/mfe-webpack.js.map +1 -0
- package/src/utils/mfe/with-module-federation.d.ts +9 -0
- package/src/utils/mfe/with-module-federation.js +153 -0
- package/src/utils/mfe/with-module-federation.js.map +1 -0
- package/src/utils/versions.d.ts +3 -4
- package/src/utils/versions.js +5 -6
- package/src/utils/versions.js.map +1 -1
- package/src/utils/mfe-webpack.d.ts +0 -7
- package/src/utils/mfe-webpack.js.map +0 -1
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const architect_1 = require("@angular-devkit/architect");
|
|
5
5
|
const build_angular_1 = require("@angular-devkit/build-angular");
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const
|
|
7
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
8
8
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const path_1 = require("path");
|
|
@@ -31,17 +31,17 @@ function buildAppWithCustomWebpackConfiguration(options, context, pathToWebpackC
|
|
|
31
31
|
return (0, build_angular_1.executeBrowserBuilder)(options, context, {
|
|
32
32
|
webpackConfiguration: (baseWebpackConfig) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
33
33
|
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, options.tsConfig);
|
|
34
|
+
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
35
|
+
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
36
|
+
// then await will just resolve that object.
|
|
37
|
+
const config = yield customWebpackConfiguration;
|
|
34
38
|
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
|
35
39
|
// for instance: `module.exports = async config => { ... }`.
|
|
36
|
-
if (typeof
|
|
37
|
-
return
|
|
40
|
+
if (typeof config === 'function') {
|
|
41
|
+
return config(baseWebpackConfig, options, context.target);
|
|
38
42
|
}
|
|
39
43
|
else {
|
|
40
|
-
return (0, webpack_merge_1.merge)(baseWebpackConfig,
|
|
41
|
-
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
42
|
-
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
43
|
-
// then await will just resolve that object.
|
|
44
|
-
yield customWebpackConfiguration);
|
|
44
|
+
return (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
|
45
45
|
}
|
|
46
46
|
}),
|
|
47
47
|
});
|
|
@@ -51,11 +51,11 @@ function run(options, context) {
|
|
|
51
51
|
(_a = options.buildLibsFromSource) !== null && _a !== void 0 ? _a : (options.buildLibsFromSource = true);
|
|
52
52
|
let dependencies;
|
|
53
53
|
if (!options.buildLibsFromSource) {
|
|
54
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
54
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.workspaceRoot, context.target.project, context.target.target, context.target.configuration);
|
|
55
55
|
dependencies = result.dependencies;
|
|
56
56
|
options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.workspaceRoot, options.tsConfig), context.workspaceRoot, result.target.data.root, dependencies);
|
|
57
|
+
process.env.NX_TSCONFIG_PATH = options.tsConfig;
|
|
57
58
|
}
|
|
58
|
-
process.env.NX_TSCONFIG_PATH = options.tsConfig;
|
|
59
59
|
return (0, rxjs_1.of)(!options.buildLibsFromSource
|
|
60
60
|
? (0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.workspaceRoot, context.target.project, context.target.target, dependencies)
|
|
61
61
|
: true).pipe((0, operators_1.switchMap)((result) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-browser.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":";;;AAAA,yDAImC;AACnC,iEAAsE;AAGtE,yCAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"webpack-browser.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":";;;AAAA,yDAImC;AACnC,iEAAsE;AAGtE,yCAAiD;AACjD,yCAAsD;AACtD,6FAK4D;AAC5D,2BAAgC;AAChC,+BAA4B;AAC5B,+BAAsC;AACtC,8CAA2C;AAC3C,iDAAsC;AACtC,kDAAkE;AASlE,SAAS,QAAQ,CACf,OAA6B,EAC7B,OAAuB;IAEvB,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,KAC9C,OAAO,EAD4C,eAAe,uBAClE,OAAO,EADH,8CAAgE,CAC7D,CAAC;IACV,8CAA8C;IAC9C,mDAAmD;IACnD,IAAI,mBAAmB,IAAI,mBAAmB,CAAC,IAAI,EAAE;QACnD,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,OAAO,CAAC,aAAa,EACrB,mBAAmB,CAAC,IAAI,CACzB,CAAC;QAEF,IAAI,IAAA,eAAU,EAAC,mBAAmB,CAAC,EAAE;YACnC,OAAO,sCAAsC,CAC3C,eAAe,EACf,OAAO,EACP,mBAAmB,CACpB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CACb,0IAA0I,mBAAmB,EAAE,CAChK,CAAC;SACH;KACF;IAED,OAAO,IAAA,qCAAqB,EAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,sCAAsC,CAC7C,OAAe,EACf,OAAuB,EACvB,mBAA2B;IAE3B,OAAO,IAAA,qCAAqB,EAAC,OAAO,EAAE,OAAc,EAAE;QACpD,oBAAoB,EAAE,CAAO,iBAAiB,EAAE,EAAE;YAChD,MAAM,0BAA0B,GAAG,IAAA,oCAA0B,EAC3D,mBAAmB,EACnB,OAAO,CAAC,QAAQ,CACjB,CAAC;YACF,gFAAgF;YAChF,yFAAyF;YACzF,4CAA4C;YAC5C,MAAM,MAAM,GAAG,MAAM,0BAA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;QACH,CAAC,CAAC,IAAI,CACT,CAAC,IAAI,CACJ,IAAA,qBAAS,EAAC,CAAC,MAAM,EAAE,EAAE;QACnB,IAAI,MAAM,EAAE;YACV,OAAO,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,0BAA0B;YAC1B,OAAO,IAAA,SAAE,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SAC/B;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,yBAAa,EAAoC,GAAG,CAAQ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"title": "Webpack Server
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "Schema for Webpack Server",
|
|
4
|
+
"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.",
|
|
5
|
+
"examplesFile": "../../../docs/webpack-server-examples.md",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"browserTarget": {
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const architect_1 = require("@angular-devkit/architect");
|
|
6
6
|
const dev_server_1 = require("@angular-devkit/build-angular/src/builders/dev-server");
|
|
7
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
|
-
const workspace_1 = require("nx/src/shared/workspace");
|
|
9
8
|
const fs_1 = require("fs");
|
|
10
9
|
const webpack_merge_1 = require("webpack-merge");
|
|
11
10
|
const webpack_1 = require("../utilities/webpack");
|
|
@@ -14,7 +13,7 @@ function webpackServer(schema, context) {
|
|
|
14
13
|
var _a;
|
|
15
14
|
process.env.NX_TSCONFIG_PATH = (0, devkit_1.joinPathFragments)(context.workspaceRoot, 'tsconfig.base.json');
|
|
16
15
|
const options = (0, lib_1.normalizeOptions)(schema);
|
|
17
|
-
const workspaceConfig = new
|
|
16
|
+
const workspaceConfig = new devkit_1.Workspaces(context.workspaceRoot).readWorkspaceConfiguration();
|
|
18
17
|
const parsedBrowserTarget = (0, devkit_1.parseTargetString)(options.browserTarget);
|
|
19
18
|
const buildTarget = workspaceConfig.projects[parsedBrowserTarget.project].targets[parsedBrowserTarget.target];
|
|
20
19
|
const selectedConfiguration = parsedBrowserTarget.configuration
|
|
@@ -29,17 +28,17 @@ function webpackServer(schema, context) {
|
|
|
29
28
|
return (0, dev_server_1.serveWebpackBrowser)(options, context, {
|
|
30
29
|
webpackConfiguration: (baseWebpackConfig) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
31
30
|
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, buildTarget.options.tsConfig);
|
|
31
|
+
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
32
|
+
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
33
|
+
// then await will just resolve that object.
|
|
34
|
+
const config = yield customWebpackConfiguration;
|
|
32
35
|
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
|
33
36
|
// for instance: `module.exports = async config => { ... }`.
|
|
34
|
-
if (typeof
|
|
35
|
-
return
|
|
37
|
+
if (typeof config === 'function') {
|
|
38
|
+
return config(baseWebpackConfig, selectedConfiguration, context.target);
|
|
36
39
|
}
|
|
37
40
|
else {
|
|
38
|
-
return (0, webpack_merge_1.merge)(baseWebpackConfig,
|
|
39
|
-
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
40
|
-
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
41
|
-
// then await will just resolve that object.
|
|
42
|
-
yield customWebpackConfiguration);
|
|
41
|
+
return (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
|
43
42
|
}
|
|
44
43
|
}),
|
|
45
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,sFAG+D;AAE/D,
|
|
1
|
+
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,sFAG+D;AAE/D,yCAAgF;AAChF,2BAAgC;AAChC,iDAAsC;AACtC,kDAAkE;AAClE,+BAAyC;AAGzC,SAAgB,aAAa,CAAC,MAAc,EAAE,OAAuB;;IACnE,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAA,0BAAiB,EAC9C,OAAO,CAAC,aAAa,EACrB,oBAAoB,CACrB,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,MAAM,CAAC,CAAC;IACzC,MAAM,eAAe,GAAG,IAAI,mBAAU,CACpC,OAAO,CAAC,aAAa,CACtB,CAAC,0BAA0B,EAAE,CAAC;IAE/B,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACrE,MAAM,WAAW,GACf,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,OAAO,CAC3D,mBAAmB,CAAC,MAAM,CAC3B,CAAC;IAEJ,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,aAAa;QAC7D,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,mBAAmB,CAAC,aAAa,CAAC;QAC/D,CAAC,CAAC,WAAW,CAAC,oBAAoB;YAClC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,WAAW,CAAC,oBAAoB,CAAC;YAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;IAExB,MAAM,mBAAmB,GACvB,MAAA,qBAAqB,CAAC,mBAAmB,mCACzC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC;IAE1C,IAAI,mBAAmB,IAAI,mBAAmB,CAAC,IAAI,EAAE;QACnD,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,OAAO,CAAC,aAAa,EACrB,mBAAmB,CAAC,IAAI,CACzB,CAAC;QAEF,IAAI,IAAA,eAAU,EAAC,mBAAmB,CAAC,EAAE;YACnC,OAAO,IAAA,gCAAmB,EACxB,OAAkC,EAClC,OAAc,EACd;gBACE,oBAAoB,EAAE,CAAO,iBAAiB,EAAE,EAAE;oBAChD,MAAM,0BAA0B,GAAG,IAAA,oCAA0B,EAC3D,mBAAmB,EACnB,WAAW,CAAC,OAAO,CAAC,QAAQ,CAC7B,CAAC;oBACF,gFAAgF;oBAChF,yFAAyF;oBACzF,4CAA4C;oBAC5C,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC;oBAEhD,0FAA0F;oBAC1F,4DAA4D;oBAC5D,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;wBAChC,OAAO,MAAM,CACX,iBAAiB,EACjB,qBAAqB,EACrB,OAAO,CAAC,MAAM,CACf,CAAC;qBACH;yBAAM;wBACL,OAAO,IAAA,qBAAK,EAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;qBACzC;gBACH,CAAC,CAAA;aACF,CACF,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CACb,0IAA0I,mBAAmB,EAAE,CAChK,CAAC;SACH;KACF;IAED,OAAO,IAAA,gCAAmB,EACxB,OAAkC,EAClC,OAAc,CACf,CAAC;AACJ,CAAC;AAzED,sCAyEC;AAED,kBAAe,IAAA,yBAAa,EAAsB,aAAa,CAAQ,CAAC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.delegateBuildExecutor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const
|
|
6
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
7
7
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
8
8
|
function delegateBuildExecutor(options, context) {
|
|
9
9
|
return (0, tslib_1.__asyncGenerator)(this, arguments, function* delegateBuildExecutor_1() {
|
|
10
|
-
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
10
|
+
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
11
11
|
options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.root, options.tsConfig), context.root, target.data.root, dependencies);
|
|
12
12
|
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
13
13
|
return yield (0, tslib_1.__await)({ success: false });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate-build.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/delegate-build/delegate-build.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,
|
|
1
|
+
{"version":3,"file":"delegate-build.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/delegate-build/delegate-build.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,yCAAsD;AACtD,6FAI4D;AAG5D,SAAuB,qBAAqB,CAC1C,OAAoC,EACpC,OAAwB;;QAExB,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,mDAA4B,EAC3D,IAAA,+BAAsB,GAAE,EACxB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,iBAAiB,CAC1B,CAAC;QAEF,OAAO,CAAC,QAAQ,GAAG,IAAA,wCAAiB,EAClC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EACjD,OAAO,CAAC,IAAI,EACZ,MAAM,CAAC,IAAI,CAAC,IAAI,EAChB,YAAY,CACb,CAAC;QAEF,IACE,CAAC,IAAA,0DAAmC,EAClC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,YAAY,CACb,EACD;YACA,kCAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAC;SAC3B;QAED,MAAM,EAAE,WAAW,KAAuB,OAAO,EAAzB,aAAa,uBAAK,OAAO,EAA3C,eAAiC,CAAU,CAAC;QAClD,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,WAAW,CAAC,CAAC;QAEtD,2BAAA,KAAK,CAAC,CAAC,8BAAA,2BAAA,2BAAM,IAAA,oBAAW,EAAC,cAAc,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA,CAAA,CAAA,CAAA,CAAC;IACnE,CAAC;CAAA;AAlCD,sDAkCC;AAED,kBAAe,qBAAqB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageExecutor = exports.createLibraryExecutor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
@@ -38,14 +38,14 @@ function initializeNgPackagr(options, context, projectDependencies) {
|
|
|
38
38
|
function createLibraryExecutor(initializeNgPackagr) {
|
|
39
39
|
return function (options, context) {
|
|
40
40
|
return (0, tslib_1.__asyncGenerator)(this, arguments, function* () {
|
|
41
|
-
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
41
|
+
const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
42
42
|
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
43
43
|
return yield (0, tslib_1.__await)(Promise.resolve({ success: false }));
|
|
44
44
|
}
|
|
45
45
|
function updatePackageJson() {
|
|
46
|
-
if (
|
|
46
|
+
if (topLevelDependencies.length > 0 &&
|
|
47
47
|
options.updateBuildableProjectDepsInPackageJson) {
|
|
48
|
-
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target,
|
|
48
|
+
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target, topLevelDependencies, options.buildableProjectDepsInPackageJsonType);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
if (options.watch) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/package/package.impl.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"package.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/package/package.impl.ts"],"names":[],"mappings":";;;;AACA,yCAAsD;AACtD,6FAM4D;AAE5D,+BAA+B;AAC/B,+BAA4B;AAC5B,mDAA+C;AAC/C,8CAAuD;AACvD,mGAA0G;AAC1G,+EAAkF;AAClF,+EAGwD;AAGxD,SAAe,mBAAmB,CAChC,OAA2C,EAC3C,OAAwB,EACxB,mBAAoD;;QAEpD,MAAM,QAAQ,GAAG,IAAI,CAAC,2CAAa,YAAY,EAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,GAAG,iCAAoB;YACvB,GAAG,yCAAwB;YAC3B,IAAA,6BAAgB,EAAC;gBACf,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,KAAK,EAAE,OAAO,CAAC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nB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,iBAAiB,EACzB,MAAM,EACN,oBAAoB,EACpB,OAAO,CAAC,qCAAqC,CAC9C,CAAC;iBACH;YACH,CAAC;YAED,IAAI,OAAO,CAAC,KAAK,EAAE;gBACjB,kCAAO,2BAAA,KAAK,CAAC,CAAC,8BAAA,2BAAA,IAAA,8BAAa,EACzB,IAAA,WAAI,EAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAC5D,IAAA,qBAAS,EAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EACvC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAC9B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACzB,CACF,CAAA,CAAA,CAAA,EAAC;aACH;YAED,kCAAO,IAAA,WAAI,EAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;iBAC7D,IAAI,CACH,IAAA,qBAAS,EAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EACvC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAC9B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACzB;iBACA,SAAS,EAAE,EAAC;QACjB,CAAC;KAAA,CAAC;AACJ,CAAC;AAjED,sDAiEC;AAEY,QAAA,eAAe,GAAG,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;AAE1E,kBAAe,uBAAe,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTailwindPostCssPlugins = exports.getTailwindSetup = exports.tailwindDirectives = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const postcssImport = require("postcss-import");
|
|
@@ -19,7 +19,7 @@ function getTailwindSetup(basePath, tailwindConfig) {
|
|
|
19
19
|
if (!tailwindConfigPath) {
|
|
20
20
|
// Try to find TailwindCSS configuration file in the project or workspace root.
|
|
21
21
|
const tailwindConfigFile = 'tailwind.config.js';
|
|
22
|
-
for (const path of [basePath,
|
|
22
|
+
for (const path of [basePath, devkit_2.appRootPath]) {
|
|
23
23
|
const fullPath = (0, path_1.join)(path, tailwindConfigFile);
|
|
24
24
|
if ((0, fs_1.existsSync)(fullPath)) {
|
|
25
25
|
tailwindConfigPath = fullPath;
|
|
@@ -36,7 +36,7 @@ function getTailwindSetup(basePath, tailwindConfig) {
|
|
|
36
36
|
tailwindPackagePath = require.resolve('tailwindcss');
|
|
37
37
|
}
|
|
38
38
|
catch (_a) {
|
|
39
|
-
const relativeTailwindConfigPath = (0, path_1.relative)(
|
|
39
|
+
const relativeTailwindConfigPath = (0, path_1.relative)(devkit_2.appRootPath, tailwindConfigPath);
|
|
40
40
|
devkit_1.logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
|
|
41
41
|
` but the 'tailwindcss' package is not installed.` +
|
|
42
42
|
` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/utilities/tailwindcss.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/utilities/tailwindcss.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,yCAA2C;AAC3C,2BAAgC;AAChC,+BAAsC;AACtC,gDAAgD;AAOnC,QAAA,kBAAkB,G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G,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;KAC1D;IAED,OAAO;QACL,aAAa,CAAC;YACZ,qBAAqB,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE;YACzC,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;SACzE,CAAC;QACF,OAAO,CAAC,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC;AAhBD,8DAgBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const component_1 = require("./component");
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxGenerator)(component_1.default);
|
|
6
|
+
//# sourceMappingURL=component.compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.compat.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/component/component.compat.ts"],"names":[],"mappings":";;AAAA,2CAA6C;AAC7C,yCAAkD;AAElD,kBAAe,IAAA,2BAAkB,EAAC,mBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
|
|
7
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
8
|
+
const path_1 = require("../utils/path");
|
|
9
|
+
function componentGenerator(tree, schema) {
|
|
10
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
11
|
+
checkPathUnderProjectRoot(tree, schema);
|
|
12
|
+
const angularComponentSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'component');
|
|
13
|
+
yield angularComponentSchematic(tree, Object.assign(Object.assign({}, schema), { skipImport: true }));
|
|
14
|
+
exportComponent(tree, schema);
|
|
15
|
+
yield (0, devkit_2.formatFiles)(tree);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.componentGenerator = componentGenerator;
|
|
19
|
+
function checkPathUnderProjectRoot(tree, schema) {
|
|
20
|
+
var _a;
|
|
21
|
+
if (!schema.path) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const project = (_a = schema.project) !== null && _a !== void 0 ? _a : (0, devkit_2.readWorkspaceConfiguration)(tree).defaultProject;
|
|
25
|
+
const { root } = (0, devkit_2.readProjectConfiguration)(tree, project);
|
|
26
|
+
let pathToComponent = (0, devkit_2.normalizePath)(schema.path);
|
|
27
|
+
pathToComponent = pathToComponent.startsWith('/')
|
|
28
|
+
? pathToComponent.slice(1)
|
|
29
|
+
: pathToComponent;
|
|
30
|
+
if (!(0, path_1.pathStartsWith)(pathToComponent, root)) {
|
|
31
|
+
throw new Error(`The path provided for the component (${schema.path}) does not exist under the project root (${root}).`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function exportComponent(tree, schema) {
|
|
35
|
+
var _a, _b, _c;
|
|
36
|
+
if (!schema.export) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const project = (_a = schema.project) !== null && _a !== void 0 ? _a : (0, devkit_2.readWorkspaceConfiguration)(tree).defaultProject;
|
|
40
|
+
const { root, sourceRoot, projectType } = (0, devkit_2.readProjectConfiguration)(tree, project);
|
|
41
|
+
if (projectType === 'application') {
|
|
42
|
+
devkit_1.logger.warn('--export=true was ignored as the project the component being generated in is not a library.');
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const componentNames = (0, devkit_1.names)(schema.name);
|
|
46
|
+
const componentFileName = `${componentNames.fileName}.${(_b = schema.type) !== null && _b !== void 0 ? _b : 'component'}`;
|
|
47
|
+
let componentDirectory = schema.flat
|
|
48
|
+
? (0, devkit_1.joinPathFragments)(sourceRoot, 'lib')
|
|
49
|
+
: (0, devkit_1.joinPathFragments)(sourceRoot, 'lib', componentNames.fileName);
|
|
50
|
+
if (schema.path) {
|
|
51
|
+
componentDirectory = schema.flat
|
|
52
|
+
? (0, devkit_2.normalizePath)(schema.path)
|
|
53
|
+
: (0, devkit_1.joinPathFragments)(schema.path, componentNames.fileName);
|
|
54
|
+
}
|
|
55
|
+
const componentFilePath = (0, devkit_1.joinPathFragments)(componentDirectory, `${componentFileName}.ts`);
|
|
56
|
+
const ngPackageJsonPath = (0, devkit_1.joinPathFragments)(root, 'ng-package.json');
|
|
57
|
+
const ngPackageEntryPoint = tree.exists(ngPackageJsonPath)
|
|
58
|
+
? (_c = (0, devkit_1.readJson)(tree, ngPackageJsonPath).lib) === null || _c === void 0 ? void 0 : _c.entryFile
|
|
59
|
+
: undefined;
|
|
60
|
+
const projectEntryPoint = ngPackageEntryPoint
|
|
61
|
+
? (0, devkit_1.joinPathFragments)(root, ngPackageEntryPoint)
|
|
62
|
+
: (0, devkit_1.joinPathFragments)(sourceRoot, `index.ts`);
|
|
63
|
+
if (!tree.exists(projectEntryPoint)) {
|
|
64
|
+
// Let's not error, simply warn the user
|
|
65
|
+
// It's not too much effort to manually do this
|
|
66
|
+
// It would be more frustrating to have to find the correct path and re-run the command
|
|
67
|
+
devkit_1.logger.warn(`Could not export the component in the library's entry point. Unable to determine project's entry point. The path ${projectEntryPoint} does not exist. The component has still been created.`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const relativePathFromEntryPoint = `.${componentFilePath
|
|
71
|
+
.split(sourceRoot)[1]
|
|
72
|
+
.replace('.ts', '')}`;
|
|
73
|
+
const updateEntryPointContent = `${tree.read(projectEntryPoint, 'utf-8')}
|
|
74
|
+
export * from "${relativePathFromEntryPoint}";`;
|
|
75
|
+
tree.write(projectEntryPoint, updateEntryPointContent);
|
|
76
|
+
}
|
|
77
|
+
exports.default = componentGenerator;
|
|
78
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/component/component.ts"],"names":[],"mappings":";;;;AAAA,yCAAgF;AAEhF,8DAAwE;AACxE,yCAKsB;AAEtB,wCAA+C;AAE/C,SAAsB,kBAAkB,CAAC,IAAU,EAAE,MAAc;;QACjE,yBAAyB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAExC,MAAM,yBAAyB,GAAG,IAAA,0CAA0B,EAC1D,qBAAqB,EACrB,WAAW,CACZ,CAAC;QACF,MAAM,yBAAyB,CAAC,IAAI,kCAC/B,MAAM,KACT,UAAU,EAAE,IAAI,IAChB,CAAC;QAEH,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE9B,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAfD,gDAeC;AAED,SAAS,yBAAyB,CAAC,IAAU,EAAE,MAAuB;;IACpE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAChB,OAAO;KACR;IAED,MAAM,OAAO,GACX,MAAA,MAAM,CAAC,OAAO,mCAAI,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC,cAAc,CAAC;IACpE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEzD,IAAI,eAAe,GAAG,IAAA,sBAAa,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjD,eAAe,GAAG,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC;QAC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
|
|
4
|
+
project?: string;
|
|
5
|
+
displayBlock?: boolean;
|
|
6
|
+
inlineStyle?: boolean;
|
|
7
|
+
inlineTemplate?: boolean;
|
|
8
|
+
viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
|
|
9
|
+
changeDetection?: 'Default' | 'OnPush';
|
|
10
|
+
style?: 'css' | 'scss' | 'sass' | 'less' | 'none';
|
|
11
|
+
skipTests?: boolean;
|
|
12
|
+
type?: string;
|
|
13
|
+
flat?: boolean;
|
|
14
|
+
selector?: string;
|
|
15
|
+
skipSelector?: boolean;
|
|
16
|
+
export?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "SchematicsAngularComponent",
|
|
4
|
+
"title": "Angular Component Schema",
|
|
5
|
+
"cli": "nx",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"description": "Creates a new, generic component definition in the given or default project.",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "path",
|
|
13
|
+
"description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
|
|
14
|
+
"visible": false
|
|
15
|
+
},
|
|
16
|
+
"project": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The name of the project.",
|
|
19
|
+
"$default": {
|
|
20
|
+
"$source": "projectName"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The name of the component.",
|
|
26
|
+
"$default": {
|
|
27
|
+
"$source": "argv",
|
|
28
|
+
"index": 0
|
|
29
|
+
},
|
|
30
|
+
"x-prompt": "What name would you like to use for the component?"
|
|
31
|
+
},
|
|
32
|
+
"displayBlock": {
|
|
33
|
+
"description": "Specifies if the style will contain `:host { display: block; }`.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"alias": "b"
|
|
37
|
+
},
|
|
38
|
+
"inlineStyle": {
|
|
39
|
+
"description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"default": false,
|
|
42
|
+
"alias": "s"
|
|
43
|
+
},
|
|
44
|
+
"inlineTemplate": {
|
|
45
|
+
"description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false,
|
|
48
|
+
"alias": "t"
|
|
49
|
+
},
|
|
50
|
+
"viewEncapsulation": {
|
|
51
|
+
"description": "The view encapsulation strategy to use in the new component.",
|
|
52
|
+
"enum": ["Emulated", "None", "ShadowDom"],
|
|
53
|
+
"type": "string",
|
|
54
|
+
"alias": "v"
|
|
55
|
+
},
|
|
56
|
+
"changeDetection": {
|
|
57
|
+
"description": "The change detection strategy to use in the new component.",
|
|
58
|
+
"enum": ["Default", "OnPush"],
|
|
59
|
+
"type": "string",
|
|
60
|
+
"default": "Default",
|
|
61
|
+
"alias": "c"
|
|
62
|
+
},
|
|
63
|
+
"style": {
|
|
64
|
+
"description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"default": "css",
|
|
67
|
+
"enum": ["css", "scss", "sass", "less", "none"]
|
|
68
|
+
},
|
|
69
|
+
"skipTests": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"description": "Do not create \"spec.ts\" test files for the new component.",
|
|
72
|
+
"default": false
|
|
73
|
+
},
|
|
74
|
+
"flat": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Create the new files at the top level of the current project.",
|
|
77
|
+
"default": false
|
|
78
|
+
},
|
|
79
|
+
"selector": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"format": "html-selector",
|
|
82
|
+
"description": "The HTML selector to use for this component."
|
|
83
|
+
},
|
|
84
|
+
"skipSelector": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"default": false,
|
|
87
|
+
"description": "Specifies if the component should have a selector or not."
|
|
88
|
+
},
|
|
89
|
+
"type": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
|
|
92
|
+
"default": "component"
|
|
93
|
+
},
|
|
94
|
+
"export": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Specifies if the component should be exported in the declaring NgModule. Additionally, if the project is a library, the component will be exported from the project's entry point (normally `index.ts`).",
|
|
97
|
+
"default": false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": ["name"]
|
|
101
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const convert_to_with_mf_1 = require("./convert-to-with-mf");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxGenerator)(convert_to_with_mf_1.default);
|
|
6
|
+
//# sourceMappingURL=convert-to-with-mf.compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-to-with-mf.compat.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.compat.ts"],"names":[],"mappings":";;AAAA,yCAAkD;AAClD,6DAAmD;AAEnD,kBAAe,IAAA,2BAAkB,EAAC,4BAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
6
|
+
const get_mfe_projects_1 = require("../../utils/get-mfe-projects");
|
|
7
|
+
const lib_1 = require("./lib");
|
|
8
|
+
function convertToWithMF(tree, schema) {
|
|
9
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
10
|
+
const projects = new Set((0, get_mfe_projects_1.getMfeProjects)(tree, { legacy: true }));
|
|
11
|
+
if (!projects.has(schema.project)) {
|
|
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
|
+
}
|
|
14
|
+
const project = (0, devkit_2.readProjectConfiguration)(tree, schema.project);
|
|
15
|
+
const pathToWebpackConfig = (0, lib_1.getWebpackConfigPath)(project, schema.project);
|
|
16
|
+
const webpackAst = (0, lib_1.parseASTOfWebpackConfig)(tree, pathToWebpackConfig);
|
|
17
|
+
if (!(0, lib_1.checkOutputNameMatchesProjectName)(webpackAst, schema.project)) {
|
|
18
|
+
throw new Error(`Cannot automatically migrate "${schema.project}" to "withModuleFederation" micro frontend webpack config.
|
|
19
|
+
"uniqueName" in webpack config (${pathToWebpackConfig}) does not match project name.`);
|
|
20
|
+
}
|
|
21
|
+
if (!(0, lib_1.checkSharedNpmPackagesMatchExpected)(webpackAst)) {
|
|
22
|
+
throw new Error(`Cannot automatically migrate "${schema.project}" to "withModuleFederation" micro frontend webpack config.
|
|
23
|
+
There are npm packages being shared with a custom configuration in webpack config (${pathToWebpackConfig}).`);
|
|
24
|
+
}
|
|
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 = (0, lib_1.writeNewWebpackConfig)(webpackAst, (0, lib_1.isHostRemoteConfig)(webpackAst), schema.project);
|
|
27
|
+
tree.write(pathToWebpackConfig, updatedWebpackConfig);
|
|
28
|
+
yield (0, devkit_2.formatFiles)(tree);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.default = convertToWithMF;
|
|
32
|
+
//# sourceMappingURL=convert-to-with-mf.js.map
|
|
@@ -0,0 +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,yCAA4C;AAG5C,yCAAqE;AACrE,mEAA8D;AAC9D,+BAOe;AAEf,SAA8B,eAAe,CAAC,IAAU,EAAE,MAAc;;QACtE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAA,iCAAc,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEjE,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,oBAAoB,GAAG,IAAA,2BAAqB,EAChD,UAAU,EACV,IAAA,wBAAkB,EAAC,UAAU,CAAC,EAC9B,MAAM,CAAC,OAAO,CACf,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;QAEtD,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAvCD,kCAuCC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const STANDARD_HOST_MFE_CONFIG = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nrwl/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nrwl/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'host1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n remotes: {\n remote1: 'http://localhost:4201/remoteEntry.mjs',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
|
|
2
|
+
export declare const STANDARD_REMOTE_MFE_CONFIG = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nrwl/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nrwl/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'remote1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
|
|
3
|
+
export declare const OLD_OBJECT_SHARED_SYNTAX = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nrwl/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nrwl/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'remote1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: {\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n },\n ...sharedMappings.getDescriptors(),\n },\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};";
|
|
4
|
+
export declare const ERROR_NAME_DOESNT_MATCH = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nrwl/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nrwl/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'somethingelse',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
|
|
5
|
+
export declare const ERROR_SHARED_PACKAGES_DOESNT_MATCH = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nrwl/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nrwl/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'host1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n remotes: {\n remote1: 'http://localhost:4201/remoteEntry.mjs',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: '13.0.0',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: false,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
|