@nrwl/angular 15.5.1 → 15.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/migrations.json +13 -0
  3. package/package.json +18 -10
  4. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +15 -19
  5. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js.map +1 -1
  6. package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +27 -4
  7. package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js.map +1 -1
  8. package/src/executors/utilities/angular-version-utils.d.ts +3 -2
  9. package/src/executors/utilities/angular-version-utils.js +7 -3
  10. package/src/executors/utilities/angular-version-utils.js.map +1 -1
  11. package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js +4 -4
  12. package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js.map +1 -1
  13. package/src/generators/add-linting/schema.json +10 -5
  14. package/src/generators/application/application.js +6 -0
  15. package/src/generators/application/application.js.map +1 -1
  16. package/src/generators/application/schema.json +13 -7
  17. package/src/generators/change-storybook-targets/schema.json +2 -1
  18. package/src/generators/component/schema.json +6 -3
  19. package/src/generators/component-cypress-spec/schema.json +12 -6
  20. package/src/generators/component-story/schema.json +10 -5
  21. package/src/generators/component-test/schema.json +10 -5
  22. package/src/generators/convert-to-with-mf/schema.json +2 -1
  23. package/src/generators/convert-tslint-to-eslint/schema.json +4 -2
  24. package/src/generators/cypress-component-configuration/schema.json +6 -3
  25. package/src/generators/downgrade-module/schema.json +8 -4
  26. package/src/generators/host/schema.json +10 -5
  27. package/src/generators/init/angular-v14/init.js +24 -23
  28. package/src/generators/init/angular-v14/init.js.map +1 -1
  29. package/src/generators/init/schema.json +12 -6
  30. package/src/generators/karma/angular-v14/karma.js +10 -10
  31. package/src/generators/karma/angular-v14/karma.js.map +1 -1
  32. package/src/generators/karma/schema.json +2 -1
  33. package/src/generators/karma-project/schema.json +6 -3
  34. package/src/generators/library/library.js +5 -8
  35. package/src/generators/library/library.js.map +1 -1
  36. package/src/generators/library/schema.json +18 -9
  37. package/src/generators/library-secondary-entry-point/schema.json +4 -2
  38. package/src/generators/move/schema.json +6 -3
  39. package/src/generators/ng-add/schema.json +14 -7
  40. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.actions.ts__tmpl__ +0 -0
  41. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.spec.ts__tmpl__ +0 -0
  42. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.ts__tmpl__ +0 -0
  43. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.spec.ts__tmpl__ +0 -0
  44. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.ts__tmpl__ +0 -0
  45. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.models.ts__tmpl__ +0 -0
  46. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.spec.ts__tmpl__ +0 -0
  47. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.ts__tmpl__ +0 -0
  48. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.spec.ts__tmpl__ +0 -0
  49. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.ts__tmpl__ +0 -0
  50. package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
  51. package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
  52. package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +12 -8
  53. package/src/generators/ngrx/lib/add-ngrx-to-package-json.js.map +1 -1
  54. package/src/generators/ngrx/lib/generate-files.js +7 -1
  55. package/src/generators/ngrx/lib/generate-files.js.map +1 -1
  56. package/src/generators/ngrx/lib/index.d.ts +1 -0
  57. package/src/generators/ngrx/lib/index.js +3 -1
  58. package/src/generators/ngrx/lib/index.js.map +1 -1
  59. package/src/generators/ngrx/lib/validate-options.d.ts +3 -0
  60. package/src/generators/ngrx/lib/validate-options.js +36 -0
  61. package/src/generators/ngrx/lib/validate-options.js.map +1 -0
  62. package/src/generators/ngrx/ngrx.js +1 -9
  63. package/src/generators/ngrx/ngrx.js.map +1 -1
  64. package/src/generators/ngrx/schema.json +12 -7
  65. package/src/generators/remote/schema.json +6 -3
  66. package/src/generators/scam/schema.json +6 -3
  67. package/src/generators/scam-directive/schema.json +8 -4
  68. package/src/generators/scam-pipe/schema.json +8 -4
  69. package/src/generators/scam-to-standalone/scam-to-standalone.js +7 -0
  70. package/src/generators/scam-to-standalone/scam-to-standalone.js.map +1 -1
  71. package/src/generators/scam-to-standalone/schema.json +7 -4
  72. package/src/generators/setup-mf/schema.json +6 -3
  73. package/src/generators/setup-ssr/schema.json +2 -1
  74. package/src/generators/setup-ssr/setup-ssr.js +6 -13
  75. package/src/generators/setup-ssr/setup-ssr.js.map +1 -1
  76. package/src/generators/setup-tailwind/schema.json +4 -2
  77. package/src/generators/stories/schema.json +6 -3
  78. package/src/generators/storybook-configuration/schema.json +2 -1
  79. package/src/generators/upgrade-module/schema.json +10 -5
  80. package/src/generators/web-worker/schema.json +6 -3
  81. package/src/utils/backward-compatible-versions.d.ts +6 -0
  82. package/src/utils/backward-compatible-versions.js +41 -0
  83. package/src/utils/backward-compatible-versions.js.map +1 -0
  84. package/src/utils/version-utils.d.ts +3 -0
  85. package/src/utils/version-utils.js +22 -0
  86. package/src/utils/version-utils.js.map +1 -0
  87. package/src/utils/versions.d.ts +1 -38
  88. package/src/utils/versions.js +2 -39
  89. package/src/utils/versions.js.map +1 -1
