@nrwl/angular 15.5.1 → 15.5.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/CHANGELOG.md +1 -1
- package/migrations.json +13 -0
- package/package.json +18 -10
- package/src/builders/webpack-dev-server/webpack-dev-server.impl.js +2 -1
- package/src/builders/webpack-dev-server/webpack-dev-server.impl.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +15 -19
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +27 -4
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js.map +1 -1
- package/src/executors/utilities/angular-version-utils.d.ts +3 -2
- package/src/executors/utilities/angular-version-utils.js +7 -3
- package/src/executors/utilities/angular-version-utils.js.map +1 -1
- package/src/generators/add-linting/add-linting.js +2 -2
- package/src/generators/add-linting/add-linting.js.map +1 -1
- package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js +4 -4
- package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js.map +1 -1
- package/src/generators/add-linting/schema.json +10 -5
- package/src/generators/application/angular-v14/lib/update-config-files.js +3 -0
- package/src/generators/application/angular-v14/lib/update-config-files.js.map +1 -1
- package/src/generators/application/application.d.ts +1 -1
- package/src/generators/application/application.js +9 -4
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/schema.json +13 -7
- package/src/generators/change-storybook-targets/schema.json +2 -1
- package/src/generators/component/component.js +2 -2
- package/src/generators/component/component.js.map +1 -1
- package/src/generators/component/schema.json +6 -3
- package/src/generators/component-cypress-spec/schema.json +12 -6
- package/src/generators/component-story/schema.json +10 -5
- package/src/generators/component-test/schema.json +10 -5
- package/src/generators/convert-to-with-mf/schema.json +2 -1
- package/src/generators/convert-tslint-to-eslint/schema.json +4 -2
- package/src/generators/cypress-component-configuration/schema.json +6 -3
- package/src/generators/downgrade-module/schema.json +8 -4
- package/src/generators/host/host.js +2 -2
- package/src/generators/host/host.js.map +1 -1
- package/src/generators/host/schema.json +10 -5
- package/src/generators/init/angular-v14/init.js +24 -23
- package/src/generators/init/angular-v14/init.js.map +1 -1
- package/src/generators/init/init.js +2 -2
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.json +12 -6
- package/src/generators/karma/angular-v14/karma.js +10 -10
- package/src/generators/karma/angular-v14/karma.js.map +1 -1
- package/src/generators/karma/karma.js +2 -2
- package/src/generators/karma/karma.js.map +1 -1
- package/src/generators/karma/schema.json +2 -1
- package/src/generators/karma-project/lib/generate-karma-project-files.js +6 -0
- package/src/generators/karma-project/lib/generate-karma-project-files.js.map +1 -1
- package/src/generators/karma-project/lib/update-tsconfig.js +4 -2
- package/src/generators/karma-project/lib/update-tsconfig.js.map +1 -1
- package/src/generators/karma-project/lib/update-workspace-config.js +5 -5
- package/src/generators/karma-project/lib/update-workspace-config.js.map +1 -1
- package/src/generators/karma-project/lib/v14-test-file.d.ts +3 -0
- package/src/generators/karma-project/lib/v14-test-file.js +29 -0
- package/src/generators/karma-project/lib/v14-test-file.js.map +1 -0
- package/src/generators/karma-project/schema.json +6 -3
- package/src/generators/library/library.js +6 -9
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library/schema.json +18 -9
- package/src/generators/library-secondary-entry-point/schema.json +4 -2
- package/src/generators/move/schema.json +6 -3
- package/src/generators/ng-add/schema.json +14 -7
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.actions.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.spec.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.spec.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.models.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.spec.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.spec.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.ts__tmpl__ +0 -0
- package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
- package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +12 -8
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js.map +1 -1
- package/src/generators/ngrx/lib/generate-files.js +7 -1
- package/src/generators/ngrx/lib/generate-files.js.map +1 -1
- package/src/generators/ngrx/lib/index.d.ts +1 -0
- package/src/generators/ngrx/lib/index.js +3 -1
- package/src/generators/ngrx/lib/index.js.map +1 -1
- package/src/generators/ngrx/lib/normalize-options.js +1 -1
- package/src/generators/ngrx/lib/normalize-options.js.map +1 -1
- package/src/generators/ngrx/lib/validate-options.d.ts +3 -0
- package/src/generators/ngrx/lib/validate-options.js +39 -0
- package/src/generators/ngrx/lib/validate-options.js.map +1 -0
- package/src/generators/ngrx/ngrx.js +1 -9
- package/src/generators/ngrx/ngrx.js.map +1 -1
- package/src/generators/ngrx/schema.json +12 -7
- package/src/generators/remote/remote.js +2 -2
- package/src/generators/remote/remote.js.map +1 -1
- package/src/generators/remote/schema.json +6 -3
- package/src/generators/scam/schema.json +6 -3
- package/src/generators/scam-directive/schema.json +8 -4
- package/src/generators/scam-pipe/schema.json +8 -4
- package/src/generators/scam-to-standalone/scam-to-standalone.js +7 -0
- package/src/generators/scam-to-standalone/scam-to-standalone.js.map +1 -1
- package/src/generators/scam-to-standalone/schema.json +7 -4
- package/src/generators/setup-mf/schema.json +6 -3
- package/src/generators/setup-mf/setup-mf.js +2 -2
- package/src/generators/setup-mf/setup-mf.js.map +1 -1
- package/src/generators/setup-ssr/schema.json +2 -1
- package/src/generators/setup-ssr/setup-ssr.js +7 -14
- package/src/generators/setup-ssr/setup-ssr.js.map +1 -1
- package/src/generators/setup-tailwind/schema.json +4 -2
- package/src/generators/stories/schema.json +6 -3
- package/src/generators/storybook-configuration/schema.json +2 -1
- package/src/generators/upgrade-module/schema.json +10 -5
- package/src/generators/utils/create-ts-config.js +2 -2
- package/src/generators/utils/create-ts-config.js.map +1 -1
- package/src/generators/utils/{angular-version-utils.d.ts → version-utils.d.ts} +4 -0
- package/src/generators/utils/{angular-version-utils.js → version-utils.js} +13 -2
- package/src/generators/utils/version-utils.js.map +1 -0
- package/src/generators/web-worker/schema.json +6 -3
- package/src/utils/backward-compatible-versions.d.ts +6 -0
- package/src/utils/backward-compatible-versions.js +41 -0
- package/src/utils/backward-compatible-versions.js.map +1 -0
- package/src/utils/nx-devkit/route-utils.js +1 -1
- package/src/utils/nx-devkit/route-utils.js.map +1 -1
- package/src/utils/version-utils.d.ts +3 -0
- package/src/utils/version-utils.js +22 -0
- package/src/utils/version-utils.js.map +1 -0
- package/src/utils/versions.d.ts +1 -38
- package/src/utils/versions.js +2 -39
- package/src/utils/versions.js.map +1 -1
- package/src/generators/utils/angular-version-utils.js.map +0 -1
|
@@ -9,7 +9,7 @@ function normalizeOptions(options) {
|
|
|
9
9
|
? (0, path_1.dirname)(options.module)
|
|
10
10
|
: options.parent
|
|
11
11
|
? (0, path_1.dirname)(options.parent)
|
|
12
|
-
: undefined, route: (_a = options.route) !== null && _a !== void 0 ? _a :
|
|
12
|
+
: undefined, route: (_a = options.route) !== null && _a !== void 0 ? _a : '', directory: (0, devkit_1.names)(options.directory).fileName });
|
|
13
13
|
}
|
|
14
14
|
exports.normalizeOptions = normalizeOptions;
|
|
15
15
|
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAErC,+BAA+B;AAM/B,SAAgB,gBAAgB,CAC9B,OAA6B;;IAE7B,uCACK,OAAO,KACV,eAAe,EAAE,OAAO,CAAC,MAAM;YAC7B,CAAC,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,MAAM;gBAChB,CAAC,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,CAAC;gBACzB,CAAC,CAAC,SAAS,EACb,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAErC,+BAA+B;AAM/B,SAAgB,gBAAgB,CAC9B,OAA6B;;IAE7B,uCACK,OAAO,KACV,eAAe,EAAE,OAAO,CAAC,MAAM;YAC7B,CAAC,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,MAAM;gBAChB,CAAC,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,CAAC;gBACzB,CAAC,CAAC,SAAS,EACb,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,EAAE,EAC1B,SAAS,EAAE,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,IAC5C;AACJ,CAAC;AAbD,4CAaC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOptions = void 0;
|
|
4
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
5
|
+
const semver_1 = require("semver");
|
|
6
|
+
const version_utils_1 = require("../../utils/version-utils");
|
|
7
|
+
const version_utils_2 = require("../../../utils/version-utils");
|
|
8
|
+
function validateOptions(tree, options) {
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
if (!options.module && !options.parent) {
|
|
11
|
+
throw new Error('Please provide a value for "--parent"!');
|
|
12
|
+
}
|
|
13
|
+
if (options.module && !tree.exists(options.module)) {
|
|
14
|
+
throw new Error(`Module does not exist: ${options.module}.`);
|
|
15
|
+
}
|
|
16
|
+
if (options.parent && !tree.exists(options.parent)) {
|
|
17
|
+
throw new Error(`Parent does not exist: ${options.parent}.`);
|
|
18
|
+
}
|
|
19
|
+
const angularVersionInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
20
|
+
const intendedNgRxVersionForAngularMajor = (0, version_utils_2.getPkgVersionForAngularMajorVersion)('ngrxVersion', angularVersionInfo.major);
|
|
21
|
+
const ngrxMajorVersion = (_b = (_a = (0, version_utils_1.getInstalledPackageVersionInfo)(tree, '@ngrx/store')) === null || _a === void 0 ? void 0 : _a.major) !== null && _b !== void 0 ? _b : (0, semver_1.major)((0, semver_1.coerce)(intendedNgRxVersionForAngularMajor));
|
|
22
|
+
if ((0, semver_1.lt)(angularVersionInfo.version, '14.1.0') || ngrxMajorVersion < 15) {
|
|
23
|
+
const parentPath = (_c = options.parent) !== null && _c !== void 0 ? _c : options.module;
|
|
24
|
+
const parentContent = tree.read(parentPath, 'utf-8');
|
|
25
|
+
const ast = tsquery_1.tsquery.ast(parentContent);
|
|
26
|
+
const NG_MODULE_DECORATOR_SELECTOR = 'ClassDeclaration > Decorator > CallExpression:has(Identifier[name=NgModule])';
|
|
27
|
+
const nodes = (0, tsquery_1.tsquery)(ast, NG_MODULE_DECORATOR_SELECTOR, {
|
|
28
|
+
visitAllChildren: true,
|
|
29
|
+
});
|
|
30
|
+
if (nodes.length === 0) {
|
|
31
|
+
throw new Error(`The provided parent path "${parentPath}" does not contain an "NgModule". ` +
|
|
32
|
+
'Please make sure to provide a path to an "NgModule" where the state will be registered. ' +
|
|
33
|
+
'If you are trying to use a "Routes" definition file (for Standalone API usage), ' +
|
|
34
|
+
'please note this is not supported in Angular versions lower than 14.1.0.');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.validateOptions = validateOptions;
|
|
39
|
+
//# sourceMappingURL=validate-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/validate-options.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AACpD,mCAA2C;AAC3C,6DAGmC;AAEnC,gEAAmF;AAEnF,SAAgB,eAAe,CAC7B,IAAU,EACV,OAA6B;;IAE7B,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC3D;IACD,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;KAC9D;IACD,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;KAC9D;IAED,MAAM,kBAAkB,GAAG,IAAA,8CAA8B,EAAC,IAAI,CAAC,CAAC;IAChE,MAAM,kCAAkC,GACtC,IAAA,mDAAmC,EACjC,aAAa,EACb,kBAAkB,CAAC,KAAK,CACzB,CAAC;IAEJ,MAAM,gBAAgB,GACpB,MAAA,MAAA,IAAA,8CAA8B,EAAC,IAAI,EAAE,aAAa,CAAC,0CAAE,KAAK,mCAC1D,IAAA,cAAK,EAAC,IAAA,eAAM,EAAC,kCAAkC,CAAC,CAAC,CAAC;IAEpD,IAAI,IAAA,WAAE,EAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,gBAAgB,GAAG,EAAE,EAAE;QACrE,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,OAAO,CAAC,MAAM,CAAC;QACpD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,GAAG,GAAG,iBAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAEvC,MAAM,4BAA4B,GAChC,8EAA8E,CAAC;QACjF,MAAM,KAAK,GAAG,IAAA,iBAAO,EAAC,GAAG,EAAE,4BAA4B,EAAE;YACvD,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CACb,6BAA6B,UAAU,oCAAoC;gBACzE,0FAA0F;gBAC1F,kFAAkF;gBAClF,0EAA0E,CAC7E,CAAC;SACH;KACF;AACH,CAAC;AA5CD,0CA4CC"}
|
|
@@ -6,15 +6,7 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
6
6
|
const lib_1 = require("./lib");
|
|
7
7
|
function ngrxGenerator(tree, schema) {
|
|
8
8
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
-
|
|
10
|
-
throw new Error('Please provide a value for `--parent`!');
|
|
11
|
-
}
|
|
12
|
-
if (schema.module && !tree.exists(schema.module)) {
|
|
13
|
-
throw new Error(`Module does not exist: ${schema.module}.`);
|
|
14
|
-
}
|
|
15
|
-
if (schema.parent && !tree.exists(schema.parent)) {
|
|
16
|
-
throw new Error(`Parent does not exist: ${schema.parent}.`);
|
|
17
|
-
}
|
|
9
|
+
(0, lib_1.validateOptions)(tree, schema);
|
|
18
10
|
const options = (0, lib_1.normalizeOptions)(schema);
|
|
19
11
|
if (!options.minimal || !options.root) {
|
|
20
12
|
(0, lib_1.generateNgrxFilesFromTemplates)(tree, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngrx.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/ngrx/ngrx.ts"],"names":[],"mappings":";;;;AACA,yCAA2C;AAC3C,+
|
|
1
|
+
{"version":3,"file":"ngrx.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/ngrx/ngrx.ts"],"names":[],"mappings":";;;;AACA,yCAA2C;AAC3C,+BAOe;AAGf,SAAsB,aAAa,CACjC,IAAU,EACV,MAA4B;;QAE5B,IAAA,qBAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,MAAM,CAAC,CAAC;QAEzC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YACrC,IAAA,oCAA8B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC/C;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,IAAA,wBAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAClC,IAAA,wBAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACnC;QAED,IAAI,uBAAuB,GAAsB,GAAG,EAAE,GAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YAC5B,uBAAuB,GAAG,IAAA,0BAAoB,EAAC,IAAI,CAAC,CAAC;SACtD;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,uBAAuB,CAAC;IACjC,CAAC;CAAA;AA1BD,sCA0BC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"$source": "argv",
|
|
24
24
|
"index": 0
|
|
25
25
|
},
|
|
26
|
-
"x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`."
|
|
26
|
+
"x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`.",
|
|
27
|
+
"x-priority": "important"
|
|
27
28
|
},
|
|
28
29
|
"module": {
|
|
29
30
|
"type": "string",
|
|
@@ -32,12 +33,13 @@
|
|
|
32
33
|
},
|
|
33
34
|
"parent": {
|
|
34
35
|
"type": "string",
|
|
35
|
-
"description": "The path to the `NgModule` or the `Routes` definition file (for Standalone API usage) where the feature state will be registered. The host directory will create/use the new state directory.",
|
|
36
|
-
"x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?"
|
|
36
|
+
"description": "The path to the `NgModule` or the `Routes` definition file (for Standalone API usage) where the feature state will be registered. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.",
|
|
37
|
+
"x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?",
|
|
38
|
+
"x-priority": "important"
|
|
37
39
|
},
|
|
38
40
|
"route": {
|
|
39
41
|
"type": "string",
|
|
40
|
-
"description": "The route that the Standalone NgRx Providers should be added to.",
|
|
42
|
+
"description": "The route that the Standalone NgRx Providers should be added to. _Note: This is only supported in Angular versions >= 14.1.0_.",
|
|
41
43
|
"default": "''"
|
|
42
44
|
},
|
|
43
45
|
"directory": {
|
|
@@ -49,7 +51,8 @@
|
|
|
49
51
|
"type": "boolean",
|
|
50
52
|
"default": false,
|
|
51
53
|
"description": "Setup root or feature state management with NgRx.",
|
|
52
|
-
"x-prompt": "Is this the root state of the application?"
|
|
54
|
+
"x-prompt": "Is this the root state of the application?",
|
|
55
|
+
"x-priority": "important"
|
|
53
56
|
},
|
|
54
57
|
"facade": {
|
|
55
58
|
"type": "boolean",
|
|
@@ -70,12 +73,14 @@
|
|
|
70
73
|
"skipFormat": {
|
|
71
74
|
"description": "Skip formatting files.",
|
|
72
75
|
"type": "boolean",
|
|
73
|
-
"default": false
|
|
76
|
+
"default": false,
|
|
77
|
+
"x-priority": "internal"
|
|
74
78
|
},
|
|
75
79
|
"skipPackageJson": {
|
|
76
80
|
"type": "boolean",
|
|
77
81
|
"default": false,
|
|
78
|
-
"description": "Do not update the `package.json` with NgRx dependencies."
|
|
82
|
+
"description": "Do not update the `package.json` with NgRx dependencies.",
|
|
83
|
+
"x-priority": "internal"
|
|
79
84
|
},
|
|
80
85
|
"barrels": {
|
|
81
86
|
"type": "boolean",
|
|
@@ -9,12 +9,12 @@ const setup_mf_1 = require("../setup-mf/setup-mf");
|
|
|
9
9
|
const test_runners_1 = require("../../utils/test-runners");
|
|
10
10
|
const lib_1 = require("./lib");
|
|
11
11
|
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
12
|
-
const
|
|
12
|
+
const version_utils_1 = require("../utils/version-utils");
|
|
13
13
|
const semver_1 = require("semver");
|
|
14
14
|
function remote(tree, options) {
|
|
15
15
|
var _a;
|
|
16
16
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const installedAngularVersionInfo = (0,
|
|
17
|
+
const installedAngularVersionInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
18
18
|
if ((0, semver_1.lt)(installedAngularVersionInfo.version, '14.1.0') && options.standalone) {
|
|
19
19
|
throw new Error((0, devkit_1.stripIndents) `The "standalone" option is only supported in Angular >= 14.1.0. You are currently using ${installedAngularVersionInfo.version}.
|
|
20
20
|
You can resolve this error by removing the "standalone" option or by migrating to Angular 14.1.0.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;;AAAA,yCAA4E;AAE5E,4DAA8D;AAC9D,8CAAwD;AACxD,mDAA+C;AAC/C,2DAAyD;AACzD,+BAAsD;AACtD,2FAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;;AAAA,yCAA4E;AAE5E,4DAA8D;AAC9D,8CAAwD;AACxD,mDAA+C;AAC/C,2DAAyD;AACzD,+BAAsD;AACtD,2FAAqF;AACrF,0DAAwE;AACxE,mCAA4B;AAE5B,SAAsB,MAAM,CAAC,IAAU,EAAE,OAAe;;;QACtD,MAAM,2BAA2B,GAAG,IAAA,8CAA8B,EAAC,IAAI,CAAC,CAAC;QAEzE,IAAI,IAAA,WAAE,EAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;YAC3E,MAAM,IAAI,KAAK,CAAC,IAAA,qBAAY,EAAA,2FAA2F,2BAA2B,CAAC,OAAO;sGACxD,CAAC,CAAC;SACrG;QAED,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,OAAO,GAAG,IAAA,8BAAoB,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAA,2BAAqB,EAAC,IAAI,CAAC,CAAC;QAEzD,MAAM,cAAc,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,kCACjD,OAAO,KACV,OAAO,EAAE,IAAI,EACb,IAAI,IACJ,CAAC;QAEH,MAAM,OAAO,GACX,CAAC,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,aAAa,KAAK,4BAAa,CAAC,IAAI,CAAC;QAEzE,MAAM,IAAA,kBAAO,EAAC,IAAI,EAAE;YAClB,OAAO;YACP,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI;YACJ,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,UAAU,EAAE,IAAI;YAChB,OAAO;YACP,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,MAAM;YACtD,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAC,CAAC;QAEH,IAAI,YAAY,GAAG,CAAC,cAAc,CAAC,CAAC;QACpC,IAAI,OAAO,CAAC,GAAG,EAAE;YACf,IAAI,cAAc,GAAG,MAAM,IAAA,YAAM,EAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3D,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnC;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,YAAY,CAAC,CAAC;;CAC1C;AAnDD,wBAmDC;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"host": {
|
|
24
24
|
"type": "string",
|
|
25
25
|
"description": "The name of the host app to attach this remote app to.",
|
|
26
|
-
"x-dropdown": "projects"
|
|
26
|
+
"x-dropdown": "projects",
|
|
27
|
+
"x-priority": "important"
|
|
27
28
|
},
|
|
28
29
|
"port": {
|
|
29
30
|
"type": "number",
|
|
@@ -93,7 +94,8 @@
|
|
|
93
94
|
"skipPackageJson": {
|
|
94
95
|
"type": "boolean",
|
|
95
96
|
"default": false,
|
|
96
|
-
"description": "Do not add dependencies to `package.json`."
|
|
97
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
98
|
+
"x-priority": "internal"
|
|
97
99
|
},
|
|
98
100
|
"unitTestRunner": {
|
|
99
101
|
"type": "string",
|
|
@@ -143,7 +145,8 @@
|
|
|
143
145
|
"skipFormat": {
|
|
144
146
|
"description": "Skip formatting files.",
|
|
145
147
|
"type": "boolean",
|
|
146
|
-
"default": false
|
|
148
|
+
"default": false,
|
|
149
|
+
"x-priority": "internal"
|
|
147
150
|
},
|
|
148
151
|
"standalone": {
|
|
149
152
|
"description": "Whether to generate a remote application with standalone components. _Note: This is only supported in Angular versions >= 14.1.0_",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"project": {
|
|
23
23
|
"type": "string",
|
|
24
24
|
"description": "The name of the project.",
|
|
25
|
-
"x-dropdown": "projects"
|
|
25
|
+
"x-dropdown": "projects",
|
|
26
|
+
"x-priority": "important"
|
|
26
27
|
},
|
|
27
28
|
"name": {
|
|
28
29
|
"type": "string",
|
|
@@ -78,7 +79,8 @@
|
|
|
78
79
|
"inlineScam": {
|
|
79
80
|
"type": "boolean",
|
|
80
81
|
"description": "Create the `NgModule` in the same file as the component.",
|
|
81
|
-
"default": true
|
|
82
|
+
"default": true,
|
|
83
|
+
"x-priority": "important"
|
|
82
84
|
},
|
|
83
85
|
"flat": {
|
|
84
86
|
"type": "boolean",
|
|
@@ -117,7 +119,8 @@
|
|
|
117
119
|
"export": {
|
|
118
120
|
"type": "boolean",
|
|
119
121
|
"description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",
|
|
120
|
-
"default": true
|
|
122
|
+
"default": true,
|
|
123
|
+
"x-priority": "important"
|
|
121
124
|
}
|
|
122
125
|
},
|
|
123
126
|
"required": ["name"]
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"project": {
|
|
23
23
|
"type": "string",
|
|
24
24
|
"description": "The name of the project.",
|
|
25
|
-
"x-dropdown": "projects"
|
|
25
|
+
"x-dropdown": "projects",
|
|
26
|
+
"x-priority": "important"
|
|
26
27
|
},
|
|
27
28
|
"name": {
|
|
28
29
|
"type": "string",
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"$source": "argv",
|
|
32
33
|
"index": 0
|
|
33
34
|
},
|
|
34
|
-
"x-prompt": "What name would you like to use for the directive?"
|
|
35
|
+
"x-prompt": "What name would you like to use for the directive?",
|
|
36
|
+
"x-priority": "important"
|
|
35
37
|
},
|
|
36
38
|
"skipTests": {
|
|
37
39
|
"type": "boolean",
|
|
@@ -41,7 +43,8 @@
|
|
|
41
43
|
"inlineScam": {
|
|
42
44
|
"type": "boolean",
|
|
43
45
|
"description": "Create the `NgModule` in the same file as the Directive.",
|
|
44
|
-
"default": true
|
|
46
|
+
"default": true,
|
|
47
|
+
"x-priority": "important"
|
|
45
48
|
},
|
|
46
49
|
"flat": {
|
|
47
50
|
"type": "boolean",
|
|
@@ -70,7 +73,8 @@
|
|
|
70
73
|
"export": {
|
|
71
74
|
"type": "boolean",
|
|
72
75
|
"description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",
|
|
73
|
-
"default": true
|
|
76
|
+
"default": true,
|
|
77
|
+
"x-priority": "important"
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
"required": ["name"]
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"project": {
|
|
23
23
|
"type": "string",
|
|
24
24
|
"description": "The name of the project.",
|
|
25
|
-
"x-dropdown": "projects"
|
|
25
|
+
"x-dropdown": "projects",
|
|
26
|
+
"x-priority": "important"
|
|
26
27
|
},
|
|
27
28
|
"name": {
|
|
28
29
|
"type": "string",
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"$source": "argv",
|
|
32
33
|
"index": 0
|
|
33
34
|
},
|
|
34
|
-
"x-prompt": "What name would you like to use for the pipe?"
|
|
35
|
+
"x-prompt": "What name would you like to use for the pipe?",
|
|
36
|
+
"x-priority": "important"
|
|
35
37
|
},
|
|
36
38
|
"skipTests": {
|
|
37
39
|
"type": "boolean",
|
|
@@ -41,7 +43,8 @@
|
|
|
41
43
|
"inlineScam": {
|
|
42
44
|
"type": "boolean",
|
|
43
45
|
"description": "Create the NgModule in the same file as the Pipe.",
|
|
44
|
-
"default": true
|
|
46
|
+
"default": true,
|
|
47
|
+
"x-priority": "important"
|
|
45
48
|
},
|
|
46
49
|
"flat": {
|
|
47
50
|
"type": "boolean",
|
|
@@ -51,7 +54,8 @@
|
|
|
51
54
|
"export": {
|
|
52
55
|
"type": "boolean",
|
|
53
56
|
"description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",
|
|
54
|
-
"default": true
|
|
57
|
+
"default": true,
|
|
58
|
+
"x-priority": "important"
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
"required": ["name"]
|
|
@@ -4,8 +4,15 @@ exports.scamToStandalone = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const lib_1 = require("./lib");
|
|
7
|
+
const version_utils_1 = require("../utils/version-utils");
|
|
8
|
+
const semver_1 = require("semver");
|
|
7
9
|
function scamToStandalone(tree, { component, project: projectName, skipFormat }) {
|
|
8
10
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
const installedAngularVersionInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
12
|
+
if ((0, semver_1.lt)(installedAngularVersionInfo.version, '14.1.0')) {
|
|
13
|
+
throw new Error((0, devkit_1.stripIndents) `This generator is only supported with Angular >= 14.1.0. You are currently using ${installedAngularVersionInfo.version}.
|
|
14
|
+
You can resolve this error by migrating to Angular 14.1.0.`);
|
|
15
|
+
}
|
|
9
16
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
10
17
|
let project = (0, lib_1.getTargetProject)(projectName, projects);
|
|
11
18
|
const normalizedComponentPath = (0, devkit_1.joinPathFragments)(project.root, component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scam-to-standalone.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-to-standalone/scam-to-standalone.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"scam-to-standalone.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-to-standalone/scam-to-standalone.ts"],"names":[],"mappings":";;;;AACA,yCAKsB;AAEtB,+BAQe;AACf,0DAAwE;AACxE,mCAA4B;AAE5B,SAAsB,gBAAgB,CACpC,IAAU,EACV,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAU;;QAEvD,MAAM,2BAA2B,GAAG,IAAA,8CAA8B,EAAC,IAAI,CAAC,CAAC;QAEzE,IAAI,IAAA,WAAE,EAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,IAAA,qBAAY,EAAA,oFAAoF,2BAA2B,CAAC,OAAO;+DACxF,CAAC,CAAC;SAC9D;QAED,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,GAAG,IAAA,sBAAgB,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEtD,MAAM,uBAAuB,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE;YACzC,MAAM,IAAI,KAAK,CACb,uCAAuC,uBAAuB,qEAAqE,CACpI,CAAC;SACH;QAED,MAAM,EAAE,qBAAqB,EAAE,YAAY,EAAE,aAAa,EAAE,GAC1D,IAAA,6BAAuB,EAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;QAEzD,MAAM,YAAY,GAAG,IAAA,wBAAkB,EAAC,YAAY,CAAC,CAAC;QAEtD,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,+KAA+K,CAChL,CAAC;SACH;QAED,MAAM,EACJ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,UAAU,GACX,GAAG,IAAA,8BAAwB,EAAC,YAAY,EAAE,qBAAqB,CAAC,CAAC;QAElE,IAAA,wBAAkB,EAAC,YAAY,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;QAEnE,IAAA,6BAAuB,EACrB,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,IAAI,EACJ,uBAAuB,EACvB,aAAa,CACd,CAAC;QAEF,IAAA,sCAAgC,EAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;QAElE,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AA3DD,4CA2DC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "GeneratorAngularScamToStandalone",
|
|
4
4
|
"cli": "nx",
|
|
5
5
|
"title": "Convert an Inline SCAM to Standalone Component",
|
|
6
|
-
"description": "Convert an Inline SCAM to a Standalone Component.",
|
|
6
|
+
"description": "Convert an Inline SCAM to a Standalone Component. _Note: This generator is only supported with Angular versions >= 14.1.0_.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"component": {
|
|
@@ -12,17 +12,20 @@
|
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"x-priority": "important"
|
|
16
17
|
},
|
|
17
18
|
"project": {
|
|
18
19
|
"type": "string",
|
|
19
20
|
"description": "The project containing the SCAM.",
|
|
20
21
|
"x-prompt": "What project contains the SCAM?",
|
|
21
|
-
"x-dropdown": "projects"
|
|
22
|
+
"x-dropdown": "projects",
|
|
23
|
+
"x-priority": "important"
|
|
22
24
|
},
|
|
23
25
|
"skipFormat": {
|
|
24
26
|
"type": "boolean",
|
|
25
|
-
"description": "Skip formatting the workspace after the generator completes."
|
|
27
|
+
"description": "Skip formatting the workspace after the generator completes.",
|
|
28
|
+
"x-priority": "internal"
|
|
26
29
|
}
|
|
27
30
|
},
|
|
28
31
|
"examplesFile": "../../../docs/scam-to-standalone-examples.md"
|
|
@@ -42,16 +42,19 @@
|
|
|
42
42
|
},
|
|
43
43
|
"routing": {
|
|
44
44
|
"type": "boolean",
|
|
45
|
-
"description": "Generate a routing setup to allow a host application to route to the remote application."
|
|
45
|
+
"description": "Generate a routing setup to allow a host application to route to the remote application.",
|
|
46
|
+
"x-priority": "important"
|
|
46
47
|
},
|
|
47
48
|
"skipFormat": {
|
|
48
49
|
"type": "boolean",
|
|
49
|
-
"description": "Skip formatting the workspace after the generator completes."
|
|
50
|
+
"description": "Skip formatting the workspace after the generator completes.",
|
|
51
|
+
"x-priority": "internal"
|
|
50
52
|
},
|
|
51
53
|
"skipPackageJson": {
|
|
52
54
|
"type": "boolean",
|
|
53
55
|
"default": false,
|
|
54
|
-
"description": "Do not add dependencies to `package.json`."
|
|
56
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
57
|
+
"x-priority": "internal"
|
|
55
58
|
},
|
|
56
59
|
"skipE2E": {
|
|
57
60
|
"type": "boolean",
|
|
@@ -4,12 +4,12 @@ exports.setupMf = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const lib_1 = require("./lib");
|
|
7
|
-
const
|
|
7
|
+
const version_utils_1 = require("../utils/version-utils");
|
|
8
8
|
const semver_1 = require("semver");
|
|
9
9
|
function setupMf(tree, options) {
|
|
10
10
|
var _a;
|
|
11
11
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
const installedAngularInfo = (0,
|
|
12
|
+
const installedAngularInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
13
13
|
if ((0, semver_1.lt)(installedAngularInfo.version, '14.1.0') && options.standalone) {
|
|
14
14
|
throw new Error(`The --standalone flag is not supported in your current version of Angular (${installedAngularInfo.version}). Please update to a version of Angular that supports Standalone Components (>= 14.1.0).`);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-mf.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-mf/setup-mf.ts"],"names":[],"mappings":";;;;AACA,yCAAqE;AAGrE,+BAae;AACf,
|
|
1
|
+
{"version":3,"file":"setup-mf.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-mf/setup-mf.ts"],"names":[],"mappings":";;;;AACA,yCAAqE;AAGrE,+BAae;AACf,0DAAwE;AACxE,mCAA4B;AAE5B,SAAsB,OAAO,CAAC,IAAU,EAAE,OAAe;;;QACvD,MAAM,oBAAoB,GAAG,IAAA,8CAA8B,EAAC,IAAI,CAAC,CAAC;QAElE,IAAI,IAAA,WAAE,EAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;YACpE,MAAM,IAAI,KAAK,CACb,8EAA8E,oBAAoB,CAAC,OAAO,2FAA2F,CACtM,CAAC;SACH;QACD,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtE,OAAO,CAAC,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,QAAQ,CAAC;QAE5D,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;YAC7B,IAAA,wBAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAClC,IAAA,yBAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACpC;QAED,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE;YAC/B,IAAA,qBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC/B,IAAA,oBAAc,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;YAClD,IAAA,8BAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACzC;QAED,MAAM,gBAAgB,GAAG,IAAA,yBAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAA,2BAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAE3E,IAAA,uBAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAA,0BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpC,IAAA,sBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEhC,IAAA,kBAAY,EAAC,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,IAAA,iCAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC5C;QAED,eAAe;QACf,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;;CACF;AAzCD,0BAyCC;AAED,kBAAe,OAAO,CAAC"}
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"skipFormat": {
|
|
53
53
|
"type": "boolean",
|
|
54
|
-
"description": "Skip formatting the workspace after the generator completes."
|
|
54
|
+
"description": "Skip formatting the workspace after the generator completes.",
|
|
55
|
+
"x-priority": "internal"
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
58
|
"required": ["project"],
|
|
@@ -3,29 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setupSsr = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
const version_utils_1 = require("../../utils/version-utils");
|
|
7
|
+
const version_utils_2 = require("../utils/version-utils");
|
|
6
8
|
const lib_1 = require("./lib");
|
|
7
|
-
const versions_1 = require("../../utils/versions");
|
|
8
|
-
const angular_version_utils_1 = require("../utils/angular-version-utils");
|
|
9
|
-
const semver_1 = require("semver");
|
|
10
9
|
function setupSsr(tree, schema) {
|
|
11
|
-
var _a, _b, _c, _d;
|
|
12
10
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
11
|
const options = (0, lib_1.normalizeOptions)(tree, schema);
|
|
14
12
|
(0, lib_1.generateSSRFiles)(tree, options);
|
|
15
13
|
(0, lib_1.updateAppModule)(tree, options);
|
|
16
14
|
(0, lib_1.updateProjectConfig)(tree, options);
|
|
17
|
-
const installedAngularVersion = (0,
|
|
18
|
-
const
|
|
19
|
-
? (_b = (_a = versions_1.versions[`angularV${installedAngularVersion.major}`]) === null || _a === void 0 ? void 0 : _a.ngUniversalVersion) !== null && _b !== void 0 ? _b : versions_1.ngUniversalVersion
|
|
20
|
-
: versions_1.ngUniversalVersion;
|
|
21
|
-
const ngPlatformServerVersionToUse = installedAngularVersion.major < (0, semver_1.major)((0, semver_1.coerce)(versions_1.angularVersion))
|
|
22
|
-
? (_d = (_c = versions_1.versions[`angularV${installedAngularVersion.major}`]) === null || _c === void 0 ? void 0 : _c.angularVersion) !== null && _d !== void 0 ? _d : versions_1.angularVersion
|
|
23
|
-
: versions_1.angularVersion;
|
|
15
|
+
const installedAngularVersion = (0, version_utils_2.getInstalledAngularVersionInfo)(tree);
|
|
16
|
+
const { angularVersion: ngPlatformServerVersion, ngUniversalVersion } = (0, version_utils_1.getPkgVersionsForAngularMajorVersion)(installedAngularVersion.major);
|
|
24
17
|
(0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
25
|
-
'@nguniversal/express-engine':
|
|
26
|
-
'@angular/platform-server':
|
|
18
|
+
'@nguniversal/express-engine': ngUniversalVersion,
|
|
19
|
+
'@angular/platform-server': ngPlatformServerVersion,
|
|
27
20
|
}, {
|
|
28
|
-
'@nguniversal/builders':
|
|
21
|
+
'@nguniversal/builders': ngUniversalVersion,
|
|
29
22
|
});
|
|
30
23
|
if (!options.skipFormat) {
|
|
31
24
|
yield (0, devkit_1.formatFiles)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-ssr.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-ssr/setup-ssr.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;
|
|
1
|
+
{"version":3,"file":"setup-ssr.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-ssr/setup-ssr.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,6DAAiF;AACjF,0DAAwE;AACxE,+BAKe;AAGf,SAAsB,QAAQ,CAAC,IAAU,EAAE,MAAc;;QACvD,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,IAAA,sBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChC,IAAA,qBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/B,IAAA,yBAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnC,MAAM,uBAAuB,GAAG,IAAA,8CAA8B,EAAC,IAAI,CAAC,CAAC;QACrE,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GACnE,IAAA,oDAAoC,EAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;QAEtE,IAAA,qCAA4B,EAC1B,IAAI,EACJ;YACE,6BAA6B,EAAE,kBAAkB;YACjD,0BAA0B,EAAE,uBAAuB;SACpD,EACD;YACE,uBAAuB,EAAE,kBAAkB;SAC5C,CACF,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AA7BD,4BA6BC;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"skipFormat": {
|
|
24
24
|
"type": "boolean",
|
|
25
|
-
"description": "Skips formatting the workspace after the generator completes."
|
|
25
|
+
"description": "Skips formatting the workspace after the generator completes.",
|
|
26
|
+
"x-priority": "internal"
|
|
26
27
|
},
|
|
27
28
|
"stylesEntryPoint": {
|
|
28
29
|
"type": "string",
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"skipPackageJson": {
|
|
32
33
|
"type": "boolean",
|
|
33
34
|
"default": false,
|
|
34
|
-
"description": "Do not add dependencies to `package.json`."
|
|
35
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
36
|
+
"x-priority": "internal"
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
"additionalProperties": false,
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
"index": 0
|
|
16
16
|
},
|
|
17
17
|
"x-prompt": "What's the name of the project for which you want to generate stories?",
|
|
18
|
-
"x-dropdown": "projects"
|
|
18
|
+
"x-dropdown": "projects",
|
|
19
|
+
"x-priority": "important"
|
|
19
20
|
},
|
|
20
21
|
"generateCypressSpecs": {
|
|
21
22
|
"type": "boolean",
|
|
22
23
|
"description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator.",
|
|
23
|
-
"x-prompt": "Do you want to generate Cypress specs as well?"
|
|
24
|
+
"x-prompt": "Do you want to generate Cypress specs as well?",
|
|
25
|
+
"x-priority": "important"
|
|
24
26
|
},
|
|
25
27
|
"cypressProject": {
|
|
26
28
|
"type": "string",
|
|
@@ -29,7 +31,8 @@
|
|
|
29
31
|
"skipFormat": {
|
|
30
32
|
"description": "Skip formatting files.",
|
|
31
33
|
"type": "boolean",
|
|
32
|
-
"default": false
|
|
34
|
+
"default": false,
|
|
35
|
+
"x-priority": "internal"
|
|
33
36
|
},
|
|
34
37
|
"ignorePaths": {
|
|
35
38
|
"type": "array",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"project": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The name of the project."
|
|
11
|
+
"description": "The name of the project.",
|
|
12
|
+
"x-priority": "important"
|
|
12
13
|
},
|
|
13
14
|
"name": {
|
|
14
15
|
"type": "string",
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
"$default": {
|
|
17
18
|
"$source": "argv",
|
|
18
19
|
"index": 0
|
|
19
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"x-priority": "important"
|
|
20
22
|
},
|
|
21
23
|
"angularJsImport": {
|
|
22
24
|
"type": "string",
|
|
@@ -29,17 +31,20 @@
|
|
|
29
31
|
"skipFormat": {
|
|
30
32
|
"type": "boolean",
|
|
31
33
|
"description": "Skip formatting files.",
|
|
32
|
-
"default": false
|
|
34
|
+
"default": false,
|
|
35
|
+
"x-priority": "internal"
|
|
33
36
|
},
|
|
34
37
|
"skipPackageJson": {
|
|
35
38
|
"type": "boolean",
|
|
36
39
|
"description": "Do not add `@angular/upgrade` to `package.json` (e.g., `--skipPackageJson`).",
|
|
37
|
-
"default": false
|
|
40
|
+
"default": false,
|
|
41
|
+
"x-priority": "internal"
|
|
38
42
|
},
|
|
39
43
|
"router": {
|
|
40
44
|
"type": "boolean",
|
|
41
45
|
"description": "Sets up router synchronization (e.g., `--router`).",
|
|
42
|
-
"default": false
|
|
46
|
+
"default": false,
|
|
47
|
+
"x-priority": "important"
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
50
|
"additionalProperties": false,
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createTsConfig = exports.extractTsConfigBase = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const create_ts_config_1 = require("@nrwl/workspace/src/utils/create-ts-config");
|
|
6
|
-
const
|
|
6
|
+
const version_utils_1 = require("./version-utils");
|
|
7
7
|
var create_ts_config_2 = require("@nrwl/workspace/src/utils/create-ts-config");
|
|
8
8
|
Object.defineProperty(exports, "extractTsConfigBase", { enumerable: true, get: function () { return create_ts_config_2.extractTsConfigBase; } });
|
|
9
9
|
function createTsConfig(host, projectRoot, type, options, relativePathToRootTsConfig) {
|
|
10
|
-
const majorAngularVersion = (0,
|
|
10
|
+
const majorAngularVersion = (0, version_utils_1.getInstalledAngularMajorVersion)(host);
|
|
11
11
|
const json = {
|
|
12
12
|
compilerOptions: {
|
|
13
13
|
target: majorAngularVersion === 14 ? 'es2020' : 'es2022',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-ts-config.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/create-ts-config.ts"],"names":[],"mappings":";;;AACA,yCAAyC;AACzC,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"create-ts-config.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/create-ts-config.ts"],"names":[],"mappings":";;;AACA,yCAAyC;AACzC,iFAAiF;AACjF,mDAAkE;AAElE,+EAAiF;AAAxE,uHAAA,mBAAmB,OAAA;AAE5B,SAAgB,cAAc,CAC5B,IAAU,EACV,WAAmB,EACnB,IAAmB,EACnB,OAKC,EACD,0BAAkC;IAElC,MAAM,mBAAmB,GAAG,IAAA,+CAA+B,EAAC,IAAI,CAAC,CAAC;IAElE,MAAM,IAAI,GAAG;QACX,eAAe,EAAE;YACf,MAAM,EAAE,mBAAmB,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YACxD,uBAAuB,EAAE,KAAK;SAC/B;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB;aACrE;SACF;KACK,CAAC;IAET,6CAA6C;IAC7C,IAAI,OAAO,CAAC,WAAW,EAAE;QACvB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,eAAe,mCAAQ,sCAAmB,GAAK,IAAI,CAAC,eAAe,CAAE,CAAC;QAC3E,IAAI,CAAC,OAAO,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KACxC;SAAM;QACL,IAAI,CAAC,OAAO,GAAG,0BAA0B,CAAC;KAC3C;IAED,IAAA,kBAAS,EAAC,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC;AAtCD,wCAsCC"}
|