@nrwl/angular 15.5.0 → 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 (98) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/migrations.json +13 -0
  3. package/package.json +18 -10
  4. package/src/builders/webpack-server/schema.json +1 -1
  5. package/src/builders/webpack-server/webpack-server.impl.js +9 -0
  6. package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
  7. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +15 -19
  8. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js.map +1 -1
  9. package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +27 -4
  10. package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js.map +1 -1
  11. package/src/executors/utilities/angular-version-utils.d.ts +3 -2
  12. package/src/executors/utilities/angular-version-utils.js +7 -3
  13. package/src/executors/utilities/angular-version-utils.js.map +1 -1
  14. package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js +4 -4
  15. package/src/generators/add-linting/angular-v14/lib/add-angular-eslint-dependencies.js.map +1 -1
  16. package/src/generators/add-linting/schema.json +10 -5
  17. package/src/generators/application/application.js +6 -0
  18. package/src/generators/application/application.js.map +1 -1
  19. package/src/generators/application/schema.json +13 -7
  20. package/src/generators/change-storybook-targets/schema.json +2 -1
  21. package/src/generators/component/component.js +8 -0
  22. package/src/generators/component/component.js.map +1 -1
  23. package/src/generators/component/schema.json +7 -4
  24. package/src/generators/component-cypress-spec/schema.json +12 -6
  25. package/src/generators/component-story/schema.json +10 -5
  26. package/src/generators/component-test/schema.json +10 -5
  27. package/src/generators/convert-to-with-mf/schema.json +2 -1
  28. package/src/generators/convert-tslint-to-eslint/schema.json +4 -2
  29. package/src/generators/cypress-component-configuration/schema.json +6 -3
  30. package/src/generators/downgrade-module/schema.json +8 -4
  31. package/src/generators/host/host.js +7 -0
  32. package/src/generators/host/host.js.map +1 -1
  33. package/src/generators/host/schema.json +11 -6
  34. package/src/generators/init/angular-v14/init.js +24 -23
  35. package/src/generators/init/angular-v14/init.js.map +1 -1
  36. package/src/generators/init/schema.json +12 -6
  37. package/src/generators/karma/angular-v14/karma.js +10 -10
  38. package/src/generators/karma/angular-v14/karma.js.map +1 -1
  39. package/src/generators/karma/schema.json +2 -1
  40. package/src/generators/karma-project/schema.json +6 -3
  41. package/src/generators/library/library.js +5 -8
  42. package/src/generators/library/library.js.map +1 -1
  43. package/src/generators/library/schema.json +18 -9
  44. package/src/generators/library-secondary-entry-point/schema.json +4 -2
  45. package/src/generators/move/schema.json +6 -3
  46. package/src/generators/ng-add/schema.json +14 -7
  47. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.actions.ts__tmpl__ +0 -0
  48. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.spec.ts__tmpl__ +0 -0
  49. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.effects.ts__tmpl__ +0 -0
  50. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.spec.ts__tmpl__ +0 -0
  51. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.facade.ts__tmpl__ +0 -0
  52. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.models.ts__tmpl__ +0 -0
  53. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.spec.ts__tmpl__ +0 -0
  54. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.reducer.ts__tmpl__ +0 -0
  55. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.spec.ts__tmpl__ +0 -0
  56. package/src/generators/ngrx/files/{__directory__ → latest/__directory__}/__fileName__.selectors.ts__tmpl__ +0 -0
  57. package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
  58. package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
  59. package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +12 -8
  60. package/src/generators/ngrx/lib/add-ngrx-to-package-json.js.map +1 -1
  61. package/src/generators/ngrx/lib/generate-files.js +7 -1
  62. package/src/generators/ngrx/lib/generate-files.js.map +1 -1
  63. package/src/generators/ngrx/lib/index.d.ts +1 -0
  64. package/src/generators/ngrx/lib/index.js +3 -1
  65. package/src/generators/ngrx/lib/index.js.map +1 -1
  66. package/src/generators/ngrx/lib/validate-options.d.ts +3 -0
  67. package/src/generators/ngrx/lib/validate-options.js +36 -0
  68. package/src/generators/ngrx/lib/validate-options.js.map +1 -0
  69. package/src/generators/ngrx/ngrx.js +1 -9
  70. package/src/generators/ngrx/ngrx.js.map +1 -1
  71. package/src/generators/ngrx/schema.json +12 -7
  72. package/src/generators/remote/remote.js +7 -0
  73. package/src/generators/remote/remote.js.map +1 -1
  74. package/src/generators/remote/schema.json +7 -4
  75. package/src/generators/scam/schema.json +6 -3
  76. package/src/generators/scam-directive/schema.json +8 -4
  77. package/src/generators/scam-pipe/schema.json +8 -4
  78. package/src/generators/scam-to-standalone/scam-to-standalone.js +7 -0
  79. package/src/generators/scam-to-standalone/scam-to-standalone.js.map +1 -1
  80. package/src/generators/scam-to-standalone/schema.json +7 -4
  81. package/src/generators/setup-mf/schema.json +6 -3
  82. package/src/generators/setup-ssr/schema.json +2 -1
  83. package/src/generators/setup-ssr/setup-ssr.js +6 -13
  84. package/src/generators/setup-ssr/setup-ssr.js.map +1 -1
  85. package/src/generators/setup-tailwind/schema.json +4 -2
  86. package/src/generators/stories/schema.json +6 -3
  87. package/src/generators/storybook-configuration/schema.json +12 -6
  88. package/src/generators/upgrade-module/schema.json +10 -5
  89. package/src/generators/web-worker/schema.json +6 -3
  90. package/src/utils/backward-compatible-versions.d.ts +6 -0
  91. package/src/utils/backward-compatible-versions.js +41 -0
  92. package/src/utils/backward-compatible-versions.js.map +1 -0
  93. package/src/utils/version-utils.d.ts +3 -0
  94. package/src/utils/version-utils.js +22 -0
  95. package/src/utils/version-utils.js.map +1 -0
  96. package/src/utils/versions.d.ts +1 -38
  97. package/src/utils/versions.js +2 -39
  98. package/src/utils/versions.js.map +1 -1