@@ -8,21 +8,25 @@
8
8
  "properties": {
9
9
  "npmScope": {
10
10
  "type": "string",
11
- "description": "Npm scope for importing libs. NOTE: only used if running the generator in an Angular CLI workspace."
11
+ "description": "Npm scope for importing libs. NOTE: only used if running the generator in an Angular CLI workspace.",
12
+ "x-priority": "important"
12
13
  },
13
14
  "defaultBase": {
14
15
  "type": "string",
15
- "description": "Default base branch for affected. NOTE: only used if running the generator in an Angular CLI workspace."
16
+ "description": "Default base branch for affected. NOTE: only used if running the generator in an Angular CLI workspace.",
17
+ "x-priority": "important"
16
18
  },
17
19
  "skipInstall": {
18
20
  "type": "boolean",
19
21
  "description": "Skip installing added packages.",
20
- "default": false
22
+ "default": false,
23
+ "x-priority": "internal"
21
24
  },
22
25
  "preserveAngularCliLayout": {
23
26
  "type": "boolean",
24
27
  "description": "Preserve the Angular CLI layout instead of moving the app into apps. NOTE: only used if running the generator in an Angular CLI workspace.",
25
- "default": false
28
+ "default": false,
29
+ "x-priority": "important"
26
30
  },
27
31
 
28
32
  "unitTestRunner": {
@@ -40,7 +44,8 @@
40
44
  "skipFormat": {
41
45
  "description": "Skip formatting files. NOTE: only used if running the generator in an Nx workspace.",
42
46
  "type": "boolean",
43
- "default": false
47
+ "default": false,
48
+ "x-priority": "internal"
44
49
  },
45
50
  "linter": {
46
51
  "description": "The tool to use for running lint checks. NOTE: only used if running the generator in an Nx workspace.",
@@ -57,12 +62,14 @@
57
62
  "skipPackageJson": {
58
63
  "type": "boolean",
59
64
  "default": false,
60
- "description": "Do not add dependencies to `package.json`. NOTE: only used if running the generator in an Nx workspace."
65
+ "description": "Do not add dependencies to `package.json`. NOTE: only used if running the generator in an Nx workspace.",
66
+ "x-priority": "internal"
61
67
  },
62
68
  "skipPostInstall": {
63
69
  "type": "boolean",
64
70
  "default": false,
65
- "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`. NOTE: only used if running the generator in an Nx workspace."
71
+ "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`. NOTE: only used if running the generator in an Nx workspace.",
72
+ "x-priority": "internal"
66
73
  }
67
74
  },
68
75
  "additionalProperties": false,
@@ -0,0 +1,22 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { createEffect, Actions, ofType } from '@ngrx/effects';
3
+
4
+ import * as <%= className %>Actions from './<%= fileName %>.actions';
5
+ import * as <%= className %>Feature from './<%= fileName %>.reducer';
6
+
7
+ import {switchMap, catchError, of} from 'rxjs';
8
+
9
+ @Injectable()
10
+ export class <%= className %>Effects {
11
+ init$ = createEffect(() => this.actions$.pipe(
12
+ ofType(<%= className %>Actions.init<%= className %>),
13
+ switchMap(() => of(<%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] }))),
14
+ catchError((error) => {
15
+ console.error('Error', error);
16
+ return of(<%= className %>Actions.load<%= className %>Failure({ error }));
17
+ }
18
+ )
19
+ ));
20
+
21
+ constructor(private readonly actions$: Actions) {}
22
+ }
@@ -0,0 +1,27 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { select, Store, Action } from '@ngrx/store';
3
+
4
+ import * as <%= className %>Actions from './<%= fileName %>.actions';
5
+ import * as <%= className %>Feature from './<%= fileName %>.reducer';
6
+ import * as <%= className %>Selectors from './<%= fileName %>.selectors';
7
+
8
+ @Injectable()
9
+ export class <%= className %>Facade {
10
+ /**
11
+ * Combine pieces of state using createSelector,
12
+ * and expose them as observables through the facade.
13
+ */
14
+ loaded$ = this.store.pipe(select(<%= className %>Selectors.select<%= className %>Loaded));
15
+ all<%= className %>$ = this.store.pipe(select(<%= className %>Selectors.selectAll<%= className %>));
16
+ selected<%= className %>$ = this.store.pipe(select(<%= className %>Selectors.selectEntity));
17
+
18
+ constructor(private readonly store: Store) {}
19
+
20
+ /**
21
+ * Use the initialization action to perform one
22
+ * or more tasks in your Effects.
23
+ */
24
+ init() {
25
+ this.store.dispatch(<%= className %>Actions.init<%= className %>());
26
+ }
27
+ }
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addNgRxToPackageJson = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
+ const version_utils_1 = require("@nrwl/workspace/src/utilities/version-utils");
5
6
  const semver_1 = require("semver");
