@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseASTOfWebpackConfig = void 0;
|
|
4
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
5
|
+
function parseASTOfWebpackConfig(tree, pathToWebpackConfig) {
|
|
6
|
+
if (!tree.exists(pathToWebpackConfig)) {
|
|
7
|
+
throw new Error(`Cannot migrate webpack config at \`${pathToWebpackConfig}\` as it does not exist. Please ensure this file exists and that the path to the file is correct.`);
|
|
8
|
+
}
|
|
9
|
+
const source = tree.read(pathToWebpackConfig, 'utf-8');
|
|
10
|
+
return tsquery_1.tsquery.ast(source);
|
|
11
|
+
}
|
|
12
|
+
exports.parseASTOfWebpackConfig = parseASTOfWebpackConfig;
|
|
13
|
+
//# sourceMappingURL=parse-ast-webpack-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-ast-webpack-config.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AAEpD,SAAgB,uBAAuB,CACrC,IAAU,EACV,mBAA2B;IAE3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE;QACrC,MAAM,IAAI,KAAK,CACb,sCAAsC,mBAAmB,mGAAmG,CAC7J,CAAC;KACH;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,iBAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAZD,0DAYC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.writeNewWebpackConfig = void 0;
|
|
4
|
+
const is_host_remote_config_1 = require("./is-host-remote-config");
|
|
5
|
+
function writeNewWebpackConfig(ast, mfType, projectName) {
|
|
6
|
+
let webpackConfig = '';
|
|
7
|
+
if (!mfType) {
|
|
8
|
+
webpackConfig = `const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
|
9
|
+
module.exports = withModuleFederation({
|
|
10
|
+
name: '${projectName}',
|
|
11
|
+
});`;
|
|
12
|
+
}
|
|
13
|
+
else if (mfType === 'host') {
|
|
14
|
+
const remotes = hostRemotesToString(ast);
|
|
15
|
+
webpackConfig = `const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
|
16
|
+
module.exports = withModuleFederation({
|
|
17
|
+
name: '${projectName}',
|
|
18
|
+
remotes: ${remotes},
|
|
19
|
+
});`;
|
|
20
|
+
}
|
|
21
|
+
else if (mfType === 'remote') {
|
|
22
|
+
const exposedModules = (0, is_host_remote_config_1.getExposedModulesFromRemote)(ast);
|
|
23
|
+
webpackConfig = `const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
|
24
|
+
module.exports = withModuleFederation({
|
|
25
|
+
name: '${projectName}',
|
|
26
|
+
exposes: ${exposedModules},
|
|
27
|
+
});`;
|
|
28
|
+
}
|
|
29
|
+
else if (mfType === 'both') {
|
|
30
|
+
const remotes = hostRemotesToString(ast);
|
|
31
|
+
const exposedModules = (0, is_host_remote_config_1.getExposedModulesFromRemote)(ast);
|
|
32
|
+
webpackConfig = `const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
|
33
|
+
module.exports = withModuleFederation({
|
|
34
|
+
name: '${projectName}',
|
|
35
|
+
remotes: ${remotes},
|
|
36
|
+
exposes: ${exposedModules},
|
|
37
|
+
});`;
|
|
38
|
+
}
|
|
39
|
+
return webpackConfig;
|
|
40
|
+
}
|
|
41
|
+
exports.writeNewWebpackConfig = writeNewWebpackConfig;
|
|
42
|
+
function hostRemotesToString(ast) {
|
|
43
|
+
const remotes = (0, is_host_remote_config_1.getRemotesFromHost)(ast)
|
|
44
|
+
.reduce((acc, remotePair) => `['${remotePair[0]}', '${remotePair[1]}'], ${acc}`, '')
|
|
45
|
+
.trim();
|
|
46
|
+
return `[${remotes.endsWith(',') ? remotes.slice(0, -1) : remotes}]`;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=write-new-webpack-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-new-webpack-config.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/convert-to-with-mf/lib/write-new-webpack-config.ts"],"names":[],"mappings":";;;AACA,mEAIiC;AAEjC,SAAgB,qBAAqB,CACnC,GAAe,EACf,MAAgC,EAChC,WAAmB;IAEnB,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,CAAC,MAAM,EAAE;QACX,aAAa,GAAG;;mBAED,WAAW;YAClB,CAAC;KACV;SAAM,IAAI,MAAM,KAAK,MAAM,EAAE;QAC5B,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACzC,aAAa,GAAG;;mBAED,WAAW;qBACT,OAAO;YAChB,CAAC;KACV;SAAM,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC9B,MAAM,cAAc,GAAG,IAAA,mDAA2B,EAAC,GAAG,CAAC,CAAC;QACxD,aAAa,GAAG;;mBAED,WAAW;qBACT,cAAc;YACvB,CAAC;KACV;SAAM,IAAI,MAAM,KAAK,MAAM,EAAE;QAC5B,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACzC,MAAM,cAAc,GAAG,IAAA,mDAA2B,EAAC,GAAG,CAAC,CAAC;QACxD,aAAa,GAAG;;eAEL,WAAW;iBACT,OAAO;iBACP,cAAc;QACvB,CAAC;KACN;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AArCD,sDAqCC;AAED,SAAS,mBAAmB,CAAC,GAAe;IAC1C,MAAM,OAAO,GAAW,IAAA,0CAAkB,EAAC,GAAG,CAAC;SAC5C,MAAM,CACL,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,OAAO,GAAG,EAAE,EACvE,EAAE,CACH;SACA,IAAI,EAAE,CAAC;IACV,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "ConvertToWithMFGenerator",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Convert to withModuleFederation Generator Options Schema",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"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!_",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"project": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The name of the micro frontend project to migrate.",
|
|
13
|
+
"$default": {
|
|
14
|
+
"$source": "argv",
|
|
15
|
+
"index": 0
|
|
16
|
+
},
|
|
17
|
+
"x-prompt": "What micro frontend project would you like to migrate?"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
|
-
export declare function angularInitGenerator(host: Tree,
|
|
3
|
+
export declare function angularInitGenerator(host: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
|
|
4
4
|
export default angularInitGenerator;
|
|
@@ -6,12 +6,14 @@ const cypress_1 = require("@nrwl/cypress");
|
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
7
|
const devkit_2 = require("@nrwl/devkit");
|
|
8
8
|
const jest_1 = require("@nrwl/jest");
|
|
9
|
+
const linter_1 = require("@nrwl/linter");
|
|
9
10
|
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
10
11
|
const set_default_collection_1 = require("@nrwl/workspace/src/utilities/set-default-collection");
|
|
11
12
|
const versions_1 = require("../../utils/versions");
|
|
12
13
|
const karma_1 = require("../karma/karma");
|
|
13
|
-
function angularInitGenerator(host,
|
|
14
|
+
function angularInitGenerator(host, rawOptions) {
|
|
14
15
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
16
|
+
const options = normalizeOptions(rawOptions);
|
|
15
17
|
setDefaults(host, options);
|
|
16
18
|
addPostInstall(host);
|
|
17
19
|
const depsTask = !options.skipPackageJson
|
|
@@ -27,6 +29,18 @@ function angularInitGenerator(host, options) {
|
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
exports.angularInitGenerator = angularInitGenerator;
|
|
32
|
+
function normalizeOptions(options) {
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
34
|
+
return {
|
|
35
|
+
e2eTestRunner: (_a = options.e2eTestRunner) !== null && _a !== void 0 ? _a : "cypress" /* Cypress */,
|
|
36
|
+
linter: (_b = options.linter) !== null && _b !== void 0 ? _b : linter_1.Linter.EsLint,
|
|
37
|
+
skipFormat: (_c = options.skipFormat) !== null && _c !== void 0 ? _c : false,
|
|
38
|
+
skipInstall: (_d = options.skipInstall) !== null && _d !== void 0 ? _d : false,
|
|
39
|
+
skipPackageJson: (_e = options.skipPackageJson) !== null && _e !== void 0 ? _e : false,
|
|
40
|
+
style: (_f = options.style) !== null && _f !== void 0 ? _f : 'css',
|
|
41
|
+
unitTestRunner: (_g = options.unitTestRunner) !== null && _g !== void 0 ? _g : "jest" /* Jest */,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
30
44
|
function setDefaults(host, options) {
|
|
31
45
|
const workspace = (0, devkit_2.readWorkspaceConfiguration)(host);
|
|
32
46
|
workspace.generators = workspace.generators || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,2CAAqD;AACrD,yCAA+D;AAC/D,yCAMsB;AACtB,qCAA+C;AAC/C,2FAAqF;AACrF,iGAA4F;AAE5F,mDAK8B;AAC9B,0CAAgD;AAGhD,SAAsB,oBAAoB,CACxC,IAAU,EACV,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,2CAAqD;AACrD,yCAA+D;AAC/D,yCAMsB;AACtB,qCAA+C;AAC/C,yCAAsC;AACtC,2FAAqF;AACrF,iGAA4F;AAE5F,mDAK8B;AAC9B,0CAAgD;AAGhD,SAAsB,oBAAoB,CACxC,IAAU,EACV,UAAkB;;QAElB,MAAM,OAAO,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC7C,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,cAAc,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,eAAe;YACvC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC1B,CAAC,CAAC,GAAG,EAAE,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E,QAAQ;oBACnB,gBAAgB,EAAE,QAAQ;oBAC1B,mBAAmB,EAAE,QAAQ;iBAC9B,CACF;gBACH,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;QACf;YACE,OAAO,IAAA,8BAAoB,EAAC,IAAI,EAAE;gBAChC,eAAe,EAAE,OAAO,CAAC,eAAe;aACzC,CAAC,CAAC;QACL;YACE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;KACnB;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAU,EAAE,KAAa;IAClD,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;QAC7B,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC/C,IAAI,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACjC,OAAO;SACR;QAED,OAAO,GAAG,GAAG,OAAO,KAAK,KAAK,IAAI,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;KACnC;SAAM;QACL,eAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;KACxD;AACH,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
|
|
3
3
|
import type { Styles } from '../utils/types';
|
|
4
4
|
|
|
5
5
|
export interface Schema {
|
|
6
|
-
unitTestRunner
|
|
6
|
+
unitTestRunner?: UnitTestRunner;
|
|
7
7
|
e2eTestRunner?: E2eTestRunner;
|
|
8
8
|
skipFormat?: boolean;
|
|
9
9
|
skipInstall?: boolean;
|
|
10
10
|
style?: Styles;
|
|
11
|
-
linter
|
|
11
|
+
linter?: Exclude<Linter, Linter.TsLint>;
|
|
12
12
|
skipPackageJson?: boolean;
|
|
13
13
|
}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"description": "The file extension to be used for style files.",
|
|
39
39
|
"type": "string",
|
|
40
40
|
"default": "css",
|
|
41
|
+
"enum": ["css", "scss", "sass", "less"],
|
|
41
42
|
"x-prompt": {
|
|
42
43
|
"message": "Which stylesheet format would you like to use?",
|
|
43
44
|
"type": "list",
|
|
@@ -50,6 +51,10 @@
|
|
|
50
51
|
"value": "scss",
|
|
51
52
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
|
52
53
|
},
|
|
54
|
+
{
|
|
55
|
+
"value": "sass",
|
|
56
|
+
"label": "SASS(.sass) [ http://sass-lang.com ]"
|
|
57
|
+
},
|
|
53
58
|
{
|
|
54
59
|
"value": "less",
|
|
55
60
|
"label": "LESS [ http://lesscss.org ]"
|
|
@@ -3,6 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const application_1 = require("../application/application");
|
|
6
|
+
const get_mfe_projects_1 = require("../../utils/get-mfe-projects");
|
|
7
|
+
function findNextAvailablePort(tree) {
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
const mfeProjects = (0, get_mfe_projects_1.getMfeProjects)(tree);
|
|
10
|
+
const ports = new Set([4200]);
|
|
11
|
+
for (const mfeProject of mfeProjects) {
|
|
12
|
+
const { targets } = (0, devkit_1.readProjectConfiguration)(tree, mfeProject);
|
|
13
|
+
const port = (_c = (_b = (_a = targets === null || targets === void 0 ? void 0 : targets.serve) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.port) !== null && _c !== void 0 ? _c : 4200;
|
|
14
|
+
ports.add(port);
|
|
15
|
+
}
|
|
16
|
+
const nextAvailablePort = Math.max(...ports) + 1;
|
|
17
|
+
return nextAvailablePort;
|
|
18
|
+
}
|
|
6
19
|
function mfeRemote(tree, options) {
|
|
7
20
|
var _a;
|
|
8
21
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
@@ -16,7 +29,7 @@ function mfeRemote(tree, options) {
|
|
|
16
29
|
mfeType: 'remote',
|
|
17
30
|
routing: true,
|
|
18
31
|
host: options.host,
|
|
19
|
-
port: (_a = options.port) !== null && _a !== void 0 ? _a :
|
|
32
|
+
port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree),
|
|
20
33
|
});
|
|
21
34
|
return installTask;
|
|
22
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfe-remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-remote/mfe-remote.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"mfe-remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-remote/mfe-remote.ts"],"names":[],"mappings":";;;AAEA,yCAAqE;AACrE,4DAA8D;AAC9D,mEAA8D;AAE9D,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,OAAO,0CAAE,IAAI,mCAAI,IAAI,CAAC;QACnD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACjB;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAEjD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAA8B,SAAS,CAAC,IAAU,EAAE,OAAe;;;QACjE,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC/C,MAAM,IAAI,KAAK,CACb,2EAA2E,OAAO,CAAC,IAAI,GAAG,CAC3F,CAAC;SACH;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,EAAE;YACnD,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,IAAI;YACT,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,qBAAqB,CAAC,IAAI,CAAC;SAClD,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;;CACpB;AAlBD,4BAkBC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateNgPackage = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
6
6
|
const utils_1 = require("@nrwl/workspace/src/generators/move/lib/utils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
function updateNgPackage(tree, schema) {
|
|
@@ -16,7 +16,7 @@ function updateNgPackage(tree, schema) {
|
|
|
16
16
|
if (!tree.exists(ngPackagePath)) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
const rootOffset = (0, path_1.relative)((0, path_1.join)(
|
|
19
|
+
const rootOffset = (0, path_1.relative)((0, path_1.join)(devkit_2.appRootPath, project.root), devkit_2.appRootPath);
|
|
20
20
|
let output = `dist/${project.root}`;
|
|
21
21
|
if (((_c = (_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.outputs) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
22
22
|
output = project.targets.build.outputs[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-ng-package.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/move/lib/update-ng-package.ts"],"names":[],"mappings":";;;AAAA,yCAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"update-ng-package.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/move/lib/update-ng-package.ts"],"names":[],"mappings":";;;AAAA,yCAA0E;AAC1E,yCAA2C;AAC3C,yEAAkF;AAClF,+BAAsC;AAGtC,SAAgB,eAAe,CAAC,IAAU,EAAE,MAAc;;IACxD,MAAM,cAAc,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAE/D,IAAI,OAAO,CAAC,WAAW,KAAK,aAAa,EAAE;QACzC,OAAO;KACR;IAED,MAAM,aAAa,GAAG,GAAG,OAAO,CAAC,IAAI,kBAAkB,CAAC;IACxD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAC/B,OAAO;KACR;IAED,MAAM,UAAU,GAAG,IAAA,eAAQ,EAAC,IAAA,WAAI,EAAC,oBAAW,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,oBAAW,CAAC,CAAC;IAC1E,IAAI,MAAM,GAAG,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,CAAA,MAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,0CAAE,OAAO,0CAAE,MAAM,IAAG,CAAC,EAAE;QAC/C,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KAC3C;IAED,IAAA,mBAAU,EAAC,IAAI,EAAE,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE;QACvC,IAAI,CAAC,IAAI,GAAG,GAAG,UAAU,IAAI,MAAM,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAvBD,0CAuBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const ng_add_1 = require("./ng-add");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxGenerator)(ng_add_1.ngAddGenerator);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/ng-add/compat.ts"],"names":[],"mappings":";;AAAA,yCAAkD;AAClD,qCAA0C;AAE1C,kBAAe,IAAA,2BAAkB,EAAC,uBAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching
|
|
3
|
+
* and faster execution of tasks.
|
|
4
|
+
*
|
|
5
|
+
* It does this by:
|
|
6
|
+
*
|
|
7
|
+
* - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command.
|
|
8
|
+
* - Symlinking the ng to nx command, so all commands run through the Nx CLI
|
|
9
|
+
* - Updating the package.json postinstall script to give you control over this script
|
|
10
|
+
*
|
|
11
|
+
* The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it.
|
|
12
|
+
* Every command you run should work the same when using the Nx CLI, except faster.
|
|
13
|
+
*
|
|
14
|
+
* Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case,
|
|
15
|
+
* will point to nx, which will perform optimizations before invoking ng. So the Angular CLI is always invoked.
|
|
16
|
+
* The Nx CLI simply does some optimizations before invoking the Angular CLI.
|
|
17
|
+
*
|
|
18
|
+
* To opt out of this patch:
|
|
19
|
+
* - Replace occurrences of nx with ng in your package.json
|
|
20
|
+
* - Remove the script from your postinstall script in your package.json
|
|
21
|
+
* - Delete and reinstall your node_modules
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
const fs = require('fs');
|
|
25
|
+
const os = require('os');
|
|
26
|
+
const cp = require('child_process');
|
|
27
|
+
const isWindows = os.platform() === 'win32';
|
|
28
|
+
let output;
|
|
29
|
+
try {
|
|
30
|
+
output = require('@nrwl/workspace').output;
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.');
|
|
33
|
+
process.exit(0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Symlink of ng to nx, so you can keep using `ng build/test/lint` and still
|
|
38
|
+
* invoke the Nx CLI and get the benefits of computation caching.
|
|
39
|
+
*/
|
|
40
|
+
function symlinkNgCLItoNxCLI() {
|
|
41
|
+
try {
|
|
42
|
+
const ngPath = './node_modules/.bin/ng';
|
|
43
|
+
const nxPath = './node_modules/.bin/nx';
|
|
44
|
+
if (isWindows) {
|
|
45
|
+
/**
|
|
46
|
+
* This is the most reliable way to create symlink-like behavior on Windows.
|
|
47
|
+
* Such that it works in all shells and works with npx.
|
|
48
|
+
*/
|
|
49
|
+
['', '.cmd', '.ps1'].forEach(ext => {
|
|
50
|
+
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
// If unix-based, symlink
|
|
54
|
+
cp.execSync(`ln -sf ./nx ${ngPath}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch(e) {
|
|
58
|
+
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message });
|
|
59
|
+
throw e;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
symlinkNgCLItoNxCLI();
|
|
65
|
+
require('nx/src/adapter/decorate-cli').decorateCli();
|
|
66
|
+
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' });
|
|
67
|
+
} catch(e) {
|
|
68
|
+
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' });
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Add files here to ignore them from prettier formatting
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
const { constants } = require('karma');
|
|
6
|
+
|
|
7
|
+
module.exports = () => {
|
|
8
|
+
return {
|
|
9
|
+
basePath: '',
|
|
10
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
11
|
+
plugins: [
|
|
12
|
+
require('karma-jasmine'),
|
|
13
|
+
require('karma-chrome-launcher'),
|
|
14
|
+
require('karma-jasmine-html-reporter'),
|
|
15
|
+
require('karma-coverage'),
|
|
16
|
+
require('@angular-devkit/build-angular/plugins/karma'),
|
|
17
|
+
],
|
|
18
|
+
client: {
|
|
19
|
+
jasmine: {
|
|
20
|
+
// you can add configuration options for Jasmine here
|
|
21
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
22
|
+
// for example, you can disable the random execution with `random: false`
|
|
23
|
+
// or set a specific seed with `seed: 4321`
|
|
24
|
+
},
|
|
25
|
+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
26
|
+
},
|
|
27
|
+
jasmineHtmlReporter: {
|
|
28
|
+
suppressAll: true, // removes the duplicated traces
|
|
29
|
+
},
|
|
30
|
+
coverageReporter: {
|
|
31
|
+
dir: join(__dirname, './coverage'),
|
|
32
|
+
subdir: '.',
|
|
33
|
+
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
34
|
+
},
|
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
|
36
|
+
port: 9876,
|
|
37
|
+
colors: true,
|
|
38
|
+
logLevel: constants.LOG_INFO,
|
|
39
|
+
autoWatch: true,
|
|
40
|
+
browsers: ['Chrome'],
|
|
41
|
+
singleRun: true,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"npmScope": "<%= npmScope %>",
|
|
3
|
+
"affected": {
|
|
4
|
+
"defaultBase": "<%= defaultBase %>"
|
|
5
|
+
},
|
|
6
|
+
"implicitDependencies": {
|
|
7
|
+
"package.json": {
|
|
8
|
+
"dependencies": "*",
|
|
9
|
+
"devDependencies": "*"
|
|
10
|
+
},
|
|
11
|
+
".eslintrc.json": "*"
|
|
12
|
+
},
|
|
13
|
+
"tasksRunnerOptions": {
|
|
14
|
+
"default": {
|
|
15
|
+
"runner": "nx/tasks-runners/default",
|
|
16
|
+
"options": {
|
|
17
|
+
"cacheableOperations": ["build", "lint", "test", "e2e"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"targetDependencies": {
|
|
22
|
+
"build": [
|
|
23
|
+
{
|
|
24
|
+
"target": "build",
|
|
25
|
+
"projects": "dependencies"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
File without changes
|