@nx/angular 16.1.4 → 16.2.0-beta.1

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 (142) hide show
  1. package/generators.d.ts +2 -0
  2. package/generators.js +2 -0
  3. package/generators.js.map +1 -1
  4. package/generators.json +14 -2
  5. package/migrations.json +21 -0
  6. package/package.json +10 -11
  7. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +3 -4
  8. package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js.map +1 -1
  9. package/src/generators/application/lib/normalize-options.js +3 -2
  10. package/src/generators/application/lib/normalize-options.js.map +1 -1
  11. package/src/generators/component/lib/validate-options.js +1 -2
  12. package/src/generators/component/lib/validate-options.js.map +1 -1
  13. package/src/generators/cypress-component-configuration/cypress-component-configuration.js +30 -28
  14. package/src/generators/cypress-component-configuration/cypress-component-configuration.js.map +1 -1
  15. package/src/generators/directive/lib/validate-options.js +1 -2
  16. package/src/generators/directive/lib/validate-options.js.map +1 -1
  17. package/src/generators/host/host.js +1 -0
  18. package/src/generators/host/host.js.map +1 -1
  19. package/src/generators/library/files/base/package.json__tpl__ +1 -1
  20. package/src/generators/library/lib/create-files.js +1 -2
  21. package/src/generators/library/lib/create-files.js.map +1 -1
  22. package/src/generators/library/lib/normalize-options.js +6 -4
  23. package/src/generators/library/lib/normalize-options.js.map +1 -1
  24. package/src/generators/ng-add/migrate-from-angular-cli.d.ts +1 -1
  25. package/src/generators/ng-add/migrate-from-angular-cli.js +1 -2
  26. package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -1
  27. package/src/generators/ng-add/schema.d.ts +3 -1
  28. package/src/generators/ng-add/schema.json +1 -1
  29. package/src/generators/ng-add/utilities/index.d.ts +0 -1
  30. package/src/generators/ng-add/utilities/index.js +0 -1
  31. package/src/generators/ng-add/utilities/index.js.map +1 -1
  32. package/src/generators/ng-add/utilities/workspace.js +11 -6
  33. package/src/generators/ng-add/utilities/workspace.js.map +1 -1
  34. package/src/generators/ngrx/schema.json +1 -0
  35. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.actions.ts__tmpl__ +16 -0
  36. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.effects.spec.ts__tmpl__ +37 -0
  37. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
  38. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.facade.spec.ts__tmpl__ +99 -0
  39. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
  40. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.models.ts__tmpl__ +7 -0
  41. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.reducer.spec.ts__tmpl__ +37 -0
  42. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.reducer.ts__tmpl__ +41 -0
  43. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.selectors.spec.ts__tmpl__ +58 -0
  44. package/src/generators/ngrx-feature-store/files/base/__directory__/__fileName__.selectors.ts__tmpl__ +38 -0
  45. package/src/generators/ngrx-feature-store/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
  46. package/src/generators/ngrx-feature-store/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
  47. package/src/generators/ngrx-feature-store/lib/add-exports-barrel.d.ts +3 -0
  48. package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js +39 -0
  49. package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js.map +1 -0
  50. package/src/generators/ngrx-feature-store/lib/add-imports.d.ts +3 -0
  51. package/src/generators/ngrx-feature-store/lib/add-imports.js +103 -0
  52. package/src/generators/ngrx-feature-store/lib/add-imports.js.map +1 -0
  53. package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.d.ts +3 -0
  54. package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.js +28 -0
  55. package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.js.map +1 -0
  56. package/src/generators/ngrx-feature-store/lib/generate-files.d.ts +3 -0
  57. package/src/generators/ngrx-feature-store/lib/generate-files.js +20 -0
  58. package/src/generators/ngrx-feature-store/lib/generate-files.js.map +1 -0
  59. package/src/generators/ngrx-feature-store/lib/index.d.ts +6 -0
  60. package/src/generators/ngrx-feature-store/lib/index.js +10 -0
  61. package/src/generators/ngrx-feature-store/lib/index.js.map +1 -0
  62. package/src/generators/ngrx-feature-store/lib/normalize-options.d.ts +7 -0
  63. package/src/generators/ngrx-feature-store/lib/normalize-options.js +20 -0
  64. package/src/generators/ngrx-feature-store/lib/normalize-options.js.map +1 -0
  65. package/src/generators/ngrx-feature-store/lib/validate-options.d.ts +3 -0
  66. package/src/generators/ngrx-feature-store/lib/validate-options.js +35 -0
  67. package/src/generators/ngrx-feature-store/lib/validate-options.js.map +1 -0
  68. package/src/generators/ngrx-feature-store/ngrx-feature-store.d.ts +5 -0
  69. package/src/generators/ngrx-feature-store/ngrx-feature-store.js +30 -0
  70. package/src/generators/ngrx-feature-store/ngrx-feature-store.js.map +1 -0
  71. package/src/generators/ngrx-feature-store/schema.d.ts +12 -0
  72. package/src/generators/ngrx-feature-store/schema.json +72 -0
  73. package/src/generators/ngrx-root-store/lib/add-imports.d.ts +3 -0
  74. package/src/generators/ngrx-root-store/lib/add-imports.js +80 -0
  75. package/src/generators/ngrx-root-store/lib/add-imports.js.map +1 -0
  76. package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.d.ts +3 -0
  77. package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.js +28 -0
  78. package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.js.map +1 -0
  79. package/src/generators/ngrx-root-store/lib/index.d.ts +4 -0
  80. package/src/generators/ngrx-root-store/lib/index.js +8 -0
  81. package/src/generators/ngrx-root-store/lib/index.js.map +1 -0
  82. package/src/generators/ngrx-root-store/lib/normalize-options.d.ts +7 -0
  83. package/src/generators/ngrx-root-store/lib/normalize-options.js +37 -0
  84. package/src/generators/ngrx-root-store/lib/normalize-options.js.map +1 -0
  85. package/src/generators/ngrx-root-store/lib/validate-options.d.ts +3 -0
  86. package/src/generators/ngrx-root-store/lib/validate-options.js +33 -0
  87. package/src/generators/ngrx-root-store/lib/validate-options.js.map +1 -0
  88. package/src/generators/ngrx-root-store/ngrx-root-store.d.ts +5 -0
  89. package/src/generators/ngrx-root-store/ngrx-root-store.js +40 -0
  90. package/src/generators/ngrx-root-store/ngrx-root-store.js.map +1 -0
  91. package/src/generators/ngrx-root-store/schema.d.ts +10 -0
  92. package/src/generators/ngrx-root-store/schema.json +66 -0
  93. package/src/generators/pipe/lib/validate-options.js +1 -2
  94. package/src/generators/pipe/lib/validate-options.js.map +1 -1
  95. package/src/generators/remote/remote.js +1 -0
  96. package/src/generators/remote/remote.js.map +1 -1
  97. package/src/generators/scam/lib/validate-options.js +1 -2
  98. package/src/generators/scam/lib/validate-options.js.map +1 -1
  99. package/src/generators/scam-directive/lib/validate-options.js +1 -2
  100. package/src/generators/scam-directive/lib/validate-options.js.map +1 -1
  101. package/src/generators/scam-pipe/lib/validate-options.js +1 -2
  102. package/src/generators/scam-pipe/lib/validate-options.js.map +1 -1
  103. package/src/generators/setup-mf/lib/add-remote-entry.js +0 -3
  104. package/src/generators/setup-mf/lib/add-remote-entry.js.map +1 -1
  105. package/src/generators/setup-mf/lib/index.d.ts +1 -0
  106. package/src/generators/setup-mf/lib/index.js +1 -0
  107. package/src/generators/setup-mf/lib/index.js.map +1 -1
  108. package/src/generators/setup-mf/lib/normalize-options.d.ts +3 -0
  109. package/src/generators/setup-mf/lib/normalize-options.js +10 -0
  110. package/src/generators/setup-mf/lib/normalize-options.js.map +1 -0
  111. package/src/generators/setup-mf/lib/remove-dead-code-from-remote.d.ts +1 -1
  112. package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +9 -13
  113. package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js.map +1 -1
  114. package/src/generators/setup-mf/schema.d.ts +8 -1
  115. package/src/generators/setup-mf/setup-mf.d.ts +1 -1
  116. package/src/generators/setup-mf/setup-mf.js +3 -4
  117. package/src/generators/setup-mf/setup-mf.js.map +1 -1
  118. package/src/generators/utils/path.d.ts +0 -1
  119. package/src/generators/utils/path.js +1 -16
  120. package/src/generators/utils/path.js.map +1 -1
  121. package/src/generators/utils/project.d.ts +3 -1
  122. package/src/generators/utils/project.js +17 -7
  123. package/src/generators/utils/project.js.map +1 -1
  124. package/src/generators/utils/selector.js +2 -2
  125. package/src/generators/utils/selector.js.map +1 -1
  126. package/src/generators/utils/testing.js +24 -7
  127. package/src/generators/utils/testing.js.map +1 -1
  128. package/src/generators/utils/validations.d.ts +1 -0
  129. package/src/generators/utils/validations.js +17 -1
  130. package/src/generators/utils/validations.js.map +1 -1
  131. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +45 -25
  132. package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js.map +1 -1
  133. package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.d.ts +2 -0
  134. package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +124 -0
  135. package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js.map +1 -0
  136. package/src/utils/versions.d.ts +1 -1
  137. package/src/utils/versions.js +1 -1
  138. package/src/generators/cypress-component-configuration/files/cypress/support/commands.ts__tpl__ +0 -42
  139. package/src/generators/cypress-component-configuration/files/cypress.config.ts__tpl__ +0 -6
  140. package/src/generators/ng-add/utilities/normalize-options.d.ts +0 -4
  141. package/src/generators/ng-add/utilities/normalize-options.js +0 -30
  142. package/src/generators/ng-add/utilities/normalize-options.js.map +0 -1
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addImportsToModule = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
6
+ const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
7
+ const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
8
+ const js_1 = require("@nx/js");
9
+ let tsModule;
10
+ function addStoreForFeatureImport(tree, isParentStandalone, route, sourceFile, parentPath, provideStoreForFeature, storeForFeature) {
11
+ if (isParentStandalone) {
12
+ const parentContents = tree.read(parentPath, 'utf-8');
13
+ if (parentContents.includes('ApplicationConfig')) {
14
+ (0, ast_utils_1.addProviderToAppConfig)(tree, parentPath, provideStoreForFeature);
15
+ }
16
+ else if (parentContents.includes('bootstrapApplication')) {
17
+ (0, ast_utils_1.addProviderToBootstrapApplication)(tree, parentPath, provideStoreForFeature);
18
+ }
19
+ else {
20
+ (0, route_utils_1.addProviderToRoute)(tree, parentPath, route, provideStoreForFeature);
21
+ }
22
+ }
23
+ else {
24
+ sourceFile = (0, ast_utils_1.addImportToModule)(tree, sourceFile, parentPath, storeForFeature);
25
+ }
26
+ return sourceFile;
27
+ }
28
+ function addEffectsForFeatureImport(tree, isParentStandalone, route, sourceFile, parentPath, provideEffectsForFeature, effectsForFeature) {
29
+ if (isParentStandalone) {
30
+ const parentContents = tree.read(parentPath, 'utf-8');
31
+ if (parentContents.includes('ApplicationConfig')) {
32
+ (0, ast_utils_1.addProviderToAppConfig)(tree, parentPath, provideEffectsForFeature);
33
+ }
34
+ else if (parentContents.includes('bootstrapApplication')) {
35
+ (0, ast_utils_1.addProviderToBootstrapApplication)(tree, parentPath, provideEffectsForFeature);
36
+ }
37
+ else {
38
+ (0, route_utils_1.addProviderToRoute)(tree, parentPath, route, provideEffectsForFeature);
39
+ }
40
+ }
41
+ else {
42
+ sourceFile = (0, ast_utils_1.addImportToModule)(tree, sourceFile, parentPath, effectsForFeature);
43
+ }
44
+ return sourceFile;
45
+ }
46
+ function addImportsToModule(tree, options) {
47
+ if (!tsModule) {
48
+ tsModule = (0, ensure_typescript_1.ensureTypescript)();
49
+ }
50
+ const parentPath = options.parent;
51
+ const sourceText = tree.read(parentPath, 'utf-8');
52
+ let sourceFile = tsModule.createSourceFile(parentPath, sourceText, tsModule.ScriptTarget.Latest, true);
53
+ const isParentStandalone = !sourceText.includes('@NgModule');
54
+ const addImport = (source, symbolName, fileName, isDefault = false) => {
55
+ return (0, js_1.insertImport)(tree, source, parentPath, symbolName, fileName, isDefault);
56
+ };
57
+ const dir = `./${(0, devkit_1.names)(options.directory).fileName}`;
58
+ const pathPrefix = `${dir}/${(0, devkit_1.names)(options.name).fileName}`;
59
+ const reducerPath = `${pathPrefix}.reducer`;
60
+ const effectsPath = `${pathPrefix}.effects`;
61
+ const facadePath = `${pathPrefix}.facade`;
62
+ const constantName = `${(0, devkit_1.names)(options.name).constantName}`;
63
+ const effectsName = `${(0, devkit_1.names)(options.name).className}Effects`;
64
+ const facadeName = `${(0, devkit_1.names)(options.name).className}Facade`;
65
+ const className = `${(0, devkit_1.names)(options.name).className}`;
66
+ const propertyName = `${(0, devkit_1.names)(options.name).propertyName}`;
67
+ const reducerImports = `* as from${className}`;
68
+ const storeForFeature = `StoreModule.forFeature(from${className}.${constantName}_FEATURE_KEY, from${className}.${propertyName}Reducer)`;
69
+ const effectsForFeature = `EffectsModule.forFeature([${effectsName}])`;
70
+ const provideEffectsForFeature = `provideEffects(${effectsName})`;
71
+ const provideStoreForFeature = `provideState(from${className}.${constantName}_FEATURE_KEY, from${className}.${propertyName}Reducer)`;
72
+ if (isParentStandalone) {
73
+ sourceFile = addImport(sourceFile, 'provideStore', '@ngrx/store');
74
+ if (!options.minimal) {
75
+ sourceFile = addImport(sourceFile, 'provideState', '@ngrx/store');
76
+ }
77
+ sourceFile = addImport(sourceFile, 'provideEffects', '@ngrx/effects');
78
+ }
79
+ else {
80
+ sourceFile = addImport(sourceFile, 'StoreModule', '@ngrx/store');
81
+ sourceFile = addImport(sourceFile, 'EffectsModule', '@ngrx/effects');
82
+ }
83
+ sourceFile = addImport(sourceFile, reducerImports, reducerPath, true);
84
+ sourceFile = addImport(sourceFile, effectsName, effectsPath);
85
+ if (options.facade) {
86
+ sourceFile = addImport(sourceFile, facadeName, facadePath);
87
+ if (isParentStandalone) {
88
+ if (tree.read(parentPath, 'utf-8').includes('ApplicationConfig')) {
89
+ (0, ast_utils_1.addProviderToAppConfig)(tree, parentPath, facadeName);
90
+ }
91
+ else {
92
+ (0, route_utils_1.addProviderToRoute)(tree, parentPath, options.route, facadeName);
93
+ }
94
+ }
95
+ else {
96
+ sourceFile = (0, ast_utils_1.addProviderToModule)(tree, sourceFile, parentPath, facadeName);
97
+ }
98
+ }
99
+ sourceFile = addStoreForFeatureImport(tree, isParentStandalone, options.route, sourceFile, parentPath, provideStoreForFeature, storeForFeature);
100
+ sourceFile = addEffectsForFeatureImport(tree, isParentStandalone, options.route, sourceFile, parentPath, provideEffectsForFeature, effectsForFeature);
101
+ }
102
+ exports.addImportsToModule = addImportsToModule;
103
+ //# sourceMappingURL=add-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-imports.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-feature-store/lib/add-imports.ts"],"names":[],"mappings":";;;AACA,uCAAmC;AAEnC,kEAK4C;AAC5C,sEAA0E;AAE1E,qFAAiF;AACjF,+BAAsC;AAEtC,IAAI,QAAqC,CAAC;AAE1C,SAAS,wBAAwB,CAC/B,IAAU,EACV,kBAAkB,EAClB,KAAa,EACb,UAAsB,EACtB,UAAkB,EAClB,sBAA8B,EAC9B,eAAuB;IAEvB,IAAI,kBAAkB,EAAE;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtD,IAAI,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YAChD,IAAA,kCAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC;SAClE;aAAM,IAAI,cAAc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AI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;gBAChE,IAAA,kCAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;aACtD;iBAAM;gBACL,IAAA,gCAAkB,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;aACjE;SACF;aAAM;YACL,UAAU,GAAG,IAAA,+BAAmB,EAC9B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,UAAU,CACX,CAAC;SACH;KACF;IAED,UAAU,GAAG,wBAAwB,CACnC,IAAI,EACJ,kBAAkB,EAClB,OAAO,CAAC,KAAK,EACb,UAAU,EACV,UAAU,EACV,sBAAsB,EACtB,eAAe,CAChB,CAAC;IACF,UAAU,GAAG,0BAA0B,CACrC,IAAI,EACJ,kBAAkB,EAClB,OAAO,CAAC,KAAK,EACb,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,iBAAiB,CAClB,CAAC;AACJ,CAAC;AAvGD,gDAuGC"}
@@ -0,0 +1,3 @@
1
+ import type { GeneratorCallback, Tree } from '@nx/devkit';
2
+ import { NormalizedNgRxFeatureStoreGeneratorOptions } from './normalize-options';
3
+ export declare function addNgRxToPackageJson(tree: Tree, options: NormalizedNgRxFeatureStoreGeneratorOptions): GeneratorCallback;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addNgRxToPackageJson = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const semver_1 = require("semver");
6
+ const version_utils_1 = require("../../utils/version-utils");
7
+ function addNgRxToPackageJson(tree, options) {
8
+ var _a;
9
+ var _b;
10
+ const jasmineMarblesVersion = (0, semver_1.gte)(options.rxjsVersion, '7.0.0')
11
+ ? '~0.9.1'
12
+ : '~0.8.3';
13
+ const ngrxVersion = (0, version_utils_1.versions)(tree).ngrxVersion;
14
+ (_a = (_b = process.env).npm_config_legacy_peer_deps) !== null && _a !== void 0 ? _a : (_b.npm_config_legacy_peer_deps = 'true');
15
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, {
16
+ '@ngrx/store': ngrxVersion,
17
+ '@ngrx/effects': ngrxVersion,
18
+ '@ngrx/entity': ngrxVersion,
19
+ '@ngrx/router-store': ngrxVersion,
20
+ '@ngrx/component-store': ngrxVersion,
21
+ }, {
22
+ '@ngrx/schematics': ngrxVersion,
23
+ '@ngrx/store-devtools': ngrxVersion,
24
+ 'jasmine-marbles': jasmineMarblesVersion,
25
+ });
26
+ }
27
+ exports.addNgRxToPackageJson = addNgRxToPackageJson;
28
+ //# sourceMappingURL=add-ngrx-to-package-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-ngrx-to-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAC1D,mCAA6B;AAC7B,6DAAqD;AAGrD,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAmD;;;IAEnD,MAAM,qBAAqB,GAAG,IAAA,YAAG,EAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC;QAC7D,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,QAAQ,CAAC;IACb,MAAM,WAAW,GAAG,IAAA,wBAAQ,EAAC,IAAI,CAAC,CAAC,WAAW,CAAC;IAE/C,YAAA,OAAO,CAAC,GAAG,EAAC,2BAA2B,uCAA3B,2BAA2B,GAAK,MAAM,EAAC;IAEnD,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;AA1BD,oDA0BC"}
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import type { NormalizedNgRxFeatureStoreGeneratorOptions } from './normalize-options';
3
+ export declare function generateFilesFromTemplates(tree: Tree, options: NormalizedNgRxFeatureStoreGeneratorOptions): void;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateFilesFromTemplates = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const semver_1 = require("semver");
6
+ const version_utils_1 = require("../../utils/version-utils");
7
+ function generateFilesFromTemplates(tree, options) {
8
+ const projectNames = (0, devkit_1.names)(options.name);
9
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'base'), options.parentDirectory, Object.assign(Object.assign(Object.assign({}, options), projectNames), { importFromOperators: (0, semver_1.lt)(options.rxjsVersion, '7.2.0'), tmpl: '' }));
10
+ const angularVersion = (0, version_utils_1.getInstalledAngularVersion)(tree);
11
+ if ((0, semver_1.lt)(angularVersion, '14.1.0')) {
12
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'no-inject'), options.parentDirectory, Object.assign(Object.assign(Object.assign({}, options), projectNames), { tmpl: '' }));
13
+ }
14
+ if (!options.facade) {
15
+ tree.delete((0, devkit_1.joinPathFragments)(options.parentDirectory, options.directory, `${projectNames.fileName}.facade.ts`));
16
+ tree.delete((0, devkit_1.joinPathFragments)(options.parentDirectory, options.directory, `${projectNames.fileName}.facade.spec.ts`));
17
+ }
18
+ }
19
+ exports.generateFilesFromTemplates = generateFilesFromTemplates;
20
+ //# sourceMappingURL=generate-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-feature-store/lib/generate-files.ts"],"names":[],"mappings":";;;AACA,uCAAqE;AAErE,mCAA4B;AAC5B,6DAAuE;AAEvE,SAAgB,0BAA0B,CACxC,IAAU,EACV,OAAmD;IAEnD,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EACnD,OAAO,CAAC,eAAe,gDAElB,OAAO,GACP,YAAY,KACf,mBAAmB,EAAE,IAAA,WAAE,EAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EACrD,IAAI,EAAE,EAAE,IAEX,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,0CAA0B,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,gEAgDC"}
@@ -0,0 +1,6 @@
1
+ export * from './add-imports';
2
+ export * from './add-exports-barrel';
3
+ export * from './add-ngrx-to-package-json';
4
+ export * from './generate-files';
5
+ export * from './normalize-options';
6
+ export * from './validate-options';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-imports"), exports);
5
+ tslib_1.__exportStar(require("./add-exports-barrel"), exports);
6
+ tslib_1.__exportStar(require("./add-ngrx-to-package-json"), exports);
7
+ tslib_1.__exportStar(require("./generate-files"), exports);
8
+ tslib_1.__exportStar(require("./normalize-options"), exports);
9
+ tslib_1.__exportStar(require("./validate-options"), exports);
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-feature-store/lib/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,+DAAqC;AACrC,qEAA2C;AAC3C,2DAAiC;AACjC,8DAAoC;AACpC,6DAAmC"}
@@ -0,0 +1,7 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import type { Schema } from '../schema';
3
+ export type NormalizedNgRxFeatureStoreGeneratorOptions = Schema & {
4
+ parentDirectory: string;
5
+ rxjsVersion: string;
6
+ };
7
+ export declare function normalizeOptions(tree: Tree, options: Schema): NormalizedNgRxFeatureStoreGeneratorOptions;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const semver_1 = require("@nx/devkit/src/utils/semver");
6
+ const path_1 = require("path");
7
+ const versions_1 = require("../../../utils/versions");
8
+ function normalizeOptions(tree, options) {
9
+ var _a;
10
+ let rxjsVersion;
11
+ try {
12
+ rxjsVersion = (0, semver_1.checkAndCleanWithSemver)('rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
13
+ }
14
+ catch (_b) {
15
+ rxjsVersion = (0, semver_1.checkAndCleanWithSemver)('rxjs', versions_1.rxjsVersion);
16
+ }
17
+ return Object.assign(Object.assign({}, options), { parentDirectory: options.parent ? (0, path_1.dirname)(options.parent) : undefined, route: options.route === '' ? `''` : (_a = options.route) !== null && _a !== void 0 ? _a : `''`, directory: (0, devkit_1.names)(options.directory).fileName, rxjsVersion });
18
+ }
19
+ exports.normalizeOptions = normalizeOptions;
20
+ //# sourceMappingURL=normalize-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-feature-store/lib/normalize-options.ts"],"names":[],"mappings":";;;AACA,uCAA6C;AAC7C,wDAAsE;AACtE,+BAA+B;AAC/B,sDAA4E;AAQ5E,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAe;;IAEf,IAAI,WAAmB,CAAC;IACxB,IAAI;QACF,WAAW,GAAG,IAAA,gCAAuB,EACnC,MAAM,EACN,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CACpD,CAAC;KACH;IAAC,WAAM;QACN,WAAW,GAAG,IAAA,gCAAuB,EAAC,MAAM,EAAE,sBAAkB,CAAC,CAAC;KACnE;IAED,uCACK,OAAO,KACV,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,EACrE,KAAK,EAAE,OAAO,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,EAC1D,SAAS,EAAE,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAC5C,WAAW,IACX;AACJ,CAAC;AArBD,4CAqBC"}
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import { Schema } from '../schema';
3
+ export declare function validateOptions(tree: Tree, options: Schema): void;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateOptions = void 0;
4
+ const version_utils_1 = require("../..//utils/version-utils");
5
+ const version_utils_2 = require("../../../utils/version-utils");
6
+ const semver_1 = require("semver");
7
+ function validateOptions(tree, options) {
8
+ var _a, _b;
9
+ if (!options.parent) {
10
+ throw new Error('Please provide a value for "--parent"!');
11
+ }
12
+ if (options.parent && !tree.exists(options.parent)) {
13
+ throw new Error(`Parent does not exist: ${options.parent}.`);
14
+ }
15
+ const angularVersionInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
16
+ const intendedNgRxVersionForAngularMajor = (0, version_utils_2.getPkgVersionForAngularMajorVersion)('ngrxVersion', angularVersionInfo.major);
17
+ 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));
18
+ if ((0, semver_1.lt)(angularVersionInfo.version, '14.1.0') || ngrxMajorVersion < 15) {
19
+ const parentContent = tree.read(options.parent, 'utf-8');
20
+ const { tsquery } = require('@phenomnomnominal/tsquery');
21
+ const ast = tsquery.ast(parentContent);
22
+ const NG_MODULE_DECORATOR_SELECTOR = 'ClassDeclaration > Decorator > CallExpression:has(Identifier[name=NgModule])';
23
+ const nodes = tsquery(ast, NG_MODULE_DECORATOR_SELECTOR, {
24
+ visitAllChildren: true,
25
+ });
26
+ if (nodes.length === 0) {
27
+ throw new Error(`The provided parent path "${options.parent}" does not contain an "NgModule". ` +
28
+ 'Please make sure to provide a path to an "NgModule" where the state will be registered. ' +
29
+ 'If you are trying to use a "Routes" definition file (for Standalone API usage), ' +
30
+ 'please note this is not supported in Angular versions lower than 14.1.0.');
31
+ }
32
+ }
33
+ }
34
+ exports.validateOptions = validateOptions;
35
+ //# sourceMappingURL=validate-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-options.js","sourceRo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,CAAC;QACH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CACb,6BAA6B,OAAO,CAAC,MAAM,oCAAoC;gBAC7E,0FAA0F;gBAC1F,kFAAkF;gBAClF,0EAA0E,CAC7E,CAAC;SACH;KACF;AACH,CAAC;AAvCD,0CAuCC"}
@@ -0,0 +1,5 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import { GeneratorCallback } from '@nx/devkit';
3
+ import type { Schema } from './schema';
4
+ export declare function ngrxFeatureStoreGenerator(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
5
+ export default ngrxFeatureStoreGenerator;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ngrxFeatureStoreGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const lib_1 = require("./lib");
7
+ function ngrxFeatureStoreGenerator(tree, schema) {
8
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
+ (0, lib_1.validateOptions)(tree, schema);
10
+ const options = (0, lib_1.normalizeOptions)(tree, schema);
11
+ if (!options.minimal) {
12
+ (0, lib_1.generateFilesFromTemplates)(tree, options);
13
+ }
14
+ if (!options.skipImport) {
15
+ (0, lib_1.addImportsToModule)(tree, options);
16
+ (0, lib_1.addExportsToBarrel)(tree, options);
17
+ }
18
+ let packageInstallationTask = () => { };
19
+ if (!options.skipPackageJson) {
20
+ packageInstallationTask = (0, lib_1.addNgRxToPackageJson)(tree, options);
21
+ }
22
+ if (!options.skipFormat) {
23
+ yield (0, devkit_1.formatFiles)(tree);
24
+ }
25
+ return packageInstallationTask;
26
+ });
27
+ }
28
+ exports.ngrxFeatureStoreGenerator = ngrxFeatureStoreGenerator;
29
+ exports.default = ngrxFeatureStoreGenerator;
30
+ //# sourceMappingURL=ngrx-feature-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngrx-feature-store.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/ngrx-feature-store/ngrx-feature-store.ts"],"names":[],"mappings":";;;;AACA,uCAA4D;AAE5D,+BAOe;AAEf,SAAsB,yBAAyB,CAAC,IAAU,EAAE,MAAc;;QACxE,IAAA,qBAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,IAAA,gCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC3C;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,EAAE,OAAO,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,uBAAuB,CAAC;IACjC,CAAC;CAAA;AAvBD,8DAuBC;AAED,kBAAe,yBAAyB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface Schema {
2
+ name: string;
3
+ minimal: boolean;
4
+ parent: string;
5
+ directory?: string;
6
+ route?: string;
7
+ barrels?: boolean;
8
+ facade?: boolean;
9
+ skipFormat?: boolean;
10
+ skipImport?: boolean;
11
+ skipPackageJson?: boolean;
12
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "NxNgrxFeatureStoreGenerator",
4
+ "title": "NgRx Feature Store Generator",
5
+ "description": "Add an NgRx Feature Store to an application or library.",
6
+ "cli": "nx",
7
+ "type": "object",
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "Name of the NgRx feature state, such as `products` or `users`. Recommended to use the plural form of the name.",
12
+ "$default": {
13
+ "$source": "argv",
14
+ "index": 0
15
+ },
16
+ "x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`.",
17
+ "x-priority": "important"
18
+ },
19
+ "parent": {
20
+ "type": "string",
21
+ "description": "The path to the file where the state will be registered. For NgModule usage, this will be your Feature Module. For Standalone API usage, this will be your Routes definition file for your feature state. The host directory will create/use the new state directory. _Note: The Standalone API usage is only supported in Angular versions >= 14.1.0_.",
22
+ "x-prompt": "What is the path to the module or Routes definition where this NgRx state should be registered?",
23
+ "x-priority": "important"
24
+ },
25
+ "route": {
26
+ "type": "string",
27
+ "description": "The route that the Standalone NgRx Providers should be added to. _Note: This is only supported in Angular versions >= 14.1.0_.",
28
+ "default": "''"
29
+ },
30
+ "minimal": {
31
+ "type": "boolean",
32
+ "default": false,
33
+ "description": "Only register the feature state.",
34
+ "x-priority": "important"
35
+ },
36
+ "directory": {
37
+ "type": "string",
38
+ "default": "+state",
39
+ "description": "The name of the folder used to contain/group the generated NgRx files."
40
+ },
41
+ "facade": {
42
+ "type": "boolean",
43
+ "default": false,
44
+ "description": "Create a Facade class for the the feature.",
45
+ "x-prompt": "Would you like to use a Facade with your NgRx state?"
46
+ },
47
+ "skipImport": {
48
+ "type": "boolean",
49
+ "default": false,
50
+ "description": "Generate NgRx feature files without registering the feature in the NgModule."
51
+ },
52
+ "skipFormat": {
53
+ "description": "Skip formatting files.",
54
+ "type": "boolean",
55
+ "default": false,
56
+ "x-priority": "internal"
57
+ },
58
+ "skipPackageJson": {
59
+ "type": "boolean",
60
+ "default": false,
61
+ "description": "Do not update the `package.json` with NgRx dependencies.",
62
+ "x-priority": "internal"
63
+ },
64
+ "barrels": {
65
+ "type": "boolean",
66
+ "default": false,
67
+ "description": "Use barrels to re-export actions, state and selectors."
68
+ }
69
+ },
70
+ "additionalProperties": false,
71
+ "required": ["name"]
72
+ }
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import { NormalizedNgRxRootStoreGeneratorOptions } from './normalize-options';
3
+ export declare function addImportsToModule(tree: Tree, options: NormalizedNgRxRootStoreGeneratorOptions): void;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addImportsToModule = void 0;
4
+ const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
5
+ const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
+ const js_1 = require("@nx/js");
7
+ let tsModule;
8
+ function addRootStoreImport(tree, isParentStandalone, sourceFile, parentPath, provideRootStore, storeForRoot) {
9
+ if (isParentStandalone) {
10
+ if (tree.read(parentPath, 'utf-8').includes('ApplicationConfig')) {
11
+ (0, ast_utils_1.addProviderToAppConfig)(tree, parentPath, provideRootStore);
12
+ }
13
+ else {
14
+ (0, ast_utils_1.addProviderToBootstrapApplication)(tree, parentPath, provideRootStore);
15
+ }
16
+ }
17
+ else {
18
+ sourceFile = (0, ast_utils_1.addImportToModule)(tree, sourceFile, parentPath, storeForRoot);
19
+ }
20
+ return sourceFile;
21
+ }
22
+ function addRootEffectsImport(tree, isParentStandalone, sourceFile, parentPath, provideRootEffects, effectsForEmptyRoot) {
23
+ if (isParentStandalone) {
24
+ if (tree.read(parentPath, 'utf-8').includes('ApplicationConfig')) {
25
+ (0, ast_utils_1.addProviderToAppConfig)(tree, parentPath, provideRootEffects);
26
+ }
27
+ else {
28
+ (0, ast_utils_1.addProviderToBootstrapApplication)(tree, parentPath, provideRootEffects);
29
+ }
30
+ }
31
+ else {
32
+ sourceFile = (0, ast_utils_1.addImportToModule)(tree, sourceFile, parentPath, effectsForEmptyRoot);
33
+ }
34
+ return sourceFile;
35
+ }
36
+ function addRouterStoreImport(tree, sourceFile, addImport, parentPath, storeRouterModule) {
37
+ sourceFile = addImport(sourceFile, 'StoreRouterConnectingModule', '@ngrx/router-store');
38
+ return (0, ast_utils_1.addImportToModule)(tree, sourceFile, parentPath, storeRouterModule);
39
+ }
40
+ function addImportsToModule(tree, options) {
41
+ if (!tsModule) {
42
+ tsModule = (0, ensure_typescript_1.ensureTypescript)();
43
+ }
44
+ const parentPath = options.parent;
45
+ const sourceText = tree.read(parentPath, 'utf-8');
46
+ let sourceFile = tsModule.createSourceFile(parentPath, sourceText, tsModule.ScriptTarget.Latest, true);
47
+ const isParentStandalone = !sourceText.includes('@NgModule');
48
+ const addImport = (source, symbolName, fileName, isDefault = false) => {
49
+ return (0, js_1.insertImport)(tree, source, parentPath, symbolName, fileName, isDefault);
50
+ };
51
+ const storeMetaReducers = `metaReducers: []`;
52
+ const storeForRoot = `StoreModule.forRoot({}, {
53
+ ${storeMetaReducers},
54
+ runtimeChecks: {
55
+ strictActionImmutability: true,
56
+ strictStateImmutability: true
57
+ }
58
+ })`;
59
+ const effectsForEmptyRoot = `EffectsModule.forRoot([])`;
60
+ const storeRouterModule = 'StoreRouterConnectingModule.forRoot()';
61
+ const provideRootStore = `provideStore()`;
62
+ const provideRootEffects = `provideEffects()`;
63
+ if (isParentStandalone) {
64
+ sourceFile = addImport(sourceFile, 'provideStore', '@ngrx/store');
65
+ sourceFile = addImport(sourceFile, 'provideEffects', '@ngrx/effects');
66
+ }
67
+ else {
68
+ sourceFile = addImport(sourceFile, 'StoreModule', '@ngrx/store');
69
+ sourceFile = addImport(sourceFile, 'EffectsModule', '@ngrx/effects');
70
+ }
71
+ sourceFile = addRootStoreImport(tree, isParentStandalone, sourceFile, parentPath, provideRootStore, storeForRoot);
72
+ sourceFile = addRootEffectsImport(tree, isParentStandalone, sourceFile, parentPath, provideRootEffects, effectsForEmptyRoot);
73
+ // this is just a heuristic
74
+ const hasRouter = sourceText.indexOf('RouterModule') > -1;
75
+ if (hasRouter && !isParentStandalone) {
76
+ sourceFile = addRouterStoreImport(tree, sourceFile, addImport, parentPath, storeRouterModule);
77
+ }
78
+ }
79
+ exports.addImportsToModule = addImportsToModule;
80
+ //# sourceMappingURL=add-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-imports.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-root-store/lib/add-imports.ts"],"names":[],"mappings":";;;AAEA,kEAI4C;AAC5C,qFAAiF;AACjF,+BAAsC;AAGtC,IAAI,QAAqC,CAAC;AAE1C,SAAS,kBAAkB,CACzB,IAAU,EACV,kBAA2B,EAC3B,UAAsB,EACtB,UAAkB,EAClB,gBAAwB,EACxB,YAAoB;IAEpB,IAAI,kBAAkB,EAAE;QACtB,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YAChE,IAAA,kCAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;SAC5D;aAAM;YACL,IAAA,6CAAiC,EAAC,IAAI,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;SACvE;KACF;SAAM;QACL,UAAU,GAAG,IAAA,6BAAiB,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;KAC5E;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,oBAAoB,CAC3B,IAAU,EACV,kBAA2B,EAC3B,UAAsB,EACtB,UAAkB,EAClB,kBAA0B,EAC1B,mBAA2B;IAE3B,IAAI,kBAAkB,EAAE;QACtB,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YAChE,IAAA,kCAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;SAC9D;aAAM;YACL,IAAA,6CAAiC,EAAC,IAAI,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;SACzE;KACF;SAAM;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GAAG,uCAAuC,CAAC;IAElE,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;IAC1C,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;IAE9C,IAAI,kBAAkB,EAAE;QACtB,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;QAClE,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;KACvE;SAAM;QACL,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;QACjE,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;KACtE;IAED,UAAU,GAAG,kBAAkB,CAC7B,IAAI,EACJ,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,YAAY,CACb,CAAC;IAEF,UAAU,GAAG,oBAAoB,CAC/B,IAAI,EACJ,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,CACpB,CAAC;IAEF,2BAA2B;IAC3B,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IAE1D,IAAI,SAAS,IAAI,CAAC,kBAAkB,EAAE;QACpC,UAAU,GAAG,oBAAoB,CAC/B,IAAI,EACJ,UAAU,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,CAClB,CAAC;KACH;AACH,CAAC;AAvFD,gDAuFC"}
@@ -0,0 +1,3 @@
1
+ import type { GeneratorCallback, Tree } from '@nx/devkit';
2
+ import { NormalizedNgRxRootStoreGeneratorOptions } from './normalize-options';
3
+ export declare function addNgRxToPackageJson(tree: Tree, options: NormalizedNgRxRootStoreGeneratorOptions): GeneratorCallback;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addNgRxToPackageJson = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const semver_1 = require("semver");
6
+ const version_utils_1 = require("../../utils/version-utils");
7
+ function addNgRxToPackageJson(tree, options) {
8
+ var _a;
9
+ var _b;
10
+ const jasmineMarblesVersion = (0, semver_1.gte)(options.rxjsVersion, '7.0.0')
11
+ ? '~0.9.1'
12
+ : '~0.8.3';
13
+ const ngrxVersion = (0, version_utils_1.versions)(tree).ngrxVersion;
14
+ (_a = (_b = process.env).npm_config_legacy_peer_deps) !== null && _a !== void 0 ? _a : (_b.npm_config_legacy_peer_deps = 'true');
15
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, {
16
+ '@ngrx/store': ngrxVersion,
17
+ '@ngrx/effects': ngrxVersion,
18
+ '@ngrx/entity': ngrxVersion,
19
+ '@ngrx/router-store': ngrxVersion,
20
+ '@ngrx/component-store': ngrxVersion,
21
+ }, {
22
+ '@ngrx/schematics': ngrxVersion,
23
+ '@ngrx/store-devtools': ngrxVersion,
24
+ 'jasmine-marbles': jasmineMarblesVersion,
25
+ });
26
+ }
27
+ exports.addNgRxToPackageJson = addNgRxToPackageJson;
28
+ //# sourceMappingURL=add-ngrx-to-package-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-ngrx-to-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAC1D,mCAA6B;AAC7B,6DAAqD;AAGrD,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAgD;;;IAEhD,MAAM,qBAAqB,GAAG,IAAA,YAAG,EAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC;QAC7D,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,QAAQ,CAAC;IACb,MAAM,WAAW,GAAG,IAAA,wBAAQ,EAAC,IAAI,CAAC,CAAC,WAAW,CAAC;IAE/C,YAAA,OAAO,CAAC,GAAG,EAAC,2BAA2B,uCAA3B,2BAA2B,GAAK,MAAM,EAAC;IAEnD,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;AA1BD,oDA0BC"}
@@ -0,0 +1,4 @@
1
+ export * from './add-imports';
2
+ export * from './add-ngrx-to-package-json';
3
+ export * from './normalize-options';
4
+ export * from './validate-options';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-imports"), exports);
5
+ tslib_1.__exportStar(require("./add-ngrx-to-package-json"), exports);
6
+ tslib_1.__exportStar(require("./normalize-options"), exports);
7
+ tslib_1.__exportStar(require("./validate-options"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-root-store/lib/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,qEAA2C;AAC3C,8DAAoC;AACpC,6DAAmC"}
@@ -0,0 +1,7 @@
1
+ import type { Tree } from '@nx/devkit';
2
+ import type { Schema } from '../schema';
3
+ export type NormalizedNgRxRootStoreGeneratorOptions = Schema & {
4
+ parent: string;
5
+ rxjsVersion: string;
6
+ };
7
+ export declare function normalizeOptions(tree: Tree, options: Schema): NormalizedNgRxRootStoreGeneratorOptions;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const semver_1 = require("@nx/devkit/src/utils/semver");
6
+ const versions_1 = require("../../../utils/versions");
7
+ const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
8
+ function normalizeOptions(tree, options) {
9
+ var _a;
10
+ let rxjsVersion;
11
+ try {
12
+ rxjsVersion = (0, semver_1.checkAndCleanWithSemver)('rxjs', (0, devkit_1.readJson)(tree, 'package.json').dependencies['rxjs']);
13
+ }
14
+ catch (_b) {
15
+ rxjsVersion = (0, semver_1.checkAndCleanWithSemver)('rxjs', versions_1.rxjsVersion);
16
+ }
17
+ const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
18
+ const isStandalone = (0, ast_utils_1.isNgStandaloneApp)(tree, options.project);
19
+ const appConfigPath = (0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.config.ts');
20
+ const appMainPath = project.targets.build.options.main;
21
+ /** If NgModule App
22
+ * -> Use App Module
23
+ * If Standalone
24
+ * -> Check Config File exists (v16+)
25
+ * --> If so, use that
26
+ * --> If not, use main.ts
27
+ */
28
+ const parent = !isStandalone
29
+ ? (0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.module.ts')
30
+ : tree.exists(appConfigPath)
31
+ ? appConfigPath
32
+ : appMainPath;
33
+ options.directory = (_a = options.directory) !== null && _a !== void 0 ? _a : '+state';
34
+ return Object.assign(Object.assign({}, options), { parent, directory: (0, devkit_1.names)(options.directory).fileName, rxjsVersion });
35
+ }
36
+ exports.normalizeOptions = normalizeOptions;
37
+ //# sourceMappingURL=normalize-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx-root-store/lib/normalize-options.ts"],"names":[],"mappings":";;;AACA,uCAKoB;AACpB,wDAAsE;AACtE,sDAA4E;AAE5E,kEAAuE;AAOvE,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAe;;IAEf,IAAI,WAAmB,CAAC;IACxB,IAAI;QACF,WAAW,GAAG,IAAA,gCAAuB,EACnC,MAAM,EACN,IAAA,iBAAQ,E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