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

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 (111) hide show
  1. package/CHANGELOG.md +2 -5
  2. package/package.json +2 -2
  3. package/src/index.js +57 -54
  4. package/src/index.js.map +1 -1
  5. package/src/lib/add-component-animations.js +9 -5
  6. package/src/lib/add-component-animations.js.map +1 -1
  7. package/src/lib/add-component-fake-provider.js +9 -5
  8. package/src/lib/add-component-fake-provider.js.map +1 -1
  9. package/src/lib/add-component-input.js +11 -7
  10. package/src/lib/add-component-input.js.map +1 -1
  11. package/src/lib/add-component-provider.js +11 -7
  12. package/src/lib/add-component-provider.js.map +1 -1
  13. package/src/lib/add-control-validator.js +10 -5
  14. package/src/lib/add-control-validator.js.map +1 -1
  15. package/src/lib/add-dependency-injection.js +12 -8
  16. package/src/lib/add-dependency-injection.js.map +1 -1
  17. package/src/lib/add-dir.js +8 -4
  18. package/src/lib/add-dir.js.map +1 -1
  19. package/src/lib/add-fake-provider.js +16 -12
  20. package/src/lib/add-fake-provider.js.map +1 -1
  21. package/src/lib/add-method-class.js +11 -7
  22. package/src/lib/add-method-class.js.map +1 -1
  23. package/src/lib/add-ng-module-import.js +9 -5
  24. package/src/lib/add-ng-module-import.js.map +1 -1
  25. package/src/lib/add-ng-module-provider.js +11 -7
  26. package/src/lib/add-ng-module-provider.js.map +1 -1
  27. package/src/lib/add-provider-to-array.js +10 -6
  28. package/src/lib/add-provider-to-array.js.map +1 -1
  29. package/src/lib/add-to-array.js +9 -5
  30. package/src/lib/add-to-array.js.map +1 -1
  31. package/src/lib/add-variable-fake-provider.js +9 -5
  32. package/src/lib/add-variable-fake-provider.js.map +1 -1
  33. package/src/lib/add-variable-provider.js +11 -7
  34. package/src/lib/add-variable-provider.js.map +1 -1
  35. package/src/lib/apply-ts-morph-project.js +7 -3
  36. package/src/lib/apply-ts-morph-project.js.map +1 -1
  37. package/src/lib/auto-import.js +11 -7
  38. package/src/lib/auto-import.js.map +1 -1
  39. package/src/lib/coerce-class-constructor.js +5 -1
  40. package/src/lib/coerce-class-constructor.js.map +1 -1
  41. package/src/lib/coerce-class-method.js +5 -1
  42. package/src/lib/coerce-class-method.js.map +1 -1
  43. package/src/lib/coerce-class.js +5 -1
  44. package/src/lib/coerce-class.js.map +1 -1
  45. package/src/lib/coerce-method-class.js +9 -5
  46. package/src/lib/coerce-method-class.js.map +1 -1
  47. package/src/lib/coerce-property-key.js +5 -1
  48. package/src/lib/coerce-property-key.js.map +1 -1
  49. package/src/lib/coerce-source-file.js +5 -1
  50. package/src/lib/coerce-source-file.js.map +1 -1
  51. package/src/lib/coerce-variable-declaration.js +7 -3
  52. package/src/lib/coerce-variable-declaration.js.map +1 -1
  53. package/src/lib/find-component-module-source-file.js +7 -3
  54. package/src/lib/find-component-module-source-file.js.map +1 -1
  55. package/src/lib/find-component-source-file.js +7 -3
  56. package/src/lib/find-component-source-file.js.map +1 -1
  57. package/src/lib/find-routing-module.js +7 -3
  58. package/src/lib/find-routing-module.js.map +1 -1
  59. package/src/lib/fix-missing-imports.js +11 -7
  60. package/src/lib/fix-missing-imports.js.map +1 -1
  61. package/src/lib/get-array-declaration.js +9 -5
  62. package/src/lib/get-array-declaration.js.map +1 -1
  63. package/src/lib/get-class-decorator-arguments.js +5 -1
  64. package/src/lib/get-class-decorator-arguments.js.map +1 -1
  65. package/src/lib/get-coerce-array-literal-form-object-literal.js +8 -4
  66. package/src/lib/get-coerce-array-literal-form-object-literal.js.map +1 -1
  67. package/src/lib/get-component-class.js +5 -1
  68. package/src/lib/get-component-class.js.map +1 -1
  69. package/src/lib/get-component-options-object.js +8 -4
  70. package/src/lib/get-component-options-object.js.map +1 -1
  71. package/src/lib/get-form-providers-source-file.js +9 -4
  72. package/src/lib/get-form-providers-source-file.js.map +1 -1
  73. package/src/lib/get-ng-module-options-object.js +8 -4
  74. package/src/lib/get-ng-module-options-object.js.map +1 -1
  75. package/src/lib/get-variable-declaration.js +5 -1
  76. package/src/lib/get-variable-declaration.js.map +1 -1
  77. package/src/lib/handle-component-module.js +2 -1
  78. package/src/lib/handle-component.js +2 -1
  79. package/src/lib/is-array-literal-expression.js +9 -4
  80. package/src/lib/is-array-literal-expression.js.map +1 -1
  81. package/src/lib/merge-ts-morph-project.js +7 -3
  82. package/src/lib/merge-ts-morph-project.js.map +1 -1
  83. package/src/lib/nestjs/add-nest-controller.js +16 -12
  84. package/src/lib/nestjs/add-nest-controller.js.map +1 -1
  85. package/src/lib/nestjs/add-nest-module-controller.js +11 -7
  86. package/src/lib/nestjs/add-nest-module-controller.js.map +1 -1
  87. package/src/lib/nestjs/add-nest-module-import.js +9 -5
  88. package/src/lib/nestjs/add-nest-module-import.js.map +1 -1
  89. package/src/lib/nestjs/add-nest-module-provider.js +11 -7
  90. package/src/lib/nestjs/add-nest-module-provider.js.map +1 -1
  91. package/src/lib/nestjs/add-nest-provider-to-array.js +10 -6
  92. package/src/lib/nestjs/add-nest-provider-to-array.js.map +1 -1
  93. package/src/lib/nestjs/find-nest-module-declaration.js +9 -5
  94. package/src/lib/nestjs/find-nest-module-declaration.js.map +1 -1
  95. package/src/lib/nestjs/find-nest-module-source-file.js +7 -3
  96. package/src/lib/nestjs/find-nest-module-source-file.js.map +1 -1
  97. package/src/lib/nestjs/get-nest-module-metadata.js +11 -7
  98. package/src/lib/nestjs/get-nest-module-metadata.js.map +1 -1
  99. package/src/lib/nestjs/has-nest-module-class.js +7 -3
  100. package/src/lib/nestjs/has-nest-module-class.js.map +1 -1
  101. package/src/lib/nestjs/is-nest-module-class.js +5 -1
  102. package/src/lib/nestjs/is-nest-module-class.js.map +1 -1
  103. package/src/lib/nestjs/nest-provider-object.js +2 -1
  104. package/src/lib/organize-imports.js +9 -5
  105. package/src/lib/organize-imports.js.map +1 -1
  106. package/src/lib/overwrite-decorator.js +5 -1
  107. package/src/lib/overwrite-decorator.js.map +1 -1
  108. package/src/lib/overwrite-property.js +5 -1
  109. package/src/lib/overwrite-property.js.map +1 -1
  110. package/src/lib/provider-object.js +2 -1
  111. package/src/lib/to-value-context.js +2 -1
