@nrwl/angular 13.9.4 → 13.10.0-beta.3
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/esm2020/src/runtime/nx/data-persistence.mjs +3 -3
- package/esm2020/src/runtime/nx/nx.module.mjs +4 -4
- package/executors.js +3 -3
- package/executors.js.map +1 -1
- package/executors.json +4 -4
- package/fesm2015/nrwl-angular-mfe.mjs +57 -0
- package/fesm2015/nrwl-angular-mfe.mjs.map +1 -0
- package/fesm2015/nrwl-angular.mjs +7 -7
- package/fesm2020/nrwl-angular-mfe.mjs +51 -0
- package/fesm2020/nrwl-angular-mfe.mjs.map +1 -0
- package/fesm2020/nrwl-angular.mjs +7 -7
- package/generators.js +26 -26
- package/generators.js.map +1 -1
- 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 +11 -11
- package/src/builders/webpack-browser/webpack-browser.impl.js.map +1 -1
- package/src/builders/webpack-server/lib/index.js +1 -1
- package/src/builders/webpack-server/lib/index.js.map +1 -1
- package/src/builders/webpack-server/schema.json +3 -2
- package/src/builders/webpack-server/webpack-server.impl.js +9 -10
- package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +6 -6
- package/src/executors/delegate-build/delegate-build.impl.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.transform.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ngc/compile-source-files.js +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/styles/stylesheet-processor.js +3 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ts/cache-compiler-host.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +3 -3
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +2 -2
- package/src/executors/package/package.impl.js +9 -9
- 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/add-linting/add-linting.js +1 -1
- package/src/generators/application/application.js +1 -1
- package/src/generators/application/lib/add-e2e.js +1 -1
- package/src/generators/application/lib/add-linting.js +1 -1
- package/src/generators/application/lib/add-mfe.js +1 -1
- package/src/generators/application/lib/add-protractor.js +1 -1
- package/src/generators/application/lib/add-unit-test-runner.js +1 -1
- package/src/generators/application/lib/index.js +20 -20
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/application/lib/update-config-files.js +1 -1
- package/src/generators/application/lib/update-config-files.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/convert-tslint-to-eslint/convert-tslint-to-eslint.js +4 -4
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js.map +1 -1
- package/src/generators/downgrade-module/downgrade-module.js +1 -1
- package/src/generators/downgrade-module/lib/index.js +4 -4
- package/src/generators/downgrade-module/lib/index.js.map +1 -1
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +16 -2
- 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/karma-project/karma-project.js +1 -1
- package/src/generators/library/lib/update-project.js +2 -2
- package/src/generators/library/lib/update-project.js.map +1 -1
- package/src/generators/library/library.js +3 -3
- package/src/generators/library-secondary-entry-point/lib/index.js +4 -4
- package/src/generators/library-secondary-entry-point/lib/index.js.map +1 -1
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +1 -1
- package/src/generators/mfe-host/mfe-host.js +1 -1
- package/src/generators/mfe-remote/mfe-remote.js +15 -2
- package/src/generators/mfe-remote/mfe-remote.js.map +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/move/move.js +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/ngrx/ngrx.js +1 -1
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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/lib/index.js +10 -10
- package/src/generators/setup-mfe/lib/index.js.map +1 -1
- package/src/generators/setup-mfe/setup-mfe.d.ts +2 -2
- package/src/generators/setup-mfe/setup-mfe.js +1 -10
- package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
- package/src/generators/setup-tailwind/lib/index.js +6 -6
- package/src/generators/setup-tailwind/lib/index.js.map +1 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +1 -1
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -1
- package/src/generators/storybook-configuration/storybook-configuration.js +1 -1
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js +1 -1
- package/src/generators/upgrade-module/lib/index.js +4 -4
- package/src/generators/upgrade-module/lib/index.js.map +1 -1
- package/src/generators/upgrade-module/upgrade-module.js +1 -1
- package/src/generators/utils/index.js +1 -1
- package/src/generators/utils/index.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/generators/utils/testing.js +1 -1
- package/src/generators/web-worker/lib/index.js +2 -2
- package/src/generators/web-worker/lib/index.js.map +1 -1
- package/src/generators/web-worker/web-worker.js +2 -2
- package/src/generators/web-worker/web-worker.js.map +1 -1
- package/src/migrations/update-10-3-0/update-10-3-0.js +1 -1
- package/src/migrations/update-10-4-0/update-10-4-0.js +1 -1
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js +3 -3
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js.map +1 -1
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js +3 -3
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js.map +1 -1
- package/src/migrations/update-12-3-0/update-angular-eslint-rules.js +1 -1
- package/src/migrations/update-12-3-0/update-storybook.js +1 -1
- package/src/migrations/update-12-3-0/update-webpack-browser-config.js +1 -1
- package/src/migrations/update-12-9-0/update-invalid-import-paths.js +1 -1
- package/src/migrations/update-13-0-0/add-postcss-packages.js +1 -1
- package/src/migrations/update-13-2-0/opt-out-testbed-teardown.js +1 -1
- package/src/migrations/update-13-2-0/update-angular-config.js +1 -1
- package/src/migrations/update-13-2-0/update-angular-jest-config.js +1 -1
- package/src/migrations/update-13-2-0/update-libraries.js +1 -1
- package/src/migrations/update-13-2-0/update-testing-imports.js +1 -1
- package/src/migrations/update-13-3-0/update-mfe-webpack-config.js +1 -1
- package/src/migrations/update-13-5-0/remove-library-generator-style-default.js +1 -1
- package/src/migrations/update-13-5-0/update-mfe-configs.js +1 -1
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js +1 -1
- package/src/migrations/update-13-8-4/migrate-karma-conf.js +1 -1
- package/src/migrations/update-13-9-0/set-build-libs-from-source.js +1 -1
- package/src/runtime/nx/data-persistence.js +2 -2
- package/src/runtime/nx/data-persistence.js.map +1 -1
- package/src/runtime/nx/nx.module.js +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
|
@@ -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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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,GAAG;IAChC,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,aAAa;IACb,SAAS;CACV,CAAC;AAEF,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,cAAuB;IAEvB,IAAI,kBAAkB,GAAG,cAAc,CAAC;IAExC,IAAI,CAAC,kBAAkB,EAAE;QACvB,+EAA+E;QAC/E,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,oBAAW,CAAC,EAAE;YAC1C,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;YAChD,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE;gBACxB,kBAAkB,GAAG,QAAQ,CAAC;gBAC9B,MAAM;aACP;SACF;KACF;IAED,iEAAiE;IACjE,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,mBAAuC,CAAC;IAC5C,IAAI;QACF,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;KACtD;IAAC,WAAM;QACN,MAAM,0BAA0B,GAAG,IAAA,eAAQ,EACzC,oBAAW,EACX,kBAAkB,CACnB,CAAC;QACF,eAAM,CAAC,IAAI,CACT,0CAA0C,0BAA0B,GAAG;YACrE,kDAAkD;YAClD,oEAAoE,CACvE,CAAC;QAEF,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,CAAC,mBAAmB,EAAE;QACxB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;AACrD,CAAC;AA7CD,4CA6CC;AAED,SAAgB,yBAAyB,CACvC,EAAE,kBAAkB,EAAE,mBAAmB,EAAiB,EAC1D,YAAuB,EACvB,KAAe;IAEf,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,SAAS,EAAE;QAC9C,OAAO,CAAC,GAAG,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"}
|
|
@@ -8,7 +8,7 @@ const add_angular_eslint_dependencies_1 = require("./lib/add-angular-eslint-depe
|
|
|
8
8
|
const add_project_lint_target_1 = require("./lib/add-project-lint-target");
|
|
9
9
|
const create_eslint_configuration_1 = require("./lib/create-eslint-configuration");
|
|
10
10
|
function addLintingGenerator(tree, options) {
|
|
11
|
-
return
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
12
|
const installTask = (0, linter_1.lintInitGenerator)(tree, {
|
|
13
13
|
linter: linter_1.Linter.EsLint,
|
|
14
14
|
skipPackageJson: options.skipPackageJson,
|
|
@@ -9,7 +9,7 @@ const init_1 = require("../init/init");
|
|
|
9
9
|
const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
10
10
|
const lib_1 = require("./lib");
|
|
11
11
|
function applicationGenerator(host, schema) {
|
|
12
|
-
return
|
|
12
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
const options = (0, lib_1.normalizeOptions)(host, schema);
|
|
14
14
|
yield (0, init_1.angularInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
15
15
|
const angularAppSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'application');
|
|
@@ -11,7 +11,7 @@ const linter_1 = require("@nrwl/linter");
|
|
|
11
11
|
const devkit_1 = require("@nrwl/devkit");
|
|
12
12
|
function addE2e(tree, options) {
|
|
13
13
|
var _a;
|
|
14
|
-
return
|
|
14
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
15
|
if (options.e2eTestRunner === "protractor" /* Protractor */) {
|
|
16
16
|
yield (0, add_protractor_1.addProtractor)(tree, options);
|
|
17
17
|
}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const linter_1 = require("@nrwl/linter");
|
|
6
6
|
const add_linting_1 = require("../../add-linting/add-linting");
|
|
7
7
|
function addLinting(host, options) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.linter === linter_1.Linter.None) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -4,7 +4,7 @@ exports.addMfe = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const setup_mfe_1 = require("../../setup-mfe/setup-mfe");
|
|
6
6
|
function addMfe(host, options) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
yield (0, setup_mfe_1.setupMfe)(host, {
|
|
9
9
|
appName: options.name,
|
|
10
10
|
mfeType: options.mfeType,
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
|
|
7
7
|
function addProtractor(host, options) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
const protractorSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'e2e');
|
|
10
10
|
yield protractorSchematic(host, {
|
|
11
11
|
relatedAppName: options.name,
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jest_1 = require("@nrwl/jest");
|
|
6
6
|
const karma_project_1 = require("../../karma-project/karma-project");
|
|
7
7
|
function addUnitTestRunner(host, options) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.unitTestRunner === "jest" /* Jest */) {
|
|
10
10
|
yield (0, jest_1.jestProjectGenerator)(host, {
|
|
11
11
|
project: options.name,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./add-e2e"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./add-linting"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./add-mfe"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./add-protractor"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./add-proxy-config"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./add-unit-test-runner"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./create-files"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./enable-strict-type-checking"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./normalized-schema"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./nrwl-home-tpl"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./remove-scaffolded-e2e"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./root-router-config"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./set-app-strict-default"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./update-component-spec"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./update-app-component-template"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./update-nx-component-template"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./update-config-files"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./update-e2e-project"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./update-editor-tsconfig"), exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,wDAA8B;AAC9B,oDAA0B;AAC1B,2DAAiC;AACjC,6DAAmC;AACnC,iEAAuC;AACvC,yDAA+B;AAC/B,wEAA8C;AAC9C,8DAAoC;AACpC,8DAAoC;AACpC,0DAAgC;AAChC,kEAAwC;AACxC,+DAAqC;AACrC,mEAAyC;AACzC,kEAAwC;AACxC,0EAAgD;AAChD,yEAA+C;AAC/C,gEAAsC;AACtC,+DAAqC;AACrC,mEAAyC"}
|
|
@@ -24,7 +24,7 @@ function updateAppAndE2EProjectConfigurations(host, options) {
|
|
|
24
24
|
delete project.targets.test;
|
|
25
25
|
// Ensure the outputs property comes after the executor for
|
|
26
26
|
// better readability.
|
|
27
|
-
const _a = project.targets.build, { executor } = _a, rest =
|
|
27
|
+
const _a = project.targets.build, { executor } = _a, rest = tslib_1.__rest(_a, ["executor"]);
|
|
28
28
|
project.targets.build = Object.assign({ executor, outputs: ['{options.outputPath}'] }, rest);
|
|
29
29
|
if (project.generators) {
|
|
30
30
|
delete project.generators;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-config-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/update-config-files.ts"],"names":[],"mappings":";;;;AAGA,yCAOsB;AACtB,iFAAoF;AAGpF,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,oCAAoC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAHD,8CAGC;AAED,SAAS,qBAAqB,CAAC,IAAU,EAAE,OAAyB;IAClE,oBAAoB;IACpB,IAAA,mBAAU,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iCACrE,IAAI,KACP,OAAO,EAAE,iBAAiB,EAC1B,eAAe,kCACV,IAAI,CAAC,eAAe,KACvB,MAAM,EAAE,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,CAAC,cAAc,EAC/D,MAAM,EAAE,QAAQ,KAElB,OAAO,EAAE;YACP,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;SACtE,IACD,CAAC,CAAC;AACN,CAAC;AAED,SAAS,oCAAoC,CAC3C,IAAU,EACV,OAAyB;IAEzB,iBAAiB;IACjB,IAAI,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D,IAAI,OAAO,CAAC,qBAAqB,KAAK,OAAO,CAAC,cAAc,EAAE;QAC5D,OAAO,GAAG,IAAA,yCAAsB,EAC9B,OAAO,EACP,OAAO,CAAC,qBAAqB,EAC7B,OAAO,CAAC,cAAc,CACvB,CAAC;KACH;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;IAE5B,2DAA2D;IAC3D,sBAAsB;IACtB,MAAM,KAAwB,OAAO,CAAC,OAAO,CAAC,KAAK,EAA7C,EAAE,QAAQ,OAAmC,EAA9B,IAAI,
|
|
1
|
+
{"version":3,"file":"update-config-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/update-config-files.ts"],"names":[],"mappings":";;;;AAGA,yCAOsB;AACtB,iFAAoF;AAGpF,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,oCAAoC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAHD,8CAGC;AAED,SAAS,qBAAqB,CAAC,IAAU,EAAE,OAAyB;IAClE,oBAAoB;IACpB,IAAA,mBAAU,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iCACrE,IAAI,KACP,OAAO,EAAE,iBAAiB,EAC1B,eAAe,kCACV,IAAI,CAAC,eAAe,KACvB,MAAM,EAAE,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,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AE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,OAAO,CAAC,cAAc,sBAAwB,EAAE;QAClD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,gCAAgC,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,qBAAqB,CAAC,CAAC;KAC7D;IAED,IAAI,OAAO,CAAC,aAAa,sBAAuB,EAAE;QAChD,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,IAAI,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YACxC,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;SAC1D;KACF;IAED,mCAAmC;IACnC,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,gBAAgB,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,cAAc,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -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 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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CAAC,KAAK,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,CAAC;AACzD,CAAC;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Schema {
|
|
2
|
+
name: string;
|
|
3
|
+
path?: string;
|
|
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 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";
|