@rxap/schematics-ts-morph 13.0.0-next.2 → 13.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/package.json +7 -3
  4. package/src/index.js +54 -57
  5. package/src/index.js.map +1 -1
  6. package/src/lib/add-component-animations.js +5 -9
  7. package/src/lib/add-component-animations.js.map +1 -1
  8. package/src/lib/add-component-fake-provider.js +5 -9
  9. package/src/lib/add-component-fake-provider.js.map +1 -1
  10. package/src/lib/add-component-input.js +7 -11
  11. package/src/lib/add-component-input.js.map +1 -1
  12. package/src/lib/add-component-provider.js +7 -11
  13. package/src/lib/add-component-provider.js.map +1 -1
  14. package/src/lib/add-control-validator.js +5 -10
  15. package/src/lib/add-control-validator.js.map +1 -1
  16. package/src/lib/add-dependency-injection.js +8 -12
  17. package/src/lib/add-dependency-injection.js.map +1 -1
  18. package/src/lib/add-dir.js +4 -8
  19. package/src/lib/add-dir.js.map +1 -1
  20. package/src/lib/add-fake-provider.js +12 -16
  21. package/src/lib/add-fake-provider.js.map +1 -1
  22. package/src/lib/add-method-class.js +7 -11
  23. package/src/lib/add-method-class.js.map +1 -1
  24. package/src/lib/add-ng-module-import.js +5 -9
  25. package/src/lib/add-ng-module-import.js.map +1 -1
  26. package/src/lib/add-ng-module-provider.js +7 -11
  27. package/src/lib/add-ng-module-provider.js.map +1 -1
  28. package/src/lib/add-provider-to-array.js +6 -10
  29. package/src/lib/add-provider-to-array.js.map +1 -1
  30. package/src/lib/add-to-array.js +5 -9
  31. package/src/lib/add-to-array.js.map +1 -1
  32. package/src/lib/add-variable-fake-provider.js +5 -9
  33. package/src/lib/add-variable-fake-provider.js.map +1 -1
  34. package/src/lib/add-variable-provider.js +7 -11
  35. package/src/lib/add-variable-provider.js.map +1 -1
  36. package/src/lib/apply-ts-morph-project.js +3 -7
  37. package/src/lib/apply-ts-morph-project.js.map +1 -1
  38. package/src/lib/auto-import.js +7 -11
  39. package/src/lib/auto-import.js.map +1 -1
  40. package/src/lib/coerce-class-constructor.js +1 -5
  41. package/src/lib/coerce-class-constructor.js.map +1 -1
  42. package/src/lib/coerce-class-method.js +1 -5
  43. package/src/lib/coerce-class-method.js.map +1 -1
  44. package/src/lib/coerce-class.js +1 -5
  45. package/src/lib/coerce-class.js.map +1 -1
  46. package/src/lib/coerce-method-class.js +5 -9
  47. package/src/lib/coerce-method-class.js.map +1 -1
  48. package/src/lib/coerce-property-key.js +1 -5
  49. package/src/lib/coerce-property-key.js.map +1 -1
  50. package/src/lib/coerce-source-file.js +1 -5
  51. package/src/lib/coerce-source-file.js.map +1 -1
  52. package/src/lib/coerce-variable-declaration.js +3 -7
  53. package/src/lib/coerce-variable-declaration.js.map +1 -1
  54. package/src/lib/find-component-module-source-file.js +3 -7
  55. package/src/lib/find-component-module-source-file.js.map +1 -1
  56. package/src/lib/find-component-source-file.js +3 -7
  57. package/src/lib/find-component-source-file.js.map +1 -1
  58. package/src/lib/find-routing-module.js +3 -7
  59. package/src/lib/find-routing-module.js.map +1 -1
  60. package/src/lib/fix-missing-imports.js +7 -11
  61. package/src/lib/fix-missing-imports.js.map +1 -1
  62. package/src/lib/get-array-declaration.js +5 -9
  63. package/src/lib/get-array-declaration.js.map +1 -1
  64. package/src/lib/get-class-decorator-arguments.js +1 -5
  65. package/src/lib/get-class-decorator-arguments.js.map +1 -1
  66. package/src/lib/get-coerce-array-literal-form-object-literal.js +4 -8
  67. package/src/lib/get-coerce-array-literal-form-object-literal.js.map +1 -1
  68. package/src/lib/get-component-class.js +1 -5
  69. package/src/lib/get-component-class.js.map +1 -1
  70. package/src/lib/get-component-options-object.js +4 -8
  71. package/src/lib/get-component-options-object.js.map +1 -1
  72. package/src/lib/get-form-providers-source-file.js +4 -9
  73. package/src/lib/get-form-providers-source-file.js.map +1 -1
  74. package/src/lib/get-ng-module-options-object.js +4 -8
  75. package/src/lib/get-ng-module-options-object.js.map +1 -1
  76. package/src/lib/get-variable-declaration.js +1 -5
  77. package/src/lib/get-variable-declaration.js.map +1 -1
  78. package/src/lib/handle-component-module.js +1 -2
  79. package/src/lib/handle-component.js +1 -2
  80. package/src/lib/is-array-literal-expression.js +4 -9
  81. package/src/lib/is-array-literal-expression.js.map +1 -1
  82. package/src/lib/merge-ts-morph-project.js +3 -7
  83. package/src/lib/merge-ts-morph-project.js.map +1 -1
  84. package/src/lib/nestjs/add-nest-controller.js +12 -16
  85. package/src/lib/nestjs/add-nest-controller.js.map +1 -1
  86. package/src/lib/nestjs/add-nest-module-controller.js +7 -11
  87. package/src/lib/nestjs/add-nest-module-controller.js.map +1 -1
  88. package/src/lib/nestjs/add-nest-module-import.js +5 -9
  89. package/src/lib/nestjs/add-nest-module-import.js.map +1 -1
  90. package/src/lib/nestjs/add-nest-module-provider.js +7 -11
  91. package/src/lib/nestjs/add-nest-module-provider.js.map +1 -1
  92. package/src/lib/nestjs/add-nest-provider-to-array.js +6 -10
  93. package/src/lib/nestjs/add-nest-provider-to-array.js.map +1 -1
  94. package/src/lib/nestjs/find-nest-module-declaration.js +5 -9
  95. package/src/lib/nestjs/find-nest-module-declaration.js.map +1 -1
  96. package/src/lib/nestjs/find-nest-module-source-file.js +3 -7
  97. package/src/lib/nestjs/find-nest-module-source-file.js.map +1 -1
  98. package/src/lib/nestjs/get-nest-module-metadata.js +7 -11
  99. package/src/lib/nestjs/get-nest-module-metadata.js.map +1 -1
  100. package/src/lib/nestjs/has-nest-module-class.js +3 -7
  101. package/src/lib/nestjs/has-nest-module-class.js.map +1 -1
  102. package/src/lib/nestjs/is-nest-module-class.js +1 -5
  103. package/src/lib/nestjs/is-nest-module-class.js.map +1 -1
  104. package/src/lib/nestjs/nest-provider-object.js +1 -2
  105. package/src/lib/organize-imports.js +5 -9
  106. package/src/lib/organize-imports.js.map +1 -1
  107. package/src/lib/overwrite-decorator.js +1 -5
  108. package/src/lib/overwrite-decorator.js.map +1 -1
  109. package/src/lib/overwrite-property.js +1 -5
  110. package/src/lib/overwrite-property.js.map +1 -1
  111. package/src/lib/provider-object.js +1 -2
  112. package/src/lib/to-value-context.js +1 -2
@@ -1,15 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetArrayDeclaration = void 0;
4
- const coerce_variable_declaration_1 = require("./coerce-variable-declaration");
5
- const is_array_literal_expression_1 = require("./is-array-literal-expression");
6
- function GetArrayDeclaration(sourceFile, arrayName, type = 'any[]') {
7
- const arrayDeclaration = coerce_variable_declaration_1.CoerceVariableDeclaration(sourceFile, arrayName, {
1
+ import { CoerceVariableDeclaration } from './coerce-variable-declaration';
2
+ import { AssertArrayLiteralExpression } from './is-array-literal-expression';
3
+ export function GetArrayDeclaration(sourceFile, arrayName, type = 'any[]') {
4
+ const arrayDeclaration = CoerceVariableDeclaration(sourceFile, arrayName, {
8
5
  initializer: '[]',
9
6
  type
10
7
  });
11
- is_array_literal_expression_1.AssertArrayLiteralExpression(arrayDeclaration.getInitializer(), arrayName);
8
+ AssertArrayLiteralExpression(arrayDeclaration.getInitializer(), arrayName);
12
9
  return arrayDeclaration;
13
10
  }
14
- exports.GetArrayDeclaration = GetArrayDeclaration;
15
11
  //# sourceMappingURL=get-array-declaration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-array-declaration.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-array-declaration.ts"],"names":[],"mappings":";;;AAIA,+EAA0E;AAC1E,+EAA6E;AAE7E,SAAgB,mBAAmB,CACjC,UAAsB,EACtB,SAAiB,EACjB,OAAe,OAAO;IAGtB,MAAM,gBAAgB,GAAG,uDAAyB,CAChD,UAAU,EACV,SAAS,EACT;QACE,WAAW,EAAE,IAAI;QACjB,IAAI;KACL,CACF,CAAC;IAEF,0DAA4B,CAAC,gBAAgB,CAAC,cAAc,EAAE,EAAE,SAAS,CAAC,CAAC;IAE3E,OAAO,gBAAgB,CAAC;AAE1B,CAAC;AAnBD,kDAmBC"}
1
+ {"version":3,"file":"get-array-declaration.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-array-declaration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,MAAM,UAAU,mBAAmB,CACjC,UAAsB,EACtB,SAAiB,EACjB,OAAe,OAAO;IAGtB,MAAM,gBAAgB,GAAG,yBAAyB,CAChD,UAAU,EACV,SAAS,EACT;QACE,WAAW,EAAE,IAAI;QACjB,IAAI;KACL,CACF,CAAC;IAEF,4BAA4B,CAAC,gBAAgB,CAAC,cAAc,EAAE,EAAE,SAAS,CAAC,CAAC;IAE3E,OAAO,gBAAgB,CAAC;AAE1B,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetClassDecoratorArguments = void 0;
4
- function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
1
+ export function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
5
2
  var _a;
6
3
  let decorator;
7
4
  if (typeof nameOrFindFunction === 'string') {
@@ -12,5 +9,4 @@ function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
12
9
  }
13
10
  return (_a = decorator === null || decorator === void 0 ? void 0 : decorator.getArguments()) !== null && _a !== void 0 ? _a : [];
14
11
  }
15
- exports.GetClassDecoratorArguments = GetClassDecoratorArguments;
16
12
  //# sourceMappingURL=get-class-decorator-arguments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-class-decorator-arguments.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-class-decorator-arguments.ts"],"names":[],"mappings":";;;AAUA,SAAgB,0BAA0B,CACxC,gBAAkC,EAClC,kBAAkE;;IAGlE,IAAI,SAAgC,CAAC;IAErC,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAC1C,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;KAC/D;SAAM;QACL,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;KAC/D;IAED,OAAO,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,EAAE,mCAAI,EAAE,CAAC;AAEzC,CAAC;AAfD,gEAeC"}
1
+ {"version":3,"file":"get-class-decorator-arguments.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-class-decorator-arguments.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,0BAA0B,CACxC,gBAAkC,EAClC,kBAAkE;;IAGlE,IAAI,SAAgC,CAAC;IAErC,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAC1C,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;KAC/D;SAAM;QACL,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;KAC/D;IAED,OAAO,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,EAAE,mCAAI,EAAE,CAAC;AAEzC,CAAC"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCoerceArrayLiteralFromObjectLiteral = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- function GetCoerceArrayLiteralFromObjectLiteral(objectLiteral, propertyKey) {
1
+ import { PropertyAssignment, ArrayLiteralExpression } from 'ts-morph';
2
+ export function GetCoerceArrayLiteralFromObjectLiteral(objectLiteral, propertyKey) {
6
3
  let arrayLiteralAssignment = objectLiteral.getProperty(propertyKey);
7
4
  if (!arrayLiteralAssignment) {
8
5
  arrayLiteralAssignment = objectLiteral.addPropertyAssignment({
@@ -10,17 +7,16 @@ function GetCoerceArrayLiteralFromObjectLiteral(objectLiteral, propertyKey) {
10
7
  initializer: '[]'
11
8
  });
12
9
  }
13
- if (!(arrayLiteralAssignment instanceof ts_morph_1.PropertyAssignment)) {
10
+ if (!(arrayLiteralAssignment instanceof PropertyAssignment)) {
14
11
  throw new Error('The imports property is not type of Property Assignment!');
15
12
  }
16
13
  const arrayLiteral = arrayLiteralAssignment.getInitializer();
17
14
  if (!arrayLiteral) {
18
15
  throw new Error('The imports property a not a initializer');
19
16
  }
20
- if (!(arrayLiteral instanceof ts_morph_1.ArrayLiteralExpression)) {
17
+ if (!(arrayLiteral instanceof ArrayLiteralExpression)) {
21
18
  throw new Error('The imports property initializer is not an array');
22
19
  }
23
20
  return arrayLiteral;
24
21
  }
25
- exports.GetCoerceArrayLiteralFromObjectLiteral = GetCoerceArrayLiteralFromObjectLiteral;
26
22
  //# sourceMappingURL=get-coerce-array-literal-form-object-literal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-coerce-array-literal-form-object-literal.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-coerce-array-literal-form-object-literal.ts"],"names":[],"mappings":";;;AAAA,uCAIkB;AAElB,SAAgB,sCAAsC,CAAC,aAAsC,EAAE,WAAmB;IAEhH,IAAI,sBAAsB,GAAG,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAEpE,IAAI,CAAC,sBAAsB,EAAE;QAC3B,sBAAsB,GAAG,aAAa,CAAC,qBAAqB,CAAC;YAC3D,IAAI,EAAS,WAAW;YACxB,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;KACJ;IAED,IAAI,CAAC,CAAC,sBAAsB,YAAY,6BAAkB,CAAC,EAAE;QAC3D,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;IAED,MAAM,YAAY,GAAG,sBAAsB,CAAC,cAAc,EAAE,CAAC;IAE7D,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAC7D;IAED,IAAI,CAAC,CAAC,YAAY,YAAY,iCAAsB,CAAC,EAAE;QACrD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;KACrE;IAED,OAAO,YAAY,CAAC;AAEtB,CAAC;AA3BD,wFA2BC"}
1
+ {"version":3,"file":"get-coerce-array-literal-form-object-literal.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-coerce-array-literal-form-object-literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,MAAM,UAAU,sCAAsC,CAAC,aAAsC,EAAE,WAAmB;IAEhH,IAAI,sBAAsB,GAAG,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAEpE,IAAI,CAAC,sBAAsB,EAAE;QAC3B,sBAAsB,GAAG,aAAa,CAAC,qBAAqB,CAAC;YAC3D,IAAI,EAAS,WAAW;YACxB,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;KACJ;IAED,IAAI,CAAC,CAAC,sBAAsB,YAAY,kBAAkB,CAAC,EAAE;QAC3D,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;IAED,MAAM,YAAY,GAAG,sBAAsB,CAAC,cAAc,EAAE,CAAC;IAE7D,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAC7D;IAED,IAAI,CAAC,CAAC,YAAY,YAAY,sBAAsB,CAAC,EAAE;QACrD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;KACrE;IAED,OAAO,YAAY,CAAC;AAEtB,CAAC"}
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetComponentClass = void 0;
4
- function GetComponentClass(sourceFile) {
1
+ export function GetComponentClass(sourceFile) {
5
2
  const classWithComponent = sourceFile.getClasses().find(cls => cls.getDecorator('Component'));
6
3
  if (!classWithComponent) {
7
4
  throw new Error('Could not find class with Component decorator!');
8
5
  }
9
6
  return classWithComponent;
10
7
  }
11
- exports.GetComponentClass = GetComponentClass;
12
8
  //# sourceMappingURL=get-component-class.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-component-class.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-component-class.ts"],"names":[],"mappings":";;;AAKA,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AARD,8CAQC"}
1
+ {"version":3,"file":"get-component-class.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-component-class.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetComponentOptionsObject = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- function GetComponentOptionsObject(sourceFile) {
1
+ import { ObjectLiteralExpression, Writers } from 'ts-morph';
2
+ export function GetComponentOptionsObject(sourceFile) {
6
3
  const classWithComponent = sourceFile.getClasses().find(cls => cls.getDecorator('Component'));
7
4
  if (!classWithComponent) {
8
5
  throw new Error('Could not find class with Component decorator!');
@@ -10,12 +7,11 @@ function GetComponentOptionsObject(sourceFile) {
10
7
  const componentDecorator = classWithComponent.getDecorator('Component');
11
8
  let componentOptions = componentDecorator.getArguments()[0];
12
9
  if (!componentOptions) {
13
- componentOptions = componentDecorator.addArgument(ts_morph_1.Writers.object({}));
10
+ componentOptions = componentDecorator.addArgument(Writers.object({}));
14
11
  }
15
- if (!(componentOptions instanceof ts_morph_1.ObjectLiteralExpression)) {
12
+ if (!(componentOptions instanceof ObjectLiteralExpression)) {
16
13
  throw new Error('The Component options is not an object literal expression');
17
14
  }
18
15
  return componentOptions;
19
16
  }
20
- exports.GetComponentOptionsObject = GetComponentOptionsObject;
21
17
  //# sourceMappingURL=get-component-options-object.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-component-options-object.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-component-options-object.ts"],"names":[],"mappings":";;;AAAA,uCAIkB;AAElB,SAAgB,yBAAyB,CAAC,UAAsB;IAG9D,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,YAAY,CAAC,WAAW,CAAE,CAAC;IACzE,IAAI,gBAAgB,GAAO,kBAAkB,CAAC,YAAY,EAAE,CAAE,CAAC,CAAE,CAAC;IAElE,IAAI,CAAC,gBAAgB,EAAE;QACrB,gBAAgB,GAAG,kBAAkB,CAAC,WAAW,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACvE;IAED,IAAI,CAAC,CAAC,gBAAgB,YAAY,kCAAuB,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;KAC9E;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AArBD,8DAqBC"}
1
+ {"version":3,"file":"get-component-options-object.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-component-options-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,OAAO,EACR,MAAM,UAAU,CAAC;AAElB,MAAM,UAAU,yBAAyB,CAAC,UAAsB;IAG9D,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,YAAY,CAAC,WAAW,CAAE,CAAC;IACzE,IAAI,gBAAgB,GAAO,kBAAkB,CAAC,YAAY,EAAE,CAAE,CAAC,CAAE,CAAC;IAElE,IAAI,CAAC,gBAAgB,EAAE;QACrB,gBAAgB,GAAG,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACvE;IAED,IAAI,CAAC,CAAC,gBAAgB,YAAY,uBAAuB,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;KAC9E;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -1,21 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddToFormProviders = exports.GetFormProvidersFile = void 0;
4
- const add_to_array_1 = require("./add-to-array");
5
- function GetFormProvidersFile(project) {
1
+ import { AddToArray } from './add-to-array';
2
+ export function GetFormProvidersFile(project) {
6
3
  var _a;
7
4
  const formProviderSourceFilePath = 'form.providers';
8
5
  return (_a = project.getSourceFile(formProviderSourceFilePath + '.ts')) !== null && _a !== void 0 ? _a : project.createSourceFile(formProviderSourceFilePath + '.ts');
9
6
  }
10
- exports.GetFormProvidersFile = GetFormProvidersFile;
11
- function AddToFormProviders(project, value, overwrite = false) {
7
+ export function AddToFormProviders(project, value, overwrite = false) {
12
8
  const sourceFile = GetFormProvidersFile(project);
13
9
  sourceFile.addImportDeclaration({
14
10
  moduleSpecifier: '@angular/core',
15
11
  namedImports: ['Provider']
16
12
  });
17
- add_to_array_1.AddToArray(sourceFile, 'FormProviders', value, 'Provider[]', overwrite);
13
+ AddToArray(sourceFile, 'FormProviders', value, 'Provider[]', overwrite);
18
14
  return sourceFile;
19
15
  }
20
- exports.AddToFormProviders = AddToFormProviders;
21
16
  //# sourceMappingURL=get-form-providers-source-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-form-providers-source-file.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-form-providers-source-file.ts"],"names":[],"mappings":";;;AAIA,iDAA4C;AAE5C,SAAgB,oBAAoB,CAAC,OAAgB;;IACnD,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;IACpD,OAAO,MAAA,OAAO,CAAC,aAAa,CAAC,0BAA0B,GAAG,KAAK,CAAC,mCAAI,OAAO,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACnI,CAAC;AAHD,oDAGC;AAED,SAAgB,kBAAkB,CAAC,OAAgB,EAAE,KAAa,EAAE,YAAqB,KAAK;IAC5F,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,UAAU,CAAC,oBAAoB,CAAC;QAC9B,eAAe,EAAE,eAAe;QAChC,YAAY,EAAK,CAAE,UAAU,CAAE;KAChC,CAAC,CAAC;IACH,yBAAU,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACxE,OAAO,UAAU,CAAC;AACpB,CAAC;AARD,gDAQC"}
1
+ {"version":3,"file":"get-form-providers-source-file.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-form-providers-source-file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,UAAU,oBAAoB,CAAC,OAAgB;;IACnD,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;IACpD,OAAO,MAAA,OAAO,CAAC,aAAa,CAAC,0BAA0B,GAAG,KAAK,CAAC,mCAAI,OAAO,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACnI,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAgB,EAAE,KAAa,EAAE,YAAqB,KAAK;IAC5F,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,UAAU,CAAC,oBAAoB,CAAC;QAC9B,eAAe,EAAE,eAAe;QAChC,YAAY,EAAK,CAAE,UAAU,CAAE;KAChC,CAAC,CAAC;IACH,UAAU,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACxE,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetNgModuleOptionsObject = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- function GetNgModuleOptionsObject(sourceFile) {
1
+ import { ObjectLiteralExpression, Writers } from 'ts-morph';
2
+ export function GetNgModuleOptionsObject(sourceFile) {
6
3
  const classWithNgModule = sourceFile.getClasses().find(cls => cls.getDecorator('NgModule'));
7
4
  if (!classWithNgModule) {
8
5
  throw new Error('Could not find class with NgModule decorator!');
@@ -10,12 +7,11 @@ function GetNgModuleOptionsObject(sourceFile) {
10
7
  const ngModuleDecorator = classWithNgModule.getDecorator('NgModule');
11
8
  let ngModuleOptions = ngModuleDecorator.getArguments()[0];
12
9
  if (!ngModuleOptions) {
13
- ngModuleOptions = ngModuleDecorator.addArgument(ts_morph_1.Writers.object({}));
10
+ ngModuleOptions = ngModuleDecorator.addArgument(Writers.object({}));
14
11
  }
15
- if (!(ngModuleOptions instanceof ts_morph_1.ObjectLiteralExpression)) {
12
+ if (!(ngModuleOptions instanceof ObjectLiteralExpression)) {
16
13
  throw new Error('The NgModule options is not an object literal expression');
17
14
  }
18
15
  return ngModuleOptions;
19
16
  }
20
- exports.GetNgModuleOptionsObject = GetNgModuleOptionsObject;
21
17
  //# sourceMappingURL=get-ng-module-options-object.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-ng-module-options-object.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-ng-module-options-object.ts"],"names":[],"mappings":";;;AAAA,uCAIkB;AAElB,SAAgB,wBAAwB,CAAC,UAAsB;IAG7D,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5F,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IAED,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAE,CAAC;IACtE,IAAI,eAAe,GAAO,iBAAiB,CAAC,YAAY,EAAE,CAAE,CAAC,CAAE,CAAC;IAEhE,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG,iBAAiB,CAAC,WAAW,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACrE;IAED,IAAI,CAAC,CAAC,eAAe,YAAY,kCAAuB,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AArBD,4DAqBC"}
1
+ {"version":3,"file":"get-ng-module-options-object.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-ng-module-options-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,OAAO,EACR,MAAM,UAAU,CAAC;AAElB,MAAM,UAAU,wBAAwB,CAAC,UAAsB;IAG7D,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5F,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IAED,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAE,CAAC;IACtE,IAAI,eAAe,GAAO,iBAAiB,CAAC,YAAY,EAAE,CAAE,CAAC,CAAE,CAAC;IAEhE,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACrE;IAED,IAAI,CAAC,CAAC,eAAe,YAAY,uBAAuB,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetVariableDeclaration = void 0;
4
- function GetVariableDeclaration(sourceFile, name) {
1
+ export function GetVariableDeclaration(sourceFile, name) {
5
2
  var _a;
6
3
  const variableStatement = sourceFile.getVariableStatement(name);
7
4
  if (variableStatement) {
@@ -9,5 +6,4 @@ function GetVariableDeclaration(sourceFile, name) {
9
6
  }
10
7
  return null;
11
8
  }
12
- exports.GetVariableDeclaration = GetVariableDeclaration;
13
9
  //# sourceMappingURL=get-variable-declaration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-variable-declaration.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-variable-declaration.ts"],"names":[],"mappings":";;;AAKA,SAAgB,sBAAsB,CAAC,UAAsB,EAAE,IAAY;;IACzE,MAAM,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAChE,IAAI,iBAAiB,EAAE;QACrB,OAAO,MAAA,iBAAiB,CAAC,eAAe,EAAE,CAAE,CAAC,CAAE,mCAAI,IAAI,CAAC;KACzD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAND,wDAMC"}
1
+ {"version":3,"file":"get-variable-declaration.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/get-variable-declaration.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,sBAAsB,CAAC,UAAsB,EAAE,IAAY;;IACzE,MAAM,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAChE,IAAI,iBAAiB,EAAE;QACrB,OAAO,MAAA,iBAAiB,CAAC,eAAe,EAAE,CAAE,CAAC,CAAE,mCAAI,IAAI,CAAC;KACzD;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=handle-component-module.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=handle-component.js.map
@@ -1,15 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssertArrayLiteralExpression = exports.IsArrayLiteralExpression = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- function IsArrayLiteralExpression(expression) {
6
- return expression instanceof ts_morph_1.ArrayLiteralExpression;
1
+ import { ArrayLiteralExpression } from 'ts-morph';
2
+ export function IsArrayLiteralExpression(expression) {
3
+ return expression instanceof ArrayLiteralExpression;
7
4
  }
8
- exports.IsArrayLiteralExpression = IsArrayLiteralExpression;
9
- function AssertArrayLiteralExpression(expression, variableDeclarationName) {
5
+ export function AssertArrayLiteralExpression(expression, variableDeclarationName) {
10
6
  if (!IsArrayLiteralExpression(expression)) {
11
7
  throw new Error(`The variable declaration '${variableDeclarationName}' is not an array!`);
12
8
  }
13
9
  }
14
- exports.AssertArrayLiteralExpression = AssertArrayLiteralExpression;
15
10
  //# sourceMappingURL=is-array-literal-expression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-array-literal-expression.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/is-array-literal-expression.ts"],"names":[],"mappings":";;;AAAA,uCAGkB;AAElB,SAAgB,wBAAwB,CAAC,UAAuB;IAC9D,OAAO,UAAU,YAAY,iCAAsB,CAAC;AACtD,CAAC;AAFD,4DAEC;AAED,SAAgB,4BAA4B,CAC1C,UAAkC,EAClC,uBAA+B;IAE/B,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,6BAA6B,uBAAuB,oBAAoB,CAAC,CAAC;KAC3F;AACH,CAAC;AAPD,oEAOC"}
1
+ {"version":3,"file":"is-array-literal-expression.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/is-array-literal-expression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEvB,MAAM,UAAU,CAAC;AAElB,MAAM,UAAU,wBAAwB,CAAC,UAAuB;IAC9D,OAAO,UAAU,YAAY,sBAAsB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,UAAkC,EAClC,uBAA+B;IAE/B,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,6BAA6B,uBAAuB,oBAAoB,CAAC,CAAC;KAC3F;AACH,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MergeTsMorphProject = void 0;
4
- const path_1 = require("path");
1
+ import { join } from 'path';
5
2
  /**
6
3
  * Copies all files from the source project to the target project.
7
4
  *
@@ -12,10 +9,9 @@ const path_1 = require("path");
12
9
  * @param relPath
13
10
  * @constructor
14
11
  */
15
- function MergeTsMorphProject(target, source, relPath) {
12
+ export function MergeTsMorphProject(target, source, relPath) {
16
13
  for (const sourceFile of source.getSourceFiles()) {
17
- target.createSourceFile(path_1.join(relPath, sourceFile.getFilePath()), sourceFile.getFullText(), { overwrite: true });
14
+ target.createSourceFile(join(relPath, sourceFile.getFilePath()), sourceFile.getFullText(), { overwrite: true });
18
15
  }
19
16
  }
20
- exports.MergeTsMorphProject = MergeTsMorphProject;
21
17
  //# sourceMappingURL=merge-ts-morph-project.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-ts-morph-project.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/merge-ts-morph-project.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B;;;;;;;;;GASG;AACH,SAAgB,mBAAmB,CAAC,MAAe,EAAE,MAAe,EAAE,OAAe;IAEnF,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE;QAChD,MAAM,CAAC,gBAAgB,CACrB,WAAI,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,EACvC,UAAU,CAAC,WAAW,EAAE,EACxB,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;KACH;AAEH,CAAC;AAVD,kDAUC"}
1
+ {"version":3,"file":"merge-ts-morph-project.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/merge-ts-morph-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe,EAAE,MAAe,EAAE,OAAe;IAEnF,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE;QAChD,MAAM,CAAC,gBAAgB,CACrB,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,EACvC,UAAU,CAAC,WAAW,EAAE,EACxB,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;KACH;AAEH,CAAC"}
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddNestController = void 0;
4
- const coerce_class_1 = require("../coerce-class");
5
- const schematics_utilities_1 = require("@rxap/schematics-utilities");
6
- const coerce_source_file_1 = require("../coerce-source-file");
7
- const find_nest_module_source_file_1 = require("./find-nest-module-source-file");
8
- const add_nest_module_controller_1 = require("./add-nest-module-controller");
9
- function AddNestController(project, name, options = {}) {
1
+ import { CoerceClass } from '../coerce-class';
2
+ import { classify, CoerceSuffix, dasherize } from '@rxap/schematics-utilities';
3
+ import { CoerceSourceFile } from '../coerce-source-file';
4
+ import { FindNestModuleSourceFile } from './find-nest-module-source-file';
5
+ import { AddNestModuleController } from './add-nest-module-controller';
6
+ export function AddNestController(project, name, options = {}) {
10
7
  var _a, _b;
11
- const sourceFile = (_a = options.sourceFile) !== null && _a !== void 0 ? _a : coerce_source_file_1.CoerceSourceFile(project, `${schematics_utilities_1.dasherize(name)}.controller.ts`);
12
- const controllerClass = schematics_utilities_1.CoerceSuffix(schematics_utilities_1.classify(name), 'Controller');
13
- coerce_class_1.CoerceClass(sourceFile, controllerClass, {
8
+ const sourceFile = (_a = options.sourceFile) !== null && _a !== void 0 ? _a : CoerceSourceFile(project, `${dasherize(name)}.controller.ts`);
9
+ const controllerClass = CoerceSuffix(classify(name), 'Controller');
10
+ CoerceClass(sourceFile, controllerClass, {
14
11
  isExported: true,
15
12
  decorators: [
16
13
  {
17
14
  name: 'Controller',
18
- arguments: [w => { var _a; return w.quote((_a = options.prefix) !== null && _a !== void 0 ? _a : schematics_utilities_1.dasherize(name)); }]
15
+ arguments: [w => { var _a; return w.quote((_a = options.prefix) !== null && _a !== void 0 ? _a : dasherize(name)); }]
19
16
  }
20
17
  ]
21
18
  });
@@ -30,12 +27,12 @@ function AddNestController(project, name, options = {}) {
30
27
  moduleSourceFile = project.getSourceFile(modulePath);
31
28
  }
32
29
  else {
33
- moduleSourceFile = find_nest_module_source_file_1.FindNestModuleSourceFile(project, modulePath);
30
+ moduleSourceFile = FindNestModuleSourceFile(project, modulePath);
34
31
  }
35
32
  if (!moduleSourceFile) {
36
33
  throw new Error(`Could not find a file at path '${modulePath}'`);
37
34
  }
38
- add_nest_module_controller_1.AddNestModuleController(moduleSourceFile, controllerClass, [
35
+ AddNestModuleController(moduleSourceFile, controllerClass, [
39
36
  {
40
37
  namedImports: [controllerClass],
41
38
  moduleSpecifier: './' + moduleSourceFile.getRelativePathTo(sourceFile).replace(/\.ts$/, ''),
@@ -44,5 +41,4 @@ function AddNestController(project, name, options = {}) {
44
41
  }
45
42
  return sourceFile;
46
43
  }
47
- exports.AddNestController = AddNestController;
48
44
  //# sourceMappingURL=add-nest-controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-nest-controller.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-controller.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAC9C,qEAA+E;AAC/E,8DAAyD;AACzD,iFAA0E;AAC1E,6EAAuE;AASvE,SAAgB,iBAAiB,CAC/B,OAAgB,EAChB,IAAY,EACZ,UAAoC,EAAE;;IAGtC,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,qCAAgB,CAAC,OAAO,EAAE,GAAG,gCAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAEvG,MAAM,eAAe,GAAG,mCAAY,CAAC,+BAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAA;IAElE,0BAAW,CACT,UAAU,EACV,eAAe,EACf;QACE,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,YAAY;gBAClB,SAAS,EAAE,CAAE,CAAC,CAAC,EAAE,WAAC,OAAA,CAAC,CAAC,KAAK,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,gCAAS,CAAC,IAAI,CAAC,CAAC,CAAA,EAAA,CAAE;aAC/D;SACF;KACF,CACF,CAAC;IAEF,UAAU,CAAC,oBAAoB,CAAC;QAC9B,YAAY,EAAE,CAAE,YAAY,CAAE;QAC9B,eAAe,EAAE,gBAAgB;KAClC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,WAAW,KAAK,KAAK,EAAE;QAEjC,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC;QAEvE,IAAI,gBAAwC,CAAC;QAE7C,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC7B,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,UAAU,CAAE,CAAC;SACvD;aAAM;YACL,gBAAgB,GAAG,uDAAwB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;SAClE;QAED,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,kCAAkC,UAAU,GAAG,CAAC,CAAC;SAClE;QAED,oDAAuB,CACrB,gBAAgB,EAChB,eAAe,EACf;YACE;gBACE,YAAY,EAAE,CAAE,eAAe,CAAE;gBACjC,eAAe,EAAE,IAAI,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aAC5F;SACF,CACF,CAAC;KAEH;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC;AA5DD,8CA4DC"}
1
+ {"version":3,"file":"add-nest-controller.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/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AAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,kCAAkC,UAAU,GAAG,CAAC,CAAC;SAClE;QAED,uBAAuB,CACrB,gBAAgB,EAChB,eAAe,EACf;YACE;gBACE,YAAY,EAAE,CAAE,eAAe,CAAE;gBACjC,eAAe,EAAE,IAAI,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aAC5F;SACF,CACF,CAAC;KAEH;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC"}
@@ -1,14 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddNestModuleController = void 0;
4
- const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
5
- const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
6
- const add_nest_provider_to_array_1 = require("./add-nest-provider-to-array");
7
- function AddNestModuleController(sourceFile, controller, structures = [], overwrite = false) {
1
+ import { GetCoerceArrayLiteralFromObjectLiteral } from '../get-coerce-array-literal-form-object-literal';
2
+ import { GetNestModuleMetadata } from './get-nest-module-metadata';
3
+ import { AddNestProviderToArray } from './add-nest-provider-to-array';
4
+ export function AddNestModuleController(sourceFile, controller, structures = [], overwrite = false) {
8
5
  sourceFile.addImportDeclarations(structures);
9
- const metadata = get_nest_module_metadata_1.GetNestModuleMetadata(sourceFile);
10
- const providerArray = get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral(metadata, 'controllers');
11
- add_nest_provider_to_array_1.AddNestProviderToArray(controller, providerArray, overwrite);
6
+ const metadata = GetNestModuleMetadata(sourceFile);
7
+ const providerArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'controllers');
8
+ AddNestProviderToArray(controller, providerArray, overwrite);
12
9
  }
13
- exports.AddNestModuleController = AddNestModuleController;
14
10
  //# sourceMappingURL=add-nest-module-controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-nest-module-controller.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-module-controller.ts"],"names":[],"mappings":";;;AACA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AAEtE,SAAgB,uBAAuB,CACrC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,gDAAqB,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,qFAAsC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEtF,mDAAsB,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAE/D,CAAC;AAfD,0DAeC"}
1
+ {"version":3,"file":"add-nest-module-controller.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-module-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sCAAsC,EAAE,MAAM,iDAAiD,CAAC;AACzG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,MAAM,UAAU,uBAAuB,CACrC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,sCAAsC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEtF,sBAAsB,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAE/D,CAAC"}
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddNestModuleImport = void 0;
4
- const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
5
- const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
6
- function AddNestModuleImport(sourceFile, moduleName, structures = [], importWriter, overwrite = false) {
1
+ import { GetNestModuleMetadata } from './get-nest-module-metadata';
2
+ import { GetCoerceArrayLiteralFromObjectLiteral } from '../get-coerce-array-literal-form-object-literal';
3
+ export function AddNestModuleImport(sourceFile, moduleName, structures = [], importWriter, overwrite = false) {
7
4
  sourceFile.addImportDeclarations(structures);
8
- const metadata = get_nest_module_metadata_1.GetNestModuleMetadata(sourceFile);
9
- const importsArray = get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral(metadata, 'imports');
5
+ const metadata = GetNestModuleMetadata(sourceFile);
6
+ const importsArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'imports');
10
7
  const hasModule = importsArray.getElements().find(element => element.getFullText().trim().startsWith(moduleName));
11
8
  if (!hasModule || overwrite) {
12
9
  if (hasModule) {
@@ -15,5 +12,4 @@ function AddNestModuleImport(sourceFile, moduleName, structures = [], importWrit
15
12
  importsArray.addElement(importWriter !== null && importWriter !== void 0 ? importWriter : moduleName);
16
13
  }
17
14
  }
18
- exports.AddNestModuleImport = AddNestModuleImport;
19
15
  //# sourceMappingURL=add-nest-module-import.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-nest-module-import.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-module-import.ts"],"names":[],"mappings":";;;AACA,yEAAmE;AACnE,kHAAyG;AAEzG,SAAgB,mBAAmB,CACjC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,YAA6B,EAC7B,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,gDAAqB,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAG,qFAAsC,CAAC,QAAQ,EAAE,SAA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aAAa,EAAE,CAAC,CAAC;SACvD;QAED,YAAY,CAAC,UAAU,CAAC,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,UAAU,CAAC,CAAC;KAErD;AAEH,CAAC"}
@@ -1,14 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddNestModuleProvider = void 0;
4
- const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
5
- const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
6
- const add_nest_provider_to_array_1 = require("./add-nest-provider-to-array");
7
- function AddNestModuleProvider(sourceFile, providerObject, structures = [], overwrite = false) {
1
+ import { GetCoerceArrayLiteralFromObjectLiteral } from '../get-coerce-array-literal-form-object-literal';
2
+ import { GetNestModuleMetadata } from './get-nest-module-metadata';
3
+ import { AddNestProviderToArray } from './add-nest-provider-to-array';
4
+ export function AddNestModuleProvider(sourceFile, providerObject, structures = [], overwrite = false) {
8
5
  sourceFile.addImportDeclarations(structures);
9
- const metadata = get_nest_module_metadata_1.GetNestModuleMetadata(sourceFile);
10
- const providerArray = get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral(metadata, 'providers');
11
- add_nest_provider_to_array_1.AddNestProviderToArray(providerObject, providerArray, overwrite);
6
+ const metadata = GetNestModuleMetadata(sourceFile);
7
+ const providerArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'providers');
8
+ AddNestProviderToArray(providerObject, providerArray, overwrite);
12
9
  }
13
- exports.AddNestModuleProvider = AddNestModuleProvider;
14
10
  //# sourceMappingURL=add-nest-module-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-nest-module-provider.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-module-provider.ts"],"names":[],"mappings":";;;AACA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AAGtE,SAAgB,qBAAqB,CACnC,UAAsB,EACtB,cAA2C,EAC3C,aAAsE,EAAE,EACxE,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,gDAAqB,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,qFAAsC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAEpF,mDAAsB,CAAC,cAAc,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAEnE,CAAC;AAfD,sDAeC"}
1
+ {"version":3,"file":"add-nest-module-provider.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-module-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sCAAsC,EAAE,MAAM,iDAAiD,CAAC;AACzG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,MAAM,UAAU,qBAAqB,CACnC,UAAsB,EACtB,cAA2C,EAC3C,aAAsE,EAAE,EACxE,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,sCAAsC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAEpF,sBAAsB,CAAC,cAAc,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAEnE,CAAC"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddNestProviderToArray = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- const schematics_utilities_1 = require("@rxap/schematics-utilities");
6
- function AddNestProviderToArray(providerObject, providerArray, overwrite = false) {
1
+ import { ObjectLiteralExpression, PropertyAssignment, Writers } from 'ts-morph';
2
+ import { DeleteUndefinedProperties } from '@rxap/schematics-utilities';
3
+ export function AddNestProviderToArray(providerObject, providerArray, overwrite = false) {
7
4
  if (typeof providerObject === 'string') {
8
5
  if (!providerArray.getElements().some(element => element.getFullText().trim() === providerObject)) {
9
6
  providerArray.addElement(providerObject);
@@ -12,9 +9,9 @@ function AddNestProviderToArray(providerObject, providerArray, overwrite = false
12
9
  else {
13
10
  const index = providerArray.getElements().findIndex(element => {
14
11
  var _a;
15
- if (element instanceof ts_morph_1.ObjectLiteralExpression) {
12
+ if (element instanceof ObjectLiteralExpression) {
16
13
  const provideProperty = element.getProperty('provide');
17
- if (provideProperty instanceof ts_morph_1.PropertyAssignment) {
14
+ if (provideProperty instanceof PropertyAssignment) {
18
15
  return ((_a = provideProperty.getInitializer()) === null || _a === void 0 ? void 0 : _a.getFullText().trim()) === providerObject.provide;
19
16
  }
20
17
  }
@@ -24,7 +21,7 @@ function AddNestProviderToArray(providerObject, providerArray, overwrite = false
24
21
  providerArray.removeElement(index);
25
22
  }
26
23
  if (overwrite || index === -1) {
27
- providerArray.addElement(ts_morph_1.Writers.object(schematics_utilities_1.DeleteUndefinedProperties({
24
+ providerArray.addElement(Writers.object(DeleteUndefinedProperties({
28
25
  provide: providerObject.provide,
29
26
  useClass: providerObject.useClass,
30
27
  useFactory: providerObject.useFactory,
@@ -36,5 +33,4 @@ function AddNestProviderToArray(providerObject, providerArray, overwrite = false
36
33
  }
37
34
  }
38
35
  }
39
- exports.AddNestProviderToArray = AddNestProviderToArray;
40
36
  //# sourceMappingURL=add-nest-provider-to-array.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-nest-provider-to-array.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-provider-to-array.ts"],"names":[],"mappings":";;;AACA,uCAAwG;AACxG,qEAAuE;AAEvE,SAAgB,sBAAsB,CACpC,cAA2C,EAC3C,aAAqC,EACrC,YAAqB,KAAK;IAG1B,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAEtC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,I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AC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;aAClJ,CAAC,CAAC,CAAC,CAAC;SACN;KAEF;AAEH,CAAC;AA1CD,wDA0CC"}
1
+ {"version":3,"file":"add-nest-provider-to-array.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/add-nest-provider-to-array.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,uBAAuB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,UAAU,sBAAsB,CACpC,cAA2C,EAC3C,aAAqC,EACrC,YAAqB,KAAK;IAG1B,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAEtC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,cAAc,CAAC,EAAE;YACjG,aAAa,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;SAC1C;KAEF;SAAM;QAEL,MAAM,KAAK,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;;YAC5D,IAAI,OAAO,YAAY,uBAAuB,EAAE;gBAC9C,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBACvD,IAAI,eAAe,YAAY,kBAAkB,EAAE;oBACjD,OAAO,CAAA,MAAA,eAAe,CAAC,cAAc,EAAE,0CAAE,WAAW,GAAG,IAAI,EAAE,MAAK,cAAc,CAAC,OAAO,CAAC;iBAC1F;aACF;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,IAAI,SAAS,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAC7B,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACpC;QAED,IAAI,SAAS,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAC7B,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC;gBAChE,OAAO,EAAE,cAAc,CAAC,OAAO;gBAC/B,QAAQ,EAAE,cAAc,CAAC,QAAQ;gBACjC,UAAU,EAAE,cAAc,CAAC,UAAU;gBACrC,WAAW,EAAE,cAAc,CAAC,WAAW;gBACvC,QAAQ,EAAE,cAAc,CAAC,QAAQ;gBACjC,KAAK,EAAE,cAAc,CAAC,KAAK;gBAC3B,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;aAClJ,CAAC,CAAC,CAAC,CAAC;SACN;KAEF;AAEH,CAAC"}
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FindNestModuleDeclaration = void 0;
4
- const find_nest_module_source_file_1 = require("./find-nest-module-source-file");
5
- const is_nest_module_class_1 = require("./is-nest-module-class");
6
- function FindNestModuleDeclaration(project, directory) {
7
- const sourceFile = find_nest_module_source_file_1.FindNestModuleSourceFile(project, directory);
8
- return sourceFile === null || sourceFile === void 0 ? void 0 : sourceFile.getClass(is_nest_module_class_1.IsNestModuleClass);
1
+ import { FindNestModuleSourceFile } from './find-nest-module-source-file';
2
+ import { IsNestModuleClass } from './is-nest-module-class';
3
+ export function FindNestModuleDeclaration(project, directory) {
4
+ const sourceFile = FindNestModuleSourceFile(project, directory);
5
+ return sourceFile === null || sourceFile === void 0 ? void 0 : sourceFile.getClass(IsNestModuleClass);
9
6
  }
10
- exports.FindNestModuleDeclaration = FindNestModuleDeclaration;
11
7
  //# sourceMappingURL=find-nest-module-declaration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-nest-module-declaration.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/find-nest-module-declaration.ts"],"names":[],"mappings":";;;AACA,iFAA0E;AAC1E,iEAA2D;AAE3D,SAAgB,yBAAyB,CAAC,OAAgB,EAAE,SAAkB;IAC5E,MAAM,UAAU,GAAG,uDAAwB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC,wCAAiB,CAAC,CAAA;AAChD,CAAC;AAJD,8DAIC"}
1
+ {"version":3,"file":"find-nest-module-declaration.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/find-nest-module-declaration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,yBAAyB,CAAC,OAAgB,EAAE,SAAkB;IAC5E,MAAM,UAAU,GAAG,wBAAwB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;AAChD,CAAC"}
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FindNestModuleSourceFile = void 0;
4
- const has_nest_module_class_1 = require("./has-nest-module-class");
5
- function FindNestModuleSourceFile(project, directory) {
1
+ import { HasNestModuleClass } from './has-nest-module-class';
2
+ export function FindNestModuleSourceFile(project, directory) {
6
3
  return project.getSourceFile(file => (!directory || file.getDirectoryPath() === directory) &&
7
- has_nest_module_class_1.HasNestModuleClass(file));
4
+ HasNestModuleClass(file));
8
5
  }
9
- exports.FindNestModuleSourceFile = FindNestModuleSourceFile;
10
6
  //# sourceMappingURL=find-nest-module-source-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-nest-module-source-file.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/find-nest-module-source-file.ts"],"names":[],"mappings":";;;AACA,mEAA6D;AAE7D,SAAgB,wBAAwB,CAAC,OAAgB,EAAE,SAAkB;IAC3E,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAClC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,gBAAgB,EAAE,KAAK,SAAS,CAAC;QACrD,0CAAkB,CAAC,IAAI,CAAC,CACzB,CAAA;AACH,CAAC;AALD,4DAKC"}
1
+ {"version":3,"file":"find-nest-module-source-file.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/find-nest-module-source-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,wBAAwB,CAAC,OAAgB,EAAE,SAAkB;IAC3E,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAClC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,gBAAgB,EAAE,KAAK,SAAS,CAAC;QACrD,kBAAkB,CAAC,IAAI,CAAC,CACzB,CAAA;AACH,CAAC"}
@@ -1,19 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetNestModuleMetadata = void 0;
4
- const ts_morph_1 = require("ts-morph");
5
- const is_nest_module_class_1 = require("./is-nest-module-class");
6
- const get_class_decorator_arguments_1 = require("../get-class-decorator-arguments");
7
- function GetNestModuleMetadata(sourceFile) {
8
- const classDeclaration = sourceFile.getClass(is_nest_module_class_1.IsNestModuleClass);
1
+ import { ObjectLiteralExpression } from 'ts-morph';
2
+ import { IsNestModuleClass } from './is-nest-module-class';
3
+ import { GetClassDecoratorArguments } from '../get-class-decorator-arguments';
4
+ export function GetNestModuleMetadata(sourceFile) {
5
+ const classDeclaration = sourceFile.getClass(IsNestModuleClass);
9
6
  if (!classDeclaration) {
10
7
  throw new Error(`The sourceFile '${sourceFile.getFilePath()}' does not have a NestJs Module class.`);
11
8
  }
12
- const [metadata] = get_class_decorator_arguments_1.GetClassDecoratorArguments(classDeclaration, 'Module');
13
- if (!(metadata instanceof ts_morph_1.ObjectLiteralExpression)) {
9
+ const [metadata] = GetClassDecoratorArguments(classDeclaration, 'Module');
10
+ if (!(metadata instanceof ObjectLiteralExpression)) {
14
11
  throw new Error(`The NestJs Module class in the sourceFile '${sourceFile.getFilePath()}' does not have the @Module decorator with a metadata object literal expression.`);
15
12
  }
16
13
  return metadata;
17
14
  }
18
- exports.GetNestModuleMetadata = GetNestModuleMetadata;
19
15
  //# sourceMappingURL=get-nest-module-metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-nest-module-metadata.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nestjs/get-nest-module-metadata.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;AAC/D,iEAA2D;AAC3D,oFAA8E;AAE9E,SAAgB,qBAAqB,CAAC,UAAsB;IAE1D,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,wCAAiB,CAAC,CAAC;IAEhE,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,CAAC,WAAW,EAAE,wCAAwC,CAAC,CAAC;KACtG;IAED,MAAM,CAAE,QAAQ,CAAE,GAAG,0DAA0B,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAE5E,IAAI,CAAC,CAAC,QAAQ,YAAY,kCAAuB,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,8CAA8C,UAAU,CAAC,WAAW,EAAE,kFAAkF,CAAC,CAAC;KAC3K;IAED,OAAO,QAAQ,CAAC;AAElB,CAAC;AAhBD,sDAgBC"}
1
+ {"version":3,"file":"get-nest-module-metadata.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src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