@nstudio/angular 19.0.0 → 20.0.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.
package/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
  <p align="center"><img src="https://raw.githubusercontent.com/nstudio/xplat/master/xplat-logo.png" align="center" width="400"></p>
3
3
  <div align="center">
4
4
 
5
- [![Build Status](https://travis-ci.org/nstudio/xplat.svg?branch=master)](https://travis-ci.org/nstudio/xplat)
6
5
  [![License](https://img.shields.io/npm/l/@nstudio/schematics.svg?style=flat-square)]()
7
6
  [![NPM Version](https://badge.fury.io/js/%40nstudio%2Fschematics.svg)](https://www.npmjs.com/@nstudio/schematics)
8
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nstudio/angular",
3
- "version": "19.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "Angular Plugin for xplat",
5
5
  "homepage": "https://nstudio.io/xplat",
6
6
  "repository": {
@@ -29,9 +29,9 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nx/angular": "^19.0.0"
32
+ "@nx/angular": "^20.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@nstudio/xplat": "19.0.0"
35
+ "@nstudio/xplat": "20.0.1"
36
36
  }
37
37
  }
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.default = default_1;
12
13
  const schematics_1 = require("@angular-devkit/schematics");
13
14
  const devkit_1 = require("@nx/devkit");
14
15
  const generators_1 = require("@nx/angular/generators");
@@ -74,7 +75,6 @@ function default_1(options) {
74
75
  : (0, schematics_1.noop)(),
75
76
  ]);
76
77
  }
77
- exports.default = default_1;
78
78
  /**
79
79
  * Add headless options to e2e tests
80
80
  * @param options
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const schematics_1 = require("@angular-devkit/schematics");
4
5
  const xplat_1 = require("@nstudio/xplat");
5
6
  const xplat_utils_1 = require("@nstudio/xplat-utils");
@@ -48,4 +49,3 @@ function default_1(options) {
48
49
  (tree, context) => (0, schematics_1.chain)(externalChains),
49
50
  ]);
50
51
  }
51
- exports.default = default_1;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const angular_1 = require("@nstudio/angular");
4
5
  function default_1(options) {
5
6
  return (0, angular_1.generate)('directive', options);
6
7
  }
7
- exports.default = default_1;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const schematics_1 = require("@angular-devkit/schematics");
4
5
  const xplat_1 = require("@nstudio/xplat");
5
6
  const xplat_utils_1 = require("@nstudio/xplat-utils");
@@ -41,4 +42,3 @@ function default_1(options) {
41
42
  (tree, context) => (0, schematics_1.chain)(externalChains),
42
43
  ]);
43
44
  }
44
- exports.default = default_1;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.sandboxHomeSetup = void 0;
12
+ exports.sandboxHomeSetup = sandboxHomeSetup;
13
13
  const schematics_1 = require("@angular-devkit/schematics");
14
14
  const testing_1 = require("@nstudio/xplat/testing");
15
15
  const testing_2 = require("../../utils/testing");
@@ -347,4 +347,3 @@ function sandboxHomeSetup() {
347
347
  </StackLayout>
348
348
  `;
349
349
  }
350
- exports.sandboxHomeSetup = sandboxHomeSetup;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const xplat_1 = require("@nstudio/xplat");
4
5
  const xplat_utils_1 = require("@nstudio/xplat-utils");
5
6
  const applitools_1 = require("./applitools");
@@ -23,4 +24,3 @@ function default_1(options) {
23
24
  }
24
25
  return (0, schematics_1.chain)([(0, xplat_utils_1.prerun)(options), ...helperChain]);
25
26
  }
26
- exports.default = default_1;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const schematics_1 = require("@angular-devkit/schematics");
4
5
  const xplat_utils_1 = require("@nstudio/xplat-utils");
5
6
  function default_1(options) {
@@ -10,4 +11,3 @@ function default_1(options) {
10
11
  : (0, schematics_1.noop)(),
11
12
  ]);
12
13
  }
13
- exports.default = default_1;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const angular_1 = require("@nstudio/angular");
4
5
  function default_1(options) {
5
6
  if (options.module && !options.feature) {
@@ -20,4 +21,3 @@ function default_1(options) {
20
21
  }
21
22
  return (0, angular_1.generate)('state', options);
22
23
  }
23
- exports.default = default_1;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const angular_1 = require("@nstudio/angular");
4
5
  function default_1(options) {
5
6
  return (0, angular_1.generate)('pipe', options);
6
7
  }
7
- exports.default = default_1;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const angular_1 = require("@nstudio/angular");
4
5
  function default_1(options) {
5
6
  return (0, angular_1.generate)('service', options);
6
7
  }
7
- exports.default = default_1;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const schematics_1 = require("@angular-devkit/schematics");
4
5
  const xplat_1 = require("@nstudio/xplat");
5
6
  const xplat_utils_1 = require("@nstudio/xplat-utils");
@@ -52,4 +53,3 @@ function default_1(options) {
52
53
  // addInstallTask(),
53
54
  ]);
54
55
  }
55
- exports.default = default_1;
package/src/utils/ast.js CHANGED
@@ -1,6 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTsSourceFile = exports.getDecoratorPropertyValueNode = exports.readBootstrapInfo = exports.addEntryComponents = exports.addDeclarationToModule = exports.addProviderToComponent = exports.addProviderToModule = exports.addProviderToBootstrapApplication = exports.addRouteToNgModule = exports.getBootstrapComponent = exports.replaceIntoToTestBed = exports.addDeclarationsToTestBed = exports.addImportToTestBed = exports.addImportToModule = exports.addImportToPipe = exports.addImportToDirective = exports.addImportToComponent = exports.removeFromNgModule = exports._addSymbolToNgModuleMetadata = exports.getDecoratorMetadata = exports.isStandalone = exports.addToCollection = void 0;
3
+ exports.addToCollection = addToCollection;
4
+ exports.isStandalone = isStandalone;
5
+ exports.getDecoratorMetadata = getDecoratorMetadata;
6
+ exports._addSymbolToNgModuleMetadata = _addSymbolToNgModuleMetadata;
7
+ exports.removeFromNgModule = removeFromNgModule;
8
+ exports.addImportToComponent = addImportToComponent;
9
+ exports.addImportToDirective = addImportToDirective;
10
+ exports.addImportToPipe = addImportToPipe;
11
+ exports.addImportToModule = addImportToModule;
12
+ exports.addImportToTestBed = addImportToTestBed;
13
+ exports.addDeclarationsToTestBed = addDeclarationsToTestBed;
14
+ exports.replaceIntoToTestBed = replaceIntoToTestBed;
15
+ exports.getBootstrapComponent = getBootstrapComponent;
16
+ exports.addRouteToNgModule = addRouteToNgModule;
17
+ exports.addProviderToBootstrapApplication = addProviderToBootstrapApplication;
18
+ exports.addProviderToModule = addProviderToModule;
19
+ exports.addProviderToComponent = addProviderToComponent;
20
+ exports.addDeclarationToModule = addDeclarationToModule;
21
+ exports.addEntryComponents = addEntryComponents;
22
+ exports.readBootstrapInfo = readBootstrapInfo;
23
+ exports.getDecoratorPropertyValueNode = getDecoratorPropertyValueNode;
24
+ exports.getTsSourceFile = getTsSourceFile;
4
25
  const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
5
26
  const js_1 = require("@nx/js");
6
27
  const ts = require("typescript");
@@ -22,7 +43,6 @@ function addToCollection(tree, source, barrelIndexPath, symbolName, insertSpaces
22
43
  return (0, js_2.insertChange)(tree, source, barrelIndexPath, collection.end, `,\n${insertSpaces}${symbolName}`);
23
44
  }
24
45
  }
25
- exports.addToCollection = addToCollection;
26
46
  function getCollection(source) {
27
47
  const allCollections = (0, js_1.findNodes)(source, ts.SyntaxKind.ArrayLiteralExpression);
28
48
  // console.log('allCollections:', allCollections);
@@ -92,7 +112,6 @@ function isStandalone(sourceFile, decoratorName) {
92
112
  const decoratorMetadata = getDecoratorMetadata(sourceFile, decoratorName, '@angular/core');
93
113
  return decoratorMetadata.some((node) => node.getText().includes('standalone: true'));
94
114
  }
95
- exports.isStandalone = isStandalone;
96
115
  function getDecoratorMetadata(source, identifier, module) {
97
116
  if (!tsModule) {
98
117
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -135,7 +154,6 @@ function getDecoratorMetadata(source, identifier, module) {
135
154
  expr.arguments[0].kind == tsModule.SyntaxKind.ObjectLiteralExpression)
136
155
  .map((expr) => expr.arguments[0]);
137
156
  }
138
- exports.getDecoratorMetadata = getDecoratorMetadata;
139
157
  function _addSymbolToDecoratorMetadata(host, source, filePath, metadataField, expression, decoratorName) {
140
158
  const nodes = getDecoratorMetadata(source, decoratorName, '@angular/core');
141
159
  let node = nodes[0]; // tslint:disable-line:no-any
@@ -258,7 +276,6 @@ function _addSymbolToDecoratorMetadata(host, source, filePath, metadataField, ex
258
276
  function _addSymbolToNgModuleMetadata(host, source, ngModulePath, metadataField, expression) {
259
277
  return _addSymbolToDecoratorMetadata(host, source, ngModulePath, metadataField, expression, 'NgModule');
260
278
  }
261
- exports._addSymbolToNgModuleMetadata = _addSymbolToNgModuleMetadata;
262
279
  function removeFromNgModule(host, source, modulePath, property) {
263
280
  const nodes = getDecoratorMetadata(source, 'NgModule', '@angular/core');
264
281
  let node = nodes[0]; // tslint:disable-line:no-any
@@ -272,7 +289,6 @@ function removeFromNgModule(host, source, modulePath, property) {
272
289
  return (0, js_2.removeChange)(host, source, modulePath, matchingProperty.getStart(source), matchingProperty.getFullText(source));
273
290
  }
274
291
  }
275
- exports.removeFromNgModule = removeFromNgModule;
276
292
  /**
277
293
  * Add an import to a Standalone Component
278
294
  * @param host Virtual Tree
@@ -283,7 +299,6 @@ exports.removeFromNgModule = removeFromNgModule;
283
299
  function addImportToComponent(host, source, componentPath, symbolName) {
284
300
  return _addSymbolToDecoratorMetadata(host, source, componentPath, 'imports', symbolName, 'Component');
285
301
  }
286
- exports.addImportToComponent = addImportToComponent;
287
302
  /**
288
303
  * Add an import to a Standalone Directive
289
304
  * @param host Virtual Tree
@@ -294,7 +309,6 @@ exports.addImportToComponent = addImportToComponent;
294
309
  function addImportToDirective(host, source, directivePath, symbolName) {
295
310
  return _addSymbolToDecoratorMetadata(host, source, directivePath, 'imports', symbolName, 'Directive');
296
311
  }
297
- exports.addImportToDirective = addImportToDirective;
298
312
  /**
299
313
  * Add an import to a Standalone Pipe
300
314
  * @param host Virtual Tree
@@ -305,7 +319,6 @@ exports.addImportToDirective = addImportToDirective;
305
319
  function addImportToPipe(host, source, pipePath, symbolName) {
306
320
  return _addSymbolToDecoratorMetadata(host, source, pipePath, 'imports', symbolName, 'Pipe');
307
321
  }
308
- exports.addImportToPipe = addImportToPipe;
309
322
  /**
310
323
  * Add an import to an NgModule
311
324
  * @param host Virtual Tree
@@ -316,7 +329,6 @@ exports.addImportToPipe = addImportToPipe;
316
329
  function addImportToModule(host, source, modulePath, symbolName) {
317
330
  return _addSymbolToNgModuleMetadata(host, source, modulePath, 'imports', symbolName);
318
331
  }
319
- exports.addImportToModule = addImportToModule;
320
332
  function addImportToTestBed(host, source, specPath, symbolName) {
321
333
  if (!tsModule) {
322
334
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -336,7 +348,6 @@ function addImportToTestBed(host, source, specPath, symbolName) {
336
348
  }
337
349
  return source;
338
350
  }
339
- exports.addImportToTestBed = addImportToTestBed;
340
351
  function addDeclarationsToTestBed(host, source, specPath, symbolName) {
341
352
  if (!tsModule) {
342
353
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -356,7 +367,6 @@ function addDeclarationsToTestBed(host, source, specPath, symbolName) {
356
367
  }
357
368
  return source;
358
369
  }
359
- exports.addDeclarationsToTestBed = addDeclarationsToTestBed;
360
370
  function replaceIntoToTestBed(host, source, specPath, newSymbol, previousSymbol) {
361
371
  if (!tsModule) {
362
372
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -376,7 +386,6 @@ function replaceIntoToTestBed(host, source, specPath, newSymbol, previousSymbol)
376
386
  }
377
387
  return source;
378
388
  }
379
- exports.replaceIntoToTestBed = replaceIntoToTestBed;
380
389
  function getBootstrapComponent(source, moduleClassName) {
381
390
  const bootstrap = getMatchingProperty(source, 'bootstrap', 'NgModule', '@angular/core');
382
391
  if (!bootstrap) {
@@ -390,7 +399,6 @@ function getBootstrapComponent(source, moduleClassName) {
390
399
  }
391
400
  return bootstrapComponent.getText();
392
401
  }
393
- exports.getBootstrapComponent = getBootstrapComponent;
394
402
  function getMatchingProperty(source, property, identifier, module) {
395
403
  const nodes = getDecoratorMetadata(source, identifier, module);
396
404
  let node = nodes[0]; // tslint:disable-line:no-any
@@ -410,7 +418,6 @@ function addRouteToNgModule(host, ngModulePath, source, route) {
410
418
  return (0, js_2.insertChange)(host, source, ngModulePath, routes.end, `, ${route}`);
411
419
  }
412
420
  }
413
- exports.addRouteToNgModule = addRouteToNgModule;
414
421
  function getListOfRoutes(source) {
415
422
  if (!tsModule) {
416
423
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -467,7 +474,6 @@ function addProviderToBootstrapApplication(tree, filePath, providerToAdd) {
467
474
  const newFileContents = `${fileContents.slice(0, arrayNode.getStart() + 1)}${providerToAdd},${fileContents.slice(arrayNode.getStart() + 1, fileContents.length)}`;
468
475
  tree.write(filePath, newFileContents);
469
476
  }
470
- exports.addProviderToBootstrapApplication = addProviderToBootstrapApplication;
471
477
  /**
472
478
  * Add a provider to an NgModule
473
479
  * @param host Virtual Tree
@@ -478,7 +484,6 @@ exports.addProviderToBootstrapApplication = addProviderToBootstrapApplication;
478
484
  function addProviderToModule(host, source, modulePath, symbolName) {
479
485
  return _addSymbolToNgModuleMetadata(host, source, modulePath, 'providers', symbolName);
480
486
  }
481
- exports.addProviderToModule = addProviderToModule;
482
487
  /**
483
488
  * Add a provider to a Standalone Component
484
489
  * @param host Virtual Tree
@@ -489,15 +494,12 @@ exports.addProviderToModule = addProviderToModule;
489
494
  function addProviderToComponent(host, source, componentPath, symbolName) {
490
495
  return _addSymbolToDecoratorMetadata(host, source, componentPath, 'providers', symbolName, 'Component');
491
496
  }
492
- exports.addProviderToComponent = addProviderToComponent;
493
497
  function addDeclarationToModule(host, source, modulePath, symbolName) {
494
498
  return _addSymbolToNgModuleMetadata(host, source, modulePath, 'declarations', symbolName);
495
499
  }
496
- exports.addDeclarationToModule = addDeclarationToModule;
497
500
  function addEntryComponents(host, source, modulePath, symbolName) {
498
501
  return _addSymbolToNgModuleMetadata(host, source, modulePath, 'entryComponents', symbolName);
499
502
  }
500
- exports.addEntryComponents = addEntryComponents;
501
503
  function readBootstrapInfo(host, app) {
502
504
  if (!tsModule) {
503
505
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -539,7 +541,6 @@ function readBootstrapInfo(host, app) {
539
541
  bootstrapComponentFileName,
540
542
  };
541
543
  }
542
- exports.readBootstrapInfo = readBootstrapInfo;
543
544
  function getDecoratorPropertyValueNode(host, modulePath, identifier, property, module) {
544
545
  if (!tsModule) {
545
546
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -549,7 +550,6 @@ function getDecoratorPropertyValueNode(host, modulePath, identifier, property, m
549
550
  const templateNode = getMatchingProperty(moduleSource, property, identifier, module);
550
551
  return templateNode.getChildAt(templateNode.getChildCount() - 1);
551
552
  }
552
- exports.getDecoratorPropertyValueNode = getDecoratorPropertyValueNode;
553
553
  function getMatchingObjectLiteralElement(node, source, property) {
554
554
  if (!tsModule) {
555
555
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
@@ -581,4 +581,3 @@ function getTsSourceFile(host, path) {
581
581
  const source = tsModule.createSourceFile(path, content, tsModule.ScriptTarget.Latest, true);
582
582
  return source;
583
583
  }
584
- exports.getTsSourceFile = getTsSourceFile;
@@ -15,7 +15,7 @@ export declare function generate(type: IGenerateType, options: any): Rule;
15
15
  export declare function getFeatureName(options: IGenerateOptions): string;
16
16
  export declare function getNxFeaturePath(tree: Tree, featureName: string): any;
17
17
  export declare function addToFeature(xplatFolderName: string, type: IGenerateType, options: IGenerateOptions, prefixPath: string, tree: Tree, extra?: string, forSubFolder?: boolean): Rule;
18
- export declare function isFeatureInGeneralBarrel(featureName: string): boolean;
18
+ export declare function isFeatureInGeneralBarrel(featureName: string): featureName is "shared" | "ui";
19
19
  export declare function shouldTargetCoreBarrel(type: IGenerateType, featureName: string): boolean;
20
20
  export declare function adjustBarrel(type: IGenerateType, options: IGenerateOptions, prefix: string): Rule;
21
21
  export declare function adjustBarrelIndex(type: IGenerateType, options: IGenerateOptions, indexFilePath: string, inSubFolder?: boolean, isBase?: boolean, importIfSubFolder?: boolean): Rule;
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adjustSandbox = exports.adjustRouting = exports.adjustFeatureModuleForState = exports.adjustFeatureModule = exports.adjustModule = exports.adjustBarrelIndexForType = exports.adjustBarrelIndex = exports.adjustBarrel = exports.shouldTargetCoreBarrel = exports.isFeatureInGeneralBarrel = exports.addToFeature = exports.getNxFeaturePath = exports.getFeatureName = exports.generate = void 0;
3
+ exports.generate = generate;
4
+ exports.getFeatureName = getFeatureName;
5
+ exports.getNxFeaturePath = getNxFeaturePath;
6
+ exports.addToFeature = addToFeature;
7
+ exports.isFeatureInGeneralBarrel = isFeatureInGeneralBarrel;
8
+ exports.shouldTargetCoreBarrel = shouldTargetCoreBarrel;
9
+ exports.adjustBarrel = adjustBarrel;
10
+ exports.adjustBarrelIndex = adjustBarrelIndex;
11
+ exports.adjustBarrelIndexForType = adjustBarrelIndexForType;
12
+ exports.adjustModule = adjustModule;
13
+ exports.adjustFeatureModule = adjustFeatureModule;
14
+ exports.adjustFeatureModuleForState = adjustFeatureModuleForState;
15
+ exports.adjustRouting = adjustRouting;
16
+ exports.adjustSandbox = adjustSandbox;
4
17
  const schematics_1 = require("@angular-devkit/schematics");
5
18
  const xplat_1 = require("@nstudio/xplat");
6
19
  const xplat_utils_1 = require("@nstudio/xplat-utils");
@@ -165,7 +178,6 @@ function generate(type, options) {
165
178
  : (0, schematics_1.noop)()(tree, context),
166
179
  ]);
167
180
  }
168
- exports.generate = generate;
169
181
  function getFeatureName(options) {
170
182
  let featureName;
171
183
  const isNxLib = xplat_1.XplatHelpers.isFeatureNxLib(options.feature);
@@ -194,7 +206,6 @@ function getFeatureName(options) {
194
206
  }
195
207
  return featureName;
196
208
  }
197
- exports.getFeatureName = getFeatureName;
198
209
  function getNxFeaturePath(tree, featureName) {
199
210
  const tsConfig = (0, xplat_utils_1.getJsonFromFile)(tree, 'tsconfig.base.json');
200
211
  if (tsConfig) {
@@ -213,7 +224,6 @@ function getNxFeaturePath(tree, featureName) {
213
224
  }
214
225
  return null;
215
226
  }
216
- exports.getNxFeaturePath = getNxFeaturePath;
217
227
  function addToFeature(xplatFolderName, type, options, prefixPath, tree, extra = '', forSubFolder) {
218
228
  let featureName = getFeatureName(options);
219
229
  const isNxLib = xplat_1.XplatHelpers.isFeatureNxLib(featureName);
@@ -285,13 +295,11 @@ function addToFeature(xplatFolderName, type, options, prefixPath, tree, extra =
285
295
  ])));
286
296
  }
287
297
  }
288
- exports.addToFeature = addToFeature;
289
298
  function isFeatureInGeneralBarrel(featureName) {
290
299
  // 'shared' barrel is for app specific shared components, pipes, directives (not service level features)
291
300
  // 'ui' barrel is for entire workspace ui related sharing of components, pipes, directives (not service level features)
292
301
  return featureName === 'shared' || featureName === 'ui';
293
302
  }
294
- exports.isFeatureInGeneralBarrel = isFeatureInGeneralBarrel;
295
303
  function shouldTargetCoreBarrel(type, featureName) {
296
304
  // when service or state is being generated with no options, it falls back to shared/ui
297
305
  // services and state should never be generated in shared or ui features
@@ -299,7 +307,6 @@ function shouldTargetCoreBarrel(type, featureName) {
299
307
  return ((type === 'service' || type === 'state') &&
300
308
  isFeatureInGeneralBarrel(featureName));
301
309
  }
302
- exports.shouldTargetCoreBarrel = shouldTargetCoreBarrel;
303
310
  function adjustBarrel(type, options, prefix) {
304
311
  let featureName = getFeatureName(options);
305
312
  const srcSubFolderPath = options.projects ? '' : '/src/lib';
@@ -327,7 +334,6 @@ function adjustBarrel(type, options, prefix) {
327
334
  return adjustBarrelIndex(type, options, barrelIndexPath);
328
335
  }
329
336
  }
330
- exports.adjustBarrel = adjustBarrel;
331
337
  function adjustBarrelIndex(type, options, indexFilePath, inSubFolder, isBase, importIfSubFolder) {
332
338
  return (host, context) => {
333
339
  const devKitTree = (0, xplat_1.convertNgTreeToDevKit)(host, context);
@@ -376,7 +382,6 @@ function adjustBarrelIndex(type, options, indexFilePath, inSubFolder, isBase, im
376
382
  return devKitTree.tree;
377
383
  };
378
384
  }
379
- exports.adjustBarrelIndex = adjustBarrelIndex;
380
385
  function adjustBarrelIndexForType(type, options, indexFilePath) {
381
386
  return (host, context) => {
382
387
  const devKitTree = (0, xplat_1.convertNgTreeToDevKit)(host, context);
@@ -393,7 +398,6 @@ function adjustBarrelIndexForType(type, options, indexFilePath) {
393
398
  return devKitTree.tree;
394
399
  };
395
400
  }
396
- exports.adjustBarrelIndexForType = adjustBarrelIndexForType;
397
401
  function adjustModule(tree, type, options, prefixPath) {
398
402
  let featureName = getFeatureName(options);
399
403
  const isNxLib = xplat_1.XplatHelpers.isFeatureNxLib(featureName);
@@ -417,7 +421,6 @@ function adjustModule(tree, type, options, prefixPath) {
417
421
  return adjustFeatureModule(type, options, featureModulePath);
418
422
  }
419
423
  }
420
- exports.adjustModule = adjustModule;
421
424
  function adjustFeatureModule(type, options, modulePath) {
422
425
  return (host, context) => {
423
426
  const devKitTree = (0, xplat_1.convertNgTreeToDevKit)(host, context);
@@ -478,7 +481,6 @@ function adjustFeatureModule(type, options, modulePath) {
478
481
  return devKitTree.tree;
479
482
  };
480
483
  }
481
- exports.adjustFeatureModule = adjustFeatureModule;
482
484
  function adjustFeatureModuleForState(options, modulePath) {
483
485
  return (host, context) => {
484
486
  const devKitTree = (0, xplat_1.convertNgTreeToDevKit)(host, context);
@@ -530,7 +532,6 @@ function adjustFeatureModuleForState(options, modulePath) {
530
532
  return devKitTree.tree;
531
533
  };
532
534
  }
533
- exports.adjustFeatureModuleForState = adjustFeatureModuleForState;
534
535
  function adjustRouting(options, routingModulePaths, platform) {
535
536
  return (host, context) => {
536
537
  const devKitTree = (0, xplat_1.convertNgTreeToDevKit)(host, context);
@@ -560,7 +561,6 @@ function adjustRouting(options, routingModulePaths, platform) {
560
561
  return devKitTree.tree;
561
562
  };
562
563
  }
563
- exports.adjustRouting = adjustRouting;
564
564
  function adjustSandbox(options, platform, appDirectory) {
565
565
  return (tree) => {
566
566
  if (xplat_1.supportedSandboxPlatforms.includes(platform)) {
@@ -615,4 +615,3 @@ function adjustSandbox(options, platform, appDirectory) {
615
615
  return tree;
616
616
  };
617
617
  }
618
- exports.adjustSandbox = adjustSandbox;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLibConfig = exports.getAppConfig = exports.callRule = exports.runSchematic = void 0;
3
+ exports.runSchematic = runSchematic;
4
+ exports.callRule = callRule;
5
+ exports.getAppConfig = getAppConfig;
6
+ exports.getLibConfig = getLibConfig;
4
7
  const path_1 = require("path");
5
8
  const testing_1 = require("@angular-devkit/schematics/testing");
6
9
  // import { createApp, createLib } from '@nx/angular/testing';
@@ -9,7 +12,6 @@ const testRunner = new testing_1.SchematicTestRunner('@nstudio/angular', (0, pat
9
12
  function runSchematic(schematicName, options, tree) {
10
13
  return testRunner.runSchematic(schematicName, options, tree);
11
14
  }
12
- exports.runSchematic = runSchematic;
13
15
  // export function runSchematicSync(
14
16
  // schematicName: string,
15
17
  // options: any,
@@ -20,17 +22,14 @@ exports.runSchematic = runSchematic;
20
22
  function callRule(rule, tree) {
21
23
  return testRunner.callRule(rule, tree).toPromise();
22
24
  }
23
- exports.callRule = callRule;
24
25
  var appConfig; // configure built in createApp()
25
26
  var libConfig;
26
27
  function getAppConfig() {
27
28
  return appConfig;
28
29
  }
29
- exports.getAppConfig = getAppConfig;
30
30
  function getLibConfig() {
31
31
  return libConfig;
32
32
  }
33
- exports.getLibConfig = getLibConfig;
34
33
  // export function createApp(
35
34
  // tree: Tree,
36
35
  // appName: string,
@@ -1,9 +1,9 @@
1
1
  export declare const xplatVersion = "*";
2
- export declare const nxVersion = "^19.0.0";
2
+ export declare const nxVersion = "^20.0.0";
3
3
  export declare const angularVersion = "^18.0.0";
4
4
  export declare const angularDevkitVersion = "^18.0.0";
5
5
  export declare const ngxTranslateVersion = "~15.0.0";
6
6
  export declare const ngxTranslateHttpVersion = "~8.0.0";
7
7
  export declare const rxjsVersion = "^7.8.0";
8
- export declare const zonejsVersion = "~0.14.0";
9
- export declare const typesJest = "29.5.6";
8
+ export declare const zonejsVersion = "~0.15.0";
9
+ export declare const typesJest = "^29.5.6";
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typesJest = exports.zonejsVersion = exports.rxjsVersion = exports.ngxTranslateHttpVersion = exports.ngxTranslateVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = exports.xplatVersion = void 0;
4
- exports.xplatVersion = '19.0.0';
5
- exports.nxVersion = '^19.0.0';
4
+ exports.xplatVersion = '20.0.1';
5
+ exports.nxVersion = '^20.0.0';
6
6
  exports.angularVersion = '^18.0.0';
7
7
  exports.angularDevkitVersion = '^18.0.0';
8
8
  exports.ngxTranslateVersion = '~15.0.0';
9
9
  exports.ngxTranslateHttpVersion = '~8.0.0';
10
10
  exports.rxjsVersion = '^7.8.0';
11
- exports.zonejsVersion = '~0.14.0';
12
- exports.typesJest = '29.5.6';
11
+ exports.zonejsVersion = '~0.15.0';
12
+ exports.typesJest = '^29.5.6';