7
+ const version_utils_2 = require("../../../utils/version-utils");
6
8
  const versions_1 = require("../../../utils/versions");
7
- const version_utils_1 = require("@nrwl/workspace/src/utilities/version-utils");
9
+ const angular_version_utils_1 = require("../../utils/angular-version-utils");
8
10
  function addNgRxToPackageJson(tree) {
9
11
  let rxjsVersion;
10
12
  try {
@@ -14,15 +16,17 @@ function addNgRxToPackageJson(tree) {
14
16
  rxjsVersion = (0, version_utils_1.checkAndCleanWithSemver)('rxjs', versions_1.rxjsVersion);
15
17
  }
16
18
  const jasmineMarblesVersion = (0, semver_1.gte)(rxjsVersion, '7.0.0') ? '~0.9.1' : '~0.8.3';
19
+ const angularMajorVersion = (0, angular_version_utils_1.getInstalledAngularMajorVersion)(tree);
20
+ const ngrxVersion = (0, version_utils_2.getPkgVersionForAngularMajorVersion)('ngrxVersion', angularMajorVersion);
17
21
  return (0, devkit_1.addDependenciesToPackageJson)(tree, {
18
- '@ngrx/store': versions_1.ngrxVersion,
19
- '@ngrx/effects': versions_1.ngrxVersion,
20
- '@ngrx/entity': versions_1.ngrxVersion,
21
- '@ngrx/router-store': versions_1.ngrxVersion,
22
- '@ngrx/component-store': versions_1.ngrxVersion,
22
+ '@ngrx/store': ngrxVersion,
23
+ '@ngrx/effects': ngrxVersion,
24
+ '@ngrx/entity': ngrxVersion,
25
+ '@ngrx/router-store': ngrxVersion,
26
+ '@ngrx/component-store': ngrxVersion,
23
27
  }, {
24
- '@ngrx/schematics': versions_1.ngrxVersion,
25
- '@ngrx/store-devtools': versions_1.ngrxVersion,
28
+ '@ngrx/schematics': ngrxVersion,
29
+ '@ngrx/store-devtools': ngrxVersion,
26
30
  'jasmine-marbles': jasmineMarblesVersion,
27
31
  });
28
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-ngrx-to-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/add-ngrx-to-package-json.ts"],"names":[],"mappings":";;;AACA,yCAAsE;AACtE,mCAA6B;AAC7B,sDAGiC;AACjC,+EAAsF;AAEtF,SAAgB,oBAAoB,CAAC,IAAU;IAC7C,IAAI,WAAmB,CAAC;IACxB,IAAI;QACF,WAAW,GAAG,IAAA,uCAAuB,EACnC,MAAM,EACN,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CACpD,CAAC;KACH;IAAC,WAAM;QACN,WAAW,GAAG,IAAA,uCAAuB,EAAC,MAAM,EAAE,sBAAkB,CAAC,CAAC;KACnE;IACD,MAAM,qBAAqB,GAAG,IAAA,YAAG,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC9E,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ;QACE,aAAa,EAAE,sBAAW;QAC1B,eAAe,EAAE,sBAAW;QAC5B,cAAc,EAAE,sBAAW;QAC3B,oBAAoB,EAAE,sBAAW;QACjC,uBAAuB,EAAE,sBAAW;KACrC,EACD;QACE,kBAAkB,EAAE,sBAAW;QAC/B,sBAAsB,EAAE,sBAAW;QACnC,iBAAiB,EAAE,qBAAqB;KACzC,CACF,CAAC;AACJ,CAAC;AA1BD,oDA0BC"}
1
+ {"version":3,"file":"add-ngrx-to-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/add-ngrx-to-package-json.ts"],"names":[],"mappings":";;;AACA,yCAAsE;AACtE,+EAAsF;AACtF,mCAA6B;AAC7B,gEAAmF;AACnF,sDAA4E;AAC5E,6EAAoF;AAEpF,SAAgB,oBAAoB,CAAC,IAAU;IAC7C,IAAI,WAAmB,CAAC;IACxB,IAAI;QACF,WAAW,GAAG,IAAA,uCAAuB,EACnC,MAAM,EACN,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CACpD,CAAC;KACH;IAAC,WAAM;QACN,WAAW,GAAG,IAAA,uCAAuB,EAAC,MAAM,EAAE,sBAAkB,CAAC,CAAC;KACnE;IACD,MAAM,qBAAqB,GAAG,IAAA,YAAG,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE9E,MAAM,mBAAmB,GAAG,IAAA,uDAA+B,EAAC,IAAI,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,IAAA,mDAAmC,EACrD,aAAa,EACb,mBAAmB,CACpB,CAAC;IAEF,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ;QACE,aAAa,EAAE,WAAW;QAC1B,eAAe,EAAE,WAAW;QAC5B,cAAc,EAAE,WAAW;QAC3B,oBAAoB,EAAE,WAAW;QACjC,uBAAuB,EAAE,WAAW;KACrC,EACD;QACE,kBAAkB,EAAE,WAAW;QAC/B,sBAAsB,EAAE,WAAW;QACnC,iBAAiB,EAAE,qBAAqB;KACzC,CACF,CAAC;AACJ,CAAC;AAjCD,oDAiCC"}
@@ -2,13 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateNgrxFilesFromTemplates = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
+ const semver_1 = require("semver");
6
+ const angular_version_utils_1 = require("../../utils/angular-version-utils");
5
7
  /**
6
8
  * Generate 'feature' scaffolding: actions, reducer, effects, interfaces, selectors, facade
7
9
  */
8
10
  function generateNgrxFilesFromTemplates(tree, options) {
9
11
  const name = options.name;
10
12
  const projectNames = (0, devkit_1.names)(name);
11
- (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files'), options.parentDirectory, Object.assign(Object.assign(Object.assign({}, options), projectNames), { tmpl: '' }));
13
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'latest'), options.parentDirectory, Object.assign(Object.assign(Object.assign({}, options), projectNames), { tmpl: '' }));
14
+ const angularVersion = (0, angular_version_utils_1.getInstalledAngularVersion)(tree);
15
+ if ((0, semver_1.lt)(angularVersion, '14.1.0')) {
16
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'no-inject'), options.parentDirectory, Object.assign(Object.assign(Object.assign({}, options), projectNames), { tmpl: '' }));
17
+ }
12
18
  if (!options.facade) {
13
19
  tree.delete((0, devkit_1.joinPathFragments)(options.parentDirectory, options.directory, `${projectNames.fileName}.facade.ts`));
14
20
  tree.delete((0, devkit_1.joinPathFragments)(options.parentDirectory, options.directory, `${projectNames.fileName}.facade.spec.ts`));
@@ -1 +1 @@
1
- {"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/generate-files.ts"],"names":[],"mappings":";;;AACA,yCAAuE;AAGvE;;GAEG;AACH,SAAgB,8BAA8B,CAC5C,IAAU,EACV,OAAuC;IAEvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,CAAC;IAEjC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAC3C,OAAO,CAAC,eAAe,gDAElB,OAAO,GACP,YAAY,KACf,IAAI,EAAE,EAAE,IAEX,CAAC;IAEF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACnB,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EACf,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,SAAS,EACjB,GAAG,YAAY,CAAC,QAAQ,YAAY,CACrC,CACF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EACf,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,SAAS,EACjB,GAAG,YAAY,CAAC,QAAQ,iBAAiB,CAC1C,CACF,CAAC;KACH;AACH,CAAC;AAlCD,wEAkCC"}
1
+ {"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/generate-files.ts"],"names":[],"mappings":";;;AACA,yCAAuE;AACvE,mCAA4B;AAC5B,6EAA+E;AAG/E;;GAEG;AACH,SAAgB,8BAA8B,CAC5C,IAAU,EACV,OAAuC;IAEvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,CAAC;IAEjC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,EACrD,OAAO,CAAC,eAAe,gDAElB,OAAO,GACP,YAAY,KACf,IAAI,EAAE,EAAE,IAEX,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,kDAA0B,EAAC,IAAI,CAAC,CAAC;IACxD,IAAI,IAAA,WAAE,EAAC,cAAc,EAAE,QAAQ,CAAC,EAAE;QAChC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,EACxD,OAAO,CAAC,eAAe,gDAElB,OAAO,GACP,YAAY,KACf,IAAI,EAAE,EAAE,IAEX,CAAC;KACH;IAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACnB,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EACf,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,SAAS,EACjB,GAAG,YAAY,CAAC,QAAQ,YAAY,CACrC,CACF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EACf,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,SAAS,EACjB,GAAG,YAAY,CAAC,QAAQ,iBAAiB,CAC1C,CACF,CAAC;KACH;AACH,CAAC;AAhDD,wEAgDC"}
@@ -3,3 +3,4 @@ export { addImportsToModule } from './add-imports-to-module';
3
3
  export { addNgRxToPackageJson } from './add-ngrx-to-package-json';
4
4
  export { generateNgrxFilesFromTemplates } from './generate-files';
5
5
  export { normalizeOptions } from './normalize-options';
6
+ export { validateOptions } from './validate-options';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeOptions = exports.generateNgrxFilesFromTemplates = exports.addNgRxToPackageJson = exports.addImportsToModule = exports.addExportsToBarrel = void 0;
3
+ exports.validateOptions = exports.normalizeOptions = exports.generateNgrxFilesFromTemplates = exports.addNgRxToPackageJson = exports.addImportsToModule = exports.addExportsToBarrel = void 0;
4
4
  var add_exports_barrel_1 = require("./add-exports-barrel");
5
5
  Object.defineProperty(exports, "addExportsToBarrel", { enumerable: true, get: function () { return add_exports_barrel_1.addExportsToBarrel; } });
6
6
  var add_imports_to_module_1 = require("./add-imports-to-module");
@@ -11,4 +11,6 @@ var generate_files_1 = require("./generate-files");
11
11
  Object.defineProperty(exports, "generateNgrxFilesFromTemplates", { enumerable: true, get: function () { return generate_files_1.generateNgrxFilesFromTemplates; } });
12
12
  var normalize_options_1 = require("./normalize-options");
13
13
  Object.defineProperty(exports, "normalizeOptions", { enumerable: true, get: function () { return normalize_options_1.normalizeOptions; } });
14
+ var validate_options_1 = require("./validate-options");
15
+ Object.defineProperty(exports, "validateOptions", { enumerable: true, get: function () { return validate_options_1.validateOptions; } });
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,uEAAkE;AAAzD,gIAAA,oBAAoB,OAAA;AAC7B,mDAAkE;AAAzD,gIAAA,8BAA8B,OAAA;AACvC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,uEAAkE;AAAzD,gIAAA,oBAAoB,OAAA;AAC7B,mDAAkE;AAAzD,gIAAA,8BAA8B,OAAA;AACvC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nrwl/devkit';
2
+ import type { NgRxGeneratorOptions } from '../schema';
3
+ export declare function validateOptions(tree: Tree, options: NgRxGeneratorOptions): void;
@@ -0,0 +1,36 @@
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 angular_version_utils_1 = require("../../utils/angular-version-utils");
7
+ function validateOptions(tree, options) {
8
+ var _a;
9
+ if (!options.module && !options.parent) {
10
+ throw new Error('Please provide a value for "--parent"!');
11
+ }
12
+ if (options.module && !tree.exists(options.module)) {
13
+ throw new Error(`Module does not exist: ${options.module}.`);
14
+ }
15
+ if (options.parent && !tree.exists(options.parent)) {
16
+ throw new Error(`Parent does not exist: ${options.parent}.`);
17
+ }
18
+ const angularVersion = (0, angular_version_utils_1.getInstalledAngularVersion)(tree);
19
+ const parentPath = (_a = options.parent) !== null && _a !== void 0 ? _a : options.module;
20
+ if (parentPath && (0, semver_1.lt)(angularVersion, '14.1.0')) {
21
+ const parentContent = tree.read(parentPath, 'utf-8');
22
+ const ast = tsquery_1.tsquery.ast(parentContent);
23
+ const NG_MODULE_DECORATOR_SELECTOR = 'ClassDeclaration > Decorator > CallExpression:has(Identifier[name=NgModule])';
24
+ const nodes = (0, tsquery_1.tsquery)(ast, NG_MODULE_DECORATOR_SELECTOR, {
25
+ visitAllChildren: true,
26
+ });
27
+ if (nodes.length === 0) {
28
+ throw new Error(`The provided parent path "${parentPath}" does not contain an "NgModule". ` +
29
+ 'Please make sure to provide a path to an "NgModule" where the state will be registered. ' +
30
+ 'If you are trying to use a "Routes" definition file (for Standalone API usage), ' +
31
+ 'please note this is not supported in Angular versions lower than 14.1.0.');
32
+ }
33
+ }
34
+ }
35
+ exports.validateOptions = validateOptions;
36
+ //# 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,mCAA4B;AAC5B,6EAA+E;AAG/E,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,cAAc,GAAG,IAAA,kDAA0B,EAAC,IAAI,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,OAAO,CAAC,MAAM,CAAC;IACpD,IAAI,UAAU,IAAI,IAAA,WAAE,EAAC,cAAc,EAAE,QAAQ,CAAC,EAAE;QAC9C,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;AAlCD,0CAkCC"}
@@ -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
- if (!schema.module && !schema.parent) {
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,+BAMe;AAGf,SAAsB,aAAa,CACjC,IAAU,EACV,MAA4B;;QAE5B,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACpC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;SAC3D;QAED,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;SAC7D;QAED,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;SAC7D;QAED,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;AArCD,sCAqCC;AAED,kBAAe,aAAa,CAAC"}
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",
@@ -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 angular_version_utils_1 = require("../utils/angular-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, angular_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,yCAA2E;AAE3E,+BAQe;AAEf,SAAsB,gBAAgB,CACpC,IAAU,EACV,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAU;;QAEvD,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;AApDD,4CAoDC;AAED,kBAAe,gBAAgB,CAAC"}
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,0EAAgF;AAChF,mCAA4B;AAE5B,SAAsB,gBAAgB,CACpC,IAAU,EACV,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAU;;QAEvD,MAAM,2BAA2B,GAAG,IAAA,sDAA8B,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",
@@ -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"],