@@ -19,17 +19,20 @@
19
19
  },
20
20
  "directory": {
21
21
  "type": "string",
22
- "description": "A directory where the library is placed."
22
+ "description": "A directory where the library is placed.",
23
+ "x-priority": "important"
23
24
  },
24
25
  "publishable": {
25
26
  "type": "boolean",
26
27
  "default": false,
27
- "description": "Generate a publishable library."
28
+ "description": "Generate a publishable library.",
29
+ "x-priority": "important"
28
30
  },
29
31
  "buildable": {
30
32
  "type": "boolean",
31
33
  "default": false,
32
- "description": "Generate a buildable library."
34
+ "description": "Generate a buildable library.",
35
+ "x-priority": "important"
33
36
  },
34
37
  "prefix": {
35
38
  "type": "string",
@@ -40,7 +43,8 @@
40
43
  "skipFormat": {
41
44
  "description": "Skip formatting files.",
42
45
  "type": "boolean",
43
- "default": false
46
+ "default": false,
47
+ "x-priority": "internal"
44
48
  },
45
49
  "simpleModuleName": {
46
50
  "description": "Keep the module name simple (when using `--directory`).",
@@ -61,7 +65,8 @@
61
65
  "skipPackageJson": {
62
66
  "type": "boolean",
63
67
  "default": false,
64
- "description": "Do not add dependencies to `package.json`."
68
+ "description": "Do not add dependencies to `package.json`.",
69
+ "x-priority": "internal"
65
70
  },
66
71
  "skipTsConfig": {
67
72
  "type": "boolean",
@@ -71,16 +76,19 @@
71
76
  "routing": {
72
77
  "type": "boolean",
73
78
  "default": false,
74
- "description": "Add router configuration. See `lazy` for more information."
79
+ "description": "Add router configuration. See `lazy` for more information.",
80
+ "x-priority": "important"
75
81
  },
76
82
  "lazy": {
77
83
  "type": "boolean",
78
84
  "default": false,
79
- "description": "Add `RouterModule.forChild` when set to true, and a simple array of routes when set to false."
85
+ "description": "Add `RouterModule.forChild` when set to true, and a simple array of routes when set to false.",
86
+ "x-priority": "important"
80
87
  },
81
88
  "parent": {
82
89
  "type": "string",
83
- "description": "Path to the parent route configuration using `loadChildren` or `children`, depending on what `lazy` is set to."
90
+ "description": "Path to the parent route configuration using `loadChildren` or `children`, depending on what `lazy` is set to.",
91
+ "x-priority": "important"
84
92
  },
85
93
  "tags": {
86
94
  "type": "string",
@@ -109,7 +117,8 @@
109
117
  },
110
118
  "standaloneConfig": {
111
119
  "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
112
- "type": "boolean"
120
+ "type": "boolean",
121
+ "x-priority": "internal"
113
122
  },
114
123
  "compilationMode": {
115
124
  "description": "Specifies the compilation mode to use. If not specified, it will default to `partial` for publishable libraries and to `full` for buildable libraries. The `full` value can not be used for publishable libraries.",
@@ -14,14 +14,16 @@
14
14
  "index": 0
15
15
  },
16
16
  "x-prompt": "What name would you like to use for the secondary entry point?",
17
- "pattern": "^[a-zA-Z].*$"
17
+ "pattern": "^[a-zA-Z].*$",
18
+ "x-priority": "important"
18
19
  },
19
20
  "library": {
20
21
  "type": "string",
21
22
  "description": "The name of the library to create the secondary entry point for.",
22
23
  "x-prompt": "What library would you like to create the secondary entry point for?",
23
24
  "pattern": "^[a-zA-Z].*$",
24
- "x-dropdown": "projects"
25
+ "x-dropdown": "projects",
26
+ "x-priority": "important"
25
27
  },
26
28
  "skipModule": {
27
29
  "type": "boolean",
@@ -16,7 +16,8 @@
16
16
  "type": "string",
17
17
  "alias": "project",
18
18
  "description": "The name of the Angular project to move.",
19
- "x-dropdown": "projects"
19
+ "x-dropdown": "projects",
20
+ "x-priority": "important"
20
21
  },
21
22
  "destination": {
22
23
  "type": "string",
@@ -24,7 +25,8 @@
24
25
  "$default": {
25
26
  "$source": "argv",
26
27
  "index": 0
27
- }
28
+ },
29
+ "x-priority": "important"
28
30
  },
29
31
  "importPath": {
30
32
  "type": "string",
@@ -39,7 +41,8 @@
39
41
  "type": "boolean",
40
42
  "aliases": ["skip-format"],
41
43
  "description": "Skip formatting files.",
42
- "default": false
44
+ "default": false,
45
+ "x-priority": "internal"
43
46
  }
44
47
  },