@@ -1,11 +1,15 @@
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, {
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, {
5
8
  initializer: '[]',
6
9
  type
7
10
  });
8
- AssertArrayLiteralExpression(arrayDeclaration.getInitializer(), arrayName);
11
+ is_array_literal_expression_1.AssertArrayLiteralExpression(arrayDeclaration.getInitializer(), arrayName);
9
12
  return arrayDeclaration;
10
13
  }
14
+ exports.GetArrayDeclaration = GetArrayDeclaration;
11
15
  //# 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,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
+ {"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,4 +1,7 @@
1
- export function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetClassDecoratorArguments = void 0;
4
+ function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
2
5
  var _a;
3
6
  let decorator;
4
7
  if (typeof nameOrFindFunction === 'string') {
@@ -9,4 +12,5 @@ export function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction)
9
12
  }
10
13
  return (_a = decorator === null || decorator === void 0 ? void 0 : decorator.getArguments()) !== null && _a !== void 0 ? _a : [];
11
14
  }
15
+ exports.GetClassDecoratorArguments = GetClassDecoratorArguments;
12
16
  //# 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,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
+ {"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,5 +1,8 @@
1
- import { PropertyAssignment, ArrayLiteralExpression } from 'ts-morph';
2
- export function GetCoerceArrayLiteralFromObjectLiteral(objectLiteral, propertyKey) {
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) {
3
6
  let arrayLiteralAssignment = objectLiteral.getProperty(propertyKey);
4
7
  if (!arrayLiteralAssignment) {
5
8
  arrayLiteralAssignment = objectLiteral.addPropertyAssignment({
@@ -7,16 +10,17 @@ export function GetCoerceArrayLiteralFromObjectLiteral(objectLiteral, propertyKe
7
10
  initializer: '[]'
8
11
  });
9
12
  }
10
- if (!(arrayLiteralAssignment instanceof PropertyAssignment)) {
13
+ if (!(arrayLiteralAssignment instanceof ts_morph_1.PropertyAssignment)) {
11
14
  throw new Error('The imports property is not type of Property Assignment!');
12
15
  }
13
16
  const arrayLiteral = arrayLiteralAssignment.getInitializer();
14
17
  if (!arrayLiteral) {
15
18
  throw new Error('The imports property a not a initializer');
16
19
  }
17
- if (!(arrayLiteral instanceof ArrayLiteralExpression)) {
20
+ if (!(arrayLiteral instanceof ts_morph_1.ArrayLiteralExpression)) {
18
21
  throw new Error('The imports property initializer is not an array');
19
22
  }
20
23
  return arrayLiteral;
21
24
  }
25
+ exports.GetCoerceArrayLiteralFromObjectLiteral = GetCoerceArrayLiteralFromObjectLiteral;
22
26
  //# 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,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
+ {"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,8 +1,12 @@
1
- export function GetComponentClass(sourceFile) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetComponentClass = void 0;
4
+ function GetComponentClass(sourceFile) {
2
5
  const classWithComponent = sourceFile.getClasses().find(cls => cls.getDecorator('Component'));
3
6
  if (!classWithComponent) {
4
7
  throw new Error('Could not find class with Component decorator!');
5
8
  }
6
9
  return classWithComponent;
7
10
  }
11
+ exports.GetComponentClass = GetComponentClass;
8
12
  //# 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,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
+ {"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,5 +1,8 @@
1
- import { ObjectLiteralExpression, Writers } from 'ts-morph';
2
- export function GetComponentOptionsObject(sourceFile) {
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) {
3
6
  const classWithComponent = sourceFile.getClasses().find(cls => cls.getDecorator('Component'));
4
7
  if (!classWithComponent) {
5
8
  throw new Error('Could not find class with Component decorator!');
@@ -7,11 +10,12 @@ export function GetComponentOptionsObject(sourceFile) {
7
10
  const componentDecorator = classWithComponent.getDecorator('Component');
8
11
  let componentOptions = componentDecorator.getArguments()[0];
9
12
  if (!componentOptions) {
10
- componentOptions = componentDecorator.addArgument(Writers.object({}));
13
+ componentOptions = componentDecorator.addArgument(ts_morph_1.Writers.object({}));
11
14
  }
12
- if (!(componentOptions instanceof ObjectLiteralExpression)) {
15
+ if (!(componentOptions instanceof ts_morph_1.ObjectLiteralExpression)) {
13
16
  throw new Error('The Component options is not an object literal expression');
14
17
  }
15
18
  return componentOptions;
16
19
  }
20
+ exports.GetComponentOptionsObject = GetComponentOptionsObject;
17
21
  //# 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,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
+ {"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,16 +1,21 @@
1
- import { AddToArray } from './add-to-array';
2
- export function GetFormProvidersFile(project) {
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) {
3
6
  var _a;
4
7
  const formProviderSourceFilePath = 'form.providers';
5
8
  return (_a = project.getSourceFile(formProviderSourceFilePath + '.ts')) !== null && _a !== void 0 ? _a : project.createSourceFile(formProviderSourceFilePath + '.ts');
6
9
  }
7
- export function AddToFormProviders(project, value, overwrite = false) {
10
+ exports.GetFormProvidersFile = GetFormProvidersFile;
11
+ function AddToFormProviders(project, value, overwrite = false) {
8
12
  const sourceFile = GetFormProvidersFile(project);
9
13
  sourceFile.addImportDeclaration({
10
14
  moduleSpecifier: '@angular/core',
11
15
  namedImports: ['Provider']
12
16
  });
13
- AddToArray(sourceFile, 'FormProviders', value, 'Provider[]', overwrite);
17
+ add_to_array_1.AddToArray(sourceFile, 'FormProviders', value, 'Provider[]', overwrite);
14
18
  return sourceFile;
15
19
  }
20
+ exports.AddToFormProviders = AddToFormProviders;
16
21
  //# 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,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
+ {"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,5 +1,8 @@
1
- import { ObjectLiteralExpression, Writers } from 'ts-morph';
2
- export function GetNgModuleOptionsObject(sourceFile) {
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) {
3
6
  const classWithNgModule = sourceFile.getClasses().find(cls => cls.getDecorator('NgModule'));
4
7
  if (!classWithNgModule) {
5
8
  throw new Error('Could not find class with NgModule decorator!');
@@ -7,11 +10,12 @@ export function GetNgModuleOptionsObject(sourceFile) {
7
10
  const ngModuleDecorator = classWithNgModule.getDecorator('NgModule');
8
11
  let ngModuleOptions = ngModuleDecorator.getArguments()[0];
9
12
  if (!ngModuleOptions) {
10
- ngModuleOptions = ngModuleDecorator.addArgument(Writers.object({}));
13
+ ngModuleOptions = ngModuleDecorator.addArgument(ts_morph_1.Writers.object({}));
11
14
  }
12
- if (!(ngModuleOptions instanceof ObjectLiteralExpression)) {
15
+ if (!(ngModuleOptions instanceof ts_morph_1.ObjectLiteralExpression)) {
13
16
  throw new Error('The NgModule options is not an object literal expression');
14
17
  }
15
18
  return ngModuleOptions;
16
19
  }
20
+ exports.GetNgModuleOptionsObject = GetNgModuleOptionsObject;
17
21
  //# 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,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
+ {"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,4 +1,7 @@
1
- export function GetVariableDeclaration(sourceFile, name) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetVariableDeclaration = void 0;
4
+ function GetVariableDeclaration(sourceFile, name) {
2
5
  var _a;
3
6
  const variableStatement = sourceFile.getVariableStatement(name);
4
7
  if (variableStatement) {
@@ -6,4 +9,5 @@ export function GetVariableDeclaration(sourceFile, name) {
6
9
  }
7
10
  return null;
8
11
  }
12
+ exports.GetVariableDeclaration = GetVariableDeclaration;
9
13
  //# 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,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
+ {"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,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=handle-component-module.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=handle-component.js.map
@@ -1,10 +1,15 @@
1
- import { ArrayLiteralExpression } from 'ts-morph';
2
- export function IsArrayLiteralExpression(expression) {
3
- return expression instanceof ArrayLiteralExpression;
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;
4
7
  }
5
- export function AssertArrayLiteralExpression(expression, variableDeclarationName) {
8
+ exports.IsArrayLiteralExpression = IsArrayLiteralExpression;
9
+ function AssertArrayLiteralExpression(expression, variableDeclarationName) {
6
10
  if (!IsArrayLiteralExpression(expression)) {
7
11
  throw new Error(`The variable declaration '${variableDeclarationName}' is not an array!`);
8
12
  }
9
13
  }
14
+ exports.AssertArrayLiteralExpression = AssertArrayLiteralExpression;
10
15
  //# 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,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
+ {"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,4 +1,7 @@
1
- import { join } from 'path';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MergeTsMorphProject = void 0;
4
+ const path_1 = require("path");
2
5
  /**
3
6
  * Copies all files from the source project to the target project.
4
7
  *
@@ -9,9 +12,10 @@ import { join } from 'path';
9
12
  * @param relPath
10
13
  * @constructor
11
14
  */
12
- export function MergeTsMorphProject(target, source, relPath) {
15
+ function MergeTsMorphProject(target, source, relPath) {
13
16
  for (const sourceFile of source.getSourceFiles()) {
14
- target.createSourceFile(join(relPath, sourceFile.getFilePath()), sourceFile.getFullText(), { overwrite: true });
17
+ target.createSourceFile(path_1.join(relPath, sourceFile.getFilePath()), sourceFile.getFullText(), { overwrite: true });
15
18
  }
16
19
  }
20
+ exports.MergeTsMorphProject = MergeTsMorphProject;
17
21
  //# 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,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
+ {"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,18 +1,21 @@
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 = {}) {
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 = {}) {
7
10
  var _a, _b;
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, {
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, {
11
14
  isExported: true,
12
15
  decorators: [
13
16
  {
14
17
  name: 'Controller',
15
- arguments: [w => { var _a; return w.quote((_a = options.prefix) !== null && _a !== void 0 ? _a : dasherize(name)); }]
18
+ arguments: [w => { var _a; return w.quote((_a = options.prefix) !== null && _a !== void 0 ? _a : schematics_utilities_1.dasherize(name)); }]
16
19
  }
17
20
  ]
18
21
  });
@@ -27,12 +30,12 @@ export function AddNestController(project, name, options = {}) {
27
30
  moduleSourceFile = project.getSourceFile(modulePath);
28
31
  }
29
32
  else {
30
- moduleSourceFile = FindNestModuleSourceFile(project, modulePath);
33
+ moduleSourceFile = find_nest_module_source_file_1.FindNestModuleSourceFile(project, modulePath);
31
34
  }
32
35
  if (!moduleSourceFile) {
33
36
  throw new Error(`Could not find a file at path '${modulePath}'`);
34
37
  }
35
- AddNestModuleController(moduleSourceFile, controllerClass, [
38
+ add_nest_module_controller_1.AddNestModuleController(moduleSourceFile, controllerClass, [
36
39
  {
37
40
  namedImports: [controllerClass],
38
41
  moduleSpecifier: './' + moduleSourceFile.getRelativePathTo(sourceFile).replace(/\.ts$/, ''),
@@ -41,4 +44,5 @@ export function AddNestController(project, name, options = {}) {
41
44
  }
42
45
  return sourceFile;
43
46
  }
47
+ exports.AddNestController = AddNestController;
44
48
  //# 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,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AASvE,MAAM,UAAU,iBAAiB,CAC/B,OAAgB,EAChB,IAAY,EACZ,UAAoC,EAAE;;IAGtC,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,gBAAgB,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAA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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,10 +1,14 @@
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) {
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) {
5
8
  sourceFile.addImportDeclarations(structures);
6
- const metadata = GetNestModuleMetadata(sourceFile);
7
- const providerArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'controllers');
8
- AddNestProviderToArray(controller, providerArray, overwrite);
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);
9
12
  }
13
+ exports.AddNestModuleController = AddNestModuleController;
10
14
  //# 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,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
+ {"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,9 +1,12 @@
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) {
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) {
4
7
  sourceFile.addImportDeclarations(structures);
5
- const metadata = GetNestModuleMetadata(sourceFile);
6
- const importsArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'imports');
8
+ const metadata = get_nest_module_metadata_1.GetNestModuleMetadata(sourceFile);
9
+ const importsArray = get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral(metadata, 'imports');
7
10
  const hasModule = importsArray.getElements().find(element => element.getFullText().trim().startsWith(moduleName));
8
11
  if (!hasModule || overwrite) {
9
12
  if (hasModule) {
@@ -12,4 +15,5 @@ export function AddNestModuleImport(sourceFile, moduleName, structures = [], imp
12
15
  importsArray.addElement(importWriter !== null && importWriter !== void 0 ? importWriter : moduleName);
13
16
  }
14
17
  }
18
+ exports.AddNestModuleImport = AddNestModuleImport;
15
19
  //# 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,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sCAAsC,EAAE,MAAM,iDAAiD,CAAC;AAEzG,MAAM,UAAU,mBAAmB,CACjC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,YAA6B,EAC7B,YAAqB,KAAK;IAG1B,UAAU,CAAC,qBAAqB,CAAC,UAAU,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Y,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;SACvD;QAED,YAAY,CAAC,UAAU,CAAC,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,UAAU,CAAC,CAAC;KAErD;AAEH,CAAC;AA1BD,kDA0BC"}
@@ -1,10 +1,14 @@
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) {
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) {
5
8
  sourceFile.addImportDeclarations(structures);
6
- const metadata = GetNestModuleMetadata(sourceFile);
7
- const providerArray = GetCoerceArrayLiteralFromObjectLiteral(metadata, 'providers');
8
- AddNestProviderToArray(providerObject, providerArray, overwrite);
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);
9
12
  }
13
+ exports.AddNestModuleProvider = AddNestModuleProvider;
10
14
  //# 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,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
+ {"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,6 +1,9 @@
1
- import { ObjectLiteralExpression, PropertyAssignment, Writers } from 'ts-morph';
2
- import { DeleteUndefinedProperties } from '@rxap/schematics-utilities';
3
- export function AddNestProviderToArray(providerObject, providerArray, overwrite = false) {
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) {
4
7
  if (typeof providerObject === 'string') {
5
8
  if (!providerArray.getElements().some(element => element.getFullText().trim() === providerObject)) {
6
9
  providerArray.addElement(providerObject);
@@ -9,9 +12,9 @@ export function AddNestProviderToArray(providerObject, providerArray, overwrite
9
12
  else {
10
13
  const index = providerArray.getElements().findIndex(element => {
11
14
  var _a;
12
- if (element instanceof ObjectLiteralExpression) {
15
+ if (element instanceof ts_morph_1.ObjectLiteralExpression) {
13
16
  const provideProperty = element.getProperty('provide');
14
- if (provideProperty instanceof PropertyAssignment) {
17
+ if (provideProperty instanceof ts_morph_1.PropertyAssignment) {
15
18
  return ((_a = provideProperty.getInitializer()) === null || _a === void 0 ? void 0 : _a.getFullText().trim()) === providerObject.provide;
16
19
  }
17
20
  }
@@ -21,7 +24,7 @@ export function AddNestProviderToArray(providerObject, providerArray, overwrite
21
24
  providerArray.removeElement(index);
22
25
  }
23
26
  if (overwrite || index === -1) {
24
- providerArray.addElement(Writers.object(DeleteUndefinedProperties({
27
+ providerArray.addElement(ts_morph_1.Writers.object(schematics_utilities_1.DeleteUndefinedProperties({
25
28
  provide: providerObject.provide,
26
29
  useClass: providerObject.useClass,
27
30
  useFactory: providerObject.useFactory,
@@ -33,4 +36,5 @@ export function AddNestProviderToArray(providerObject, providerArray, overwrite
33
36
  }
34
37
  }
35
38
  }
39
+ exports.AddNestProviderToArray = AddNestProviderToArray;
36
40
  //# 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,OAAO,EAA0B,uBAAuB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAA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AAC,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
+ {"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,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,kCAAuB,EAAE;gBAC9C,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBACvD,IAAI,eAAe,YAAY,6BAAkB,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,kBAAO,CAAC,MAAM,CAAC,gDAAyB,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;AA1CD,wDA0CC"}
@@ -1,7 +1,11 @@
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);
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);
6
9
  }
10
+ exports.FindNestModuleDeclaration = FindNestModuleDeclaration;
7
11
  //# 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,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
+ {"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,6 +1,10 @@
1
- import { HasNestModuleClass } from './has-nest-module-class';
2
- export function FindNestModuleSourceFile(project, directory) {
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) {
3
6
  return project.getSourceFile(file => (!directory || file.getDirectoryPath() === directory) &&
4
- HasNestModuleClass(file));
7
+ has_nest_module_class_1.HasNestModuleClass(file));
5
8
  }
9
+ exports.FindNestModuleSourceFile = FindNestModuleSourceFile;
6
10
  //# 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,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
+ {"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,15 +1,19 @@
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);
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);
6
9
  if (!classDeclaration) {
7
10
  throw new Error(`The sourceFile '${sourceFile.getFilePath()}' does not have a NestJs Module class.`);
8
11
  }
9
- const [metadata] = GetClassDecoratorArguments(classDeclaration, 'Module');
10
- if (!(metadata instanceof ObjectLiteralExpression)) {
12
+ const [metadata] = get_class_decorator_arguments_1.GetClassDecoratorArguments(classDeclaration, 'Module');
13
+ if (!(metadata instanceof ts_morph_1.ObjectLiteralExpression)) {
11
14
  throw new Error(`The NestJs Module class in the sourceFile '${sourceFile.getFilePath()}' does not have the @Module decorator with a metadata object literal expression.`);
12
15
  }
13
16
  return metadata;
14
17
  }
18
+ exports.GetNestModuleMetadata = GetNestModuleMetadata;
15
19
  //# 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,OAAO,EAAE,uBAAuB,EAAc,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,MAAM,UAAU,qBAAqB,CAAC,UAAsB;IAE1D,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,iBAAiB,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,0BAA0B,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAE5E,IAAI,CAAC,CAAC,QAAQ,YAAY,uBAAuB,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CAA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