45
48
  "required": ["projectName", "destination"]
@@ -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",
@@ -9,9 +9,16 @@ 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 angular_version_utils_1 = require("../utils/angular-version-utils");
13
+ const semver_1 = require("semver");
12
14
  function remote(tree, options) {
13
15
  var _a;
14
16
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
+ const installedAngularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)(tree);
18
+ if ((0, semver_1.lt)(installedAngularVersionInfo.version, '14.1.0') && options.standalone) {
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
+ You can resolve this error by removing the "standalone" option or by migrating to Angular 14.1.0.`);
21
+ }
15
22
  const projects = (0, devkit_1.getProjects)(tree);
16
23
  if (options.host && !projects.has(options.host)) {
17
24
  throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
@@ -1 +1 @@
1
- {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;;AAAA,yCAA8D;AAE9D,4DAA8D;AAC9D,8CAAwD;AACxD,mDAA+C;AAC/C,2DAAyD;AACzD,+BAAsD;AACtD,2FAAqF;AAErF,SAAsB,MAAM,CAAC,IAAU,EAAE,OAAe;;;QACtD,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;AA5CD,wBA4CC;AAED,kBAAe,MAAM,CAAC"}
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,0EAAgF;AAChF,mCAA4B;AAE5B,SAAsB,MAAM,CAAC,IAAU,EAAE,OAAe;;;QACtD,MAAM,2BAA2B,GAAG,IAAA,sDAA8B,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,10 +145,11 @@
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
- "description": "Whether to generate a remote application with standalone components.",
152
+ "description": "Whether to generate a remote application with standalone components. _Note: This is only supported in Angular versions >= 14.1.0_",
150
153
  "type": "boolean",
151
154
  "default": false
152
155
  },
@@ -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"]