@pegasusheavy/nestjs-prisma-graphql 1.4.3 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +18 -7
  2. package/dist/benchmark/analysis.d.ts +7 -0
  3. package/dist/benchmark/analysis.d.ts.map +1 -0
  4. package/dist/benchmark/analysis.js +265 -0
  5. package/dist/benchmark/analysis.js.map +1 -0
  6. package/dist/benchmark/index.d.ts +7 -0
  7. package/dist/benchmark/index.d.ts.map +1 -0
  8. package/dist/benchmark/index.js +272 -0
  9. package/dist/benchmark/index.js.map +1 -0
  10. package/dist/event-names.d.ts +2 -0
  11. package/dist/event-names.d.ts.map +1 -0
  12. package/dist/event-names.js +2 -0
  13. package/dist/event-names.js.map +1 -0
  14. package/dist/generate.d.ts +4 -140
  15. package/dist/generate.d.ts.map +1 -0
  16. package/dist/generate.js +199 -2826
  17. package/dist/generate.js.map +1 -1
  18. package/dist/handlers/args-type.d.ts +7 -0
  19. package/dist/handlers/args-type.d.ts.map +1 -0
  20. package/dist/handlers/args-type.js +68 -0
  21. package/dist/handlers/args-type.js.map +1 -0
  22. package/dist/handlers/combine-scalar-filters.d.ts +6 -0
  23. package/dist/handlers/combine-scalar-filters.d.ts.map +1 -0
  24. package/dist/handlers/combine-scalar-filters.js +110 -0
  25. package/dist/handlers/combine-scalar-filters.js.map +1 -0
  26. package/dist/handlers/create-aggregate-input.d.ts +10 -0
  27. package/dist/handlers/create-aggregate-input.d.ts.map +1 -0
  28. package/dist/handlers/create-aggregate-input.js +33 -0
  29. package/dist/handlers/create-aggregate-input.js.map +1 -0
  30. package/dist/handlers/decimal-helpers.d.ts +10 -0
  31. package/dist/handlers/decimal-helpers.d.ts.map +1 -0
  32. package/dist/handlers/decimal-helpers.js +73 -0
  33. package/dist/handlers/decimal-helpers.js.map +1 -0
  34. package/dist/handlers/emit-single.d.ts +3 -0
  35. package/dist/handlers/emit-single.d.ts.map +1 -0
  36. package/dist/handlers/emit-single.js +14 -0
  37. package/dist/handlers/emit-single.js.map +1 -0
  38. package/dist/handlers/generate-barrel-exports.d.ts +13 -0
  39. package/dist/handlers/generate-barrel-exports.d.ts.map +1 -0
  40. package/dist/handlers/generate-barrel-exports.js +73 -0
  41. package/dist/handlers/generate-barrel-exports.js.map +1 -0
  42. package/dist/handlers/generate-files.d.ts +3 -0
  43. package/dist/handlers/generate-files.d.ts.map +1 -0
  44. package/dist/handlers/generate-files.js +133 -0
  45. package/dist/handlers/generate-files.js.map +1 -0
  46. package/dist/handlers/input-type.d.ts +7 -0
  47. package/dist/handlers/input-type.d.ts.map +1 -0
  48. package/dist/handlers/input-type.js +297 -0
  49. package/dist/handlers/input-type.js.map +1 -0
  50. package/dist/handlers/model-data.d.ts +3 -0
  51. package/dist/handlers/model-data.d.ts.map +1 -0
  52. package/dist/handlers/model-data.js +27 -0
  53. package/dist/handlers/model-data.js.map +1 -0
  54. package/dist/handlers/model-output-type.d.ts +3 -0
  55. package/dist/handlers/model-output-type.d.ts.map +1 -0
  56. package/dist/handlers/model-output-type.js +283 -0
  57. package/dist/handlers/model-output-type.js.map +1 -0
  58. package/dist/handlers/no-atomic-operations.d.ts +3 -0
  59. package/dist/handlers/no-atomic-operations.d.ts.map +1 -0
  60. package/dist/handlers/no-atomic-operations.js +41 -0
  61. package/dist/handlers/no-atomic-operations.js.map +1 -0
  62. package/dist/handlers/output-type.d.ts +3 -0
  63. package/dist/handlers/output-type.d.ts.map +1 -0
  64. package/dist/handlers/output-type.js +179 -0
  65. package/dist/handlers/output-type.js.map +1 -0
  66. package/dist/handlers/patch-type-registry.d.ts +16 -0
  67. package/dist/handlers/patch-type-registry.d.ts.map +1 -0
  68. package/dist/handlers/patch-type-registry.js +47 -0
  69. package/dist/handlers/patch-type-registry.js.map +1 -0
  70. package/dist/handlers/post-process-imports.d.ts +11 -0
  71. package/dist/handlers/post-process-imports.d.ts.map +1 -0
  72. package/dist/handlers/post-process-imports.js +44 -0
  73. package/dist/handlers/post-process-imports.js.map +1 -0
  74. package/dist/handlers/prisma-enum-doc.d.ts +11 -0
  75. package/dist/handlers/prisma-enum-doc.d.ts.map +1 -0
  76. package/dist/handlers/prisma-enum-doc.js +16 -0
  77. package/dist/handlers/prisma-enum-doc.js.map +1 -0
  78. package/dist/handlers/purge-output.d.ts +3 -0
  79. package/dist/handlers/purge-output.d.ts.map +1 -0
  80. package/dist/handlers/purge-output.js +34 -0
  81. package/dist/handlers/purge-output.js.map +1 -0
  82. package/dist/handlers/re-export.d.ts +9 -0
  83. package/dist/handlers/re-export.d.ts.map +1 -0
  84. package/dist/handlers/re-export.js +101 -0
  85. package/dist/handlers/re-export.js.map +1 -0
  86. package/dist/handlers/register-all-types.d.ts +13 -0
  87. package/dist/handlers/register-all-types.d.ts.map +1 -0
  88. package/dist/handlers/register-all-types.js +99 -0
  89. package/dist/handlers/register-all-types.js.map +1 -0
  90. package/dist/handlers/register-enum.d.ts +3 -0
  91. package/dist/handlers/register-enum.d.ts.map +1 -0
  92. package/dist/handlers/register-enum.js +65 -0
  93. package/dist/handlers/register-enum.js.map +1 -0
  94. package/dist/handlers/require-single-fields-in-whereunique-input.d.ts +3 -0
  95. package/dist/handlers/require-single-fields-in-whereunique-input.d.ts.map +1 -0
  96. package/dist/handlers/require-single-fields-in-whereunique-input.js +15 -0
  97. package/dist/handlers/require-single-fields-in-whereunique-input.js.map +1 -0
  98. package/dist/handlers/type-registry.d.ts +14 -0
  99. package/dist/handlers/type-registry.d.ts.map +1 -0
  100. package/dist/handlers/type-registry.js +151 -0
  101. package/dist/handlers/type-registry.js.map +1 -0
  102. package/dist/handlers/warning.d.ts +2 -0
  103. package/dist/handlers/warning.d.ts.map +1 -0
  104. package/dist/handlers/warning.js +14 -0
  105. package/dist/handlers/warning.js.map +1 -0
  106. package/dist/helpers/create-comment.d.ts +3 -0
  107. package/dist/helpers/create-comment.d.ts.map +1 -0
  108. package/dist/helpers/create-comment.js +23 -0
  109. package/dist/helpers/create-comment.js.map +1 -0
  110. package/dist/helpers/create-config.d.ts +51 -0
  111. package/dist/helpers/create-config.d.ts.map +1 -0
  112. package/dist/helpers/create-config.js +165 -0
  113. package/dist/helpers/create-config.js.map +1 -0
  114. package/dist/helpers/create-emit-blocks.d.ts +5 -0
  115. package/dist/helpers/create-emit-blocks.d.ts.map +1 -0
  116. package/dist/helpers/create-emit-blocks.js +37 -0
  117. package/dist/helpers/create-emit-blocks.js.map +1 -0
  118. package/dist/helpers/detect-circular-deps.d.ts +28 -0
  119. package/dist/helpers/detect-circular-deps.d.ts.map +1 -0
  120. package/dist/helpers/detect-circular-deps.js +92 -0
  121. package/dist/helpers/detect-circular-deps.js.map +1 -0
  122. package/dist/helpers/factory-get-source-file.d.ts +13 -0
  123. package/dist/helpers/factory-get-source-file.d.ts.map +1 -0
  124. package/dist/helpers/factory-get-source-file.js +17 -0
  125. package/dist/helpers/factory-get-source-file.js.map +1 -0
  126. package/dist/helpers/file-type-by-location.d.ts +3 -0
  127. package/dist/helpers/file-type-by-location.d.ts.map +1 -0
  128. package/dist/helpers/file-type-by-location.js +19 -0
  129. package/dist/helpers/file-type-by-location.js.map +1 -0
  130. package/dist/helpers/generate-file-name.d.ts +7 -0
  131. package/dist/helpers/generate-file-name.d.ts.map +1 -0
  132. package/dist/helpers/generate-file-name.js +35 -0
  133. package/dist/helpers/generate-file-name.js.map +1 -0
  134. package/dist/helpers/get-enum-name.d.ts +2 -0
  135. package/dist/helpers/get-enum-name.d.ts.map +1 -0
  136. package/dist/helpers/get-enum-name.js +5 -0
  137. package/dist/helpers/get-enum-name.js.map +1 -0
  138. package/dist/helpers/get-graphql-import.d.ts +19 -0
  139. package/dist/helpers/get-graphql-import.d.ts.map +1 -0
  140. package/dist/helpers/get-graphql-import.js +52 -0
  141. package/dist/helpers/get-graphql-import.js.map +1 -0
  142. package/dist/helpers/get-graphql-input-type.d.ts +6 -0
  143. package/dist/helpers/get-graphql-input-type.d.ts.map +1 -0
  144. package/dist/helpers/get-graphql-input-type.js +64 -0
  145. package/dist/helpers/get-graphql-input-type.js.map +1 -0
  146. package/dist/helpers/get-model-name.d.ts +2 -0
  147. package/dist/helpers/get-model-name.d.ts.map +1 -0
  148. package/dist/helpers/get-model-name.js +130 -0
  149. package/dist/helpers/get-model-name.js.map +1 -0
  150. package/dist/helpers/get-output-type-name.d.ts +2 -0
  151. package/dist/helpers/get-output-type-name.d.ts.map +1 -0
  152. package/dist/helpers/get-output-type-name.js +4 -0
  153. package/dist/helpers/get-output-type-name.js.map +1 -0
  154. package/dist/helpers/get-property-type.d.ts +9 -0
  155. package/dist/helpers/get-property-type.d.ts.map +1 -0
  156. package/dist/helpers/get-property-type.js +48 -0
  157. package/dist/helpers/get-property-type.js.map +1 -0
  158. package/dist/helpers/get-where-unique-at-least-keys.d.ts +3 -0
  159. package/dist/helpers/get-where-unique-at-least-keys.d.ts.map +1 -0
  160. package/dist/helpers/get-where-unique-at-least-keys.js +17 -0
  161. package/dist/helpers/get-where-unique-at-least-keys.js.map +1 -0
  162. package/dist/helpers/import-declaration-map.d.ts +19 -0
  163. package/dist/helpers/import-declaration-map.d.ts.map +1 -0
  164. package/dist/helpers/import-declaration-map.js +69 -0
  165. package/dist/helpers/import-declaration-map.js.map +1 -0
  166. package/dist/helpers/is-many-and-return.d.ts +2 -0
  167. package/dist/helpers/is-many-and-return.d.ts.map +1 -0
  168. package/dist/helpers/is-many-and-return.js +9 -0
  169. package/dist/helpers/is-many-and-return.js.map +1 -0
  170. package/dist/helpers/is-where-unique-input-type.d.ts +2 -0
  171. package/dist/helpers/is-where-unique-input-type.d.ts.map +1 -0
  172. package/dist/helpers/is-where-unique-input-type.js +4 -0
  173. package/dist/helpers/is-where-unique-input-type.js.map +1 -0
  174. package/dist/helpers/object-settings.d.ts +39 -0
  175. package/dist/helpers/object-settings.d.ts.map +1 -0
  176. package/dist/helpers/object-settings.js +297 -0
  177. package/dist/helpers/object-settings.js.map +1 -0
  178. package/dist/helpers/pascal-case.d.ts +2 -0
  179. package/dist/helpers/pascal-case.d.ts.map +1 -0
  180. package/dist/helpers/pascal-case.js +5 -0
  181. package/dist/helpers/pascal-case.js.map +1 -0
  182. package/dist/helpers/property-structure.d.ts +13 -0
  183. package/dist/helpers/property-structure.d.ts.map +1 -0
  184. package/dist/helpers/property-structure.js +20 -0
  185. package/dist/helpers/property-structure.js.map +1 -0
  186. package/dist/helpers/relative-path.d.ts +2 -0
  187. package/dist/helpers/relative-path.d.ts.map +1 -0
  188. package/dist/helpers/relative-path.js +20 -0
  189. package/dist/helpers/relative-path.js.map +1 -0
  190. package/dist/helpers/type-safe-assert.d.ts +7 -0
  191. package/dist/helpers/type-safe-assert.d.ts.map +1 -0
  192. package/dist/helpers/type-safe-assert.js +10 -0
  193. package/dist/helpers/type-safe-assert.js.map +1 -0
  194. package/dist/helpers/update-object-property.d.ts +7 -0
  195. package/dist/helpers/update-object-property.d.ts.map +1 -0
  196. package/dist/helpers/update-object-property.js +21 -0
  197. package/dist/helpers/update-object-property.js.map +1 -0
  198. package/dist/index.d.ts +4 -6
  199. package/dist/index.d.ts.map +1 -0
  200. package/dist/index.js +135 -2956
  201. package/dist/index.js.map +1 -1
  202. package/dist/test/test-utils.d.ts +4 -0
  203. package/dist/test/test-utils.d.ts.map +1 -0
  204. package/dist/test/test-utils.js +14 -0
  205. package/dist/test/test-utils.js.map +1 -0
  206. package/dist/types.d.ts +73 -0
  207. package/dist/types.d.ts.map +1 -0
  208. package/dist/types.js +2 -0
  209. package/dist/types.js.map +1 -0
  210. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-output-type.js","sourceRoot":"","sources":["../../src/handlers/model-output-type.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,aAAa,GACd,MAAM,UAAU,CAAC;AAElB,OAA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B;YACjD,SAAS,CAAC,YAA2C,CAAC,IAAI,CACzD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAClC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EventEmitter } from '../types.js';
2
+ export declare function noAtomicOperations(eventEmitter: EventEmitter): void;
3
+ //# sourceMappingURL=no-atomic-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-atomic-operations.d.ts","sourceRoot":"","sources":["../../src/handlers/no-atomic-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAa,MAAM,aAAa,CAAC;AAE3E,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAGnE"}
@@ -0,0 +1,41 @@
1
+ export function noAtomicOperations(eventEmitter) {
2
+ eventEmitter.on('BeforeInputType', beforeInputType);
3
+ eventEmitter.on('BeforeGenerateFiles', beforeGenerateFiles);
4
+ }
5
+ function beforeInputType(args) {
6
+ const { getModelName, inputType } = args;
7
+ for (const field of inputType.fields) {
8
+ const fieldName = field.name;
9
+ field.inputTypes = field.inputTypes.filter(it => {
10
+ const inputTypeName = it.type;
11
+ const modelName = getModelName(inputTypeName);
12
+ const isModelNameValid = modelName !== null && modelName !== undefined && modelName.length > 0;
13
+ if (isAtomicOperation(inputTypeName) ||
14
+ (isModelNameValid && isListInput(inputTypeName, modelName, fieldName))) {
15
+ return false;
16
+ }
17
+ return true;
18
+ });
19
+ }
20
+ }
21
+ function beforeGenerateFiles(args) {
22
+ const { project } = args;
23
+ for (const sourceFile of project.getSourceFiles()) {
24
+ const className = sourceFile.getClass(() => true)?.getName();
25
+ const isClassNameValid = className !== undefined && className !== null && className.length > 0;
26
+ if (isClassNameValid && isAtomicOperation(className)) {
27
+ project.removeSourceFile(sourceFile);
28
+ }
29
+ }
30
+ }
31
+ function isAtomicOperation(typeName) {
32
+ if (typeName.endsWith('FieldUpdateOperationsInput')) {
33
+ return true;
34
+ }
35
+ return false;
36
+ }
37
+ function isListInput(typeName, model, field) {
38
+ return (typeName === `${model}Create${field}Input` ||
39
+ typeName === `${model}Update${field}Input`);
40
+ }
41
+ //# sourceMappingURL=no-atomic-operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-atomic-operations.js","sourceRoot":"","sources":["../../src/handlers/no-atomic-operations.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,YAA0B;IAC3D,YAAY,CAAC,EAAE,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,eAAe,CAAC,IAA+C;IACtE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAEzC,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;QAC7B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;YAC9C,MAAM,aAAa,GAAG,EAAE,CAAC,IAAI,CAAC;YAC9B,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;YAE9C,MAAM,gBAAgB,GACpB,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;YACxE,IACE,iBAAiB,CAAC,aAAa,CAAC;gBAChC,CAAC,gBAAgB,IAAI,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,EACtE,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAoB;IAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEzB,KAAK,MAAM,UAAU,IAAI,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;QAE7D,MAAM,gBAAgB,GACpB,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;QACxE,IAAI,gBAAgB,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;YACrD,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,IAAI,QAAQ,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,QAAgB,EAAE,KAAa,EAAE,KAAa;IACjE,OAAO,CACL,QAAQ,KAAK,GAAG,KAAK,SAAS,KAAK,OAAO;QAC1C,QAAQ,KAAK,GAAG,KAAK,SAAS,KAAK,OAAO,CAC3C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EventArguments, OutputType } from '../types.js';
2
+ export declare function outputType(outputTypeArg: OutputType, args: EventArguments): void;
3
+ //# sourceMappingURL=output-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-type.d.ts","sourceRoot":"","sources":["../../src/handlers/output-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAkB,UAAU,EAAE,MAAM,aAAa,CAAC;AAgB9E,wBAAgB,UAAU,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CA0MhF"}
@@ -0,0 +1,179 @@
1
+ import JSON5 from 'json5';
2
+ import { castArray } from 'lodash-es';
3
+ import { StructureKind } from 'ts-morph';
4
+ import { getEnumName } from '../helpers/get-enum-name.js';
5
+ import { getGraphqlImport } from '../helpers/get-graphql-import.js';
6
+ import { getOutputTypeName } from '../helpers/get-output-type-name.js';
7
+ import { getPropertyType } from '../helpers/get-property-type.js';
8
+ import { ImportDeclarationMap } from '../helpers/import-declaration-map.js';
9
+ import { propertyStructure } from '../helpers/property-structure.js';
10
+ import { ok } from '../helpers/type-safe-assert.js';
11
+ const nestjsGraphql = '@nestjs/graphql';
12
+ export function outputType(outputTypeArg, args) {
13
+ const { config, eventEmitter, fieldSettings, getModelName, getSourceFile, models } = args;
14
+ const importDeclarations = new ImportDeclarationMap();
15
+ const fileType = 'output';
16
+ const modelName = getModelName(outputTypeArg.name);
17
+ const model = modelName === undefined ? undefined : models.get(modelName);
18
+ const isAggregateOutput = model !== undefined &&
19
+ /(?:Count|Avg|Sum|Min|Max)AggregateOutputType$/.test(outputTypeArg.name) &&
20
+ outputTypeArg.name.startsWith(model.name);
21
+ const isCountOutput = model?.name !== undefined &&
22
+ model.name !== '' &&
23
+ outputTypeArg.name === `${model.name}CountOutputType`;
24
+ if (config.emitBlocks.outputs || isCountOutput) {
25
+ // Continue with output generation
26
+ }
27
+ else {
28
+ return;
29
+ }
30
+ // Get rid of bogus suffixes
31
+ // eslint-disable-next-line no-param-reassign
32
+ outputTypeArg.name = getOutputTypeName(outputTypeArg.name);
33
+ if (isAggregateOutput) {
34
+ eventEmitter.emitSync('AggregateOutput', { ...args, outputType: outputTypeArg });
35
+ }
36
+ const sourceFile = getSourceFile({
37
+ name: outputTypeArg.name,
38
+ type: fileType,
39
+ });
40
+ const classStructure = {
41
+ decorators: [
42
+ {
43
+ arguments: [],
44
+ name: 'ObjectType',
45
+ },
46
+ ],
47
+ isExported: true,
48
+ kind: StructureKind.Class,
49
+ name: outputTypeArg.name,
50
+ properties: [],
51
+ };
52
+ importDeclarations.add('Field', nestjsGraphql);
53
+ importDeclarations.add('ObjectType', nestjsGraphql);
54
+ for (const field of outputTypeArg.fields) {
55
+ const { isList, location, type } = field.outputType;
56
+ const outputTypeName = getOutputTypeName(type);
57
+ let settings;
58
+ if (isCountOutput) {
59
+ settings = undefined;
60
+ }
61
+ else if (model === undefined) {
62
+ settings = undefined;
63
+ }
64
+ else {
65
+ settings = fieldSettings.get(model.name)?.get(field.name);
66
+ }
67
+ const propertySettings = settings?.getPropertyType({
68
+ name: outputTypeArg.name,
69
+ output: true,
70
+ });
71
+ const isCustomsApplicable = outputTypeName === model?.fields.find(f => f.name === field.name)?.type;
72
+ field.outputType.type = outputTypeName;
73
+ const propertyType = castArray(propertySettings?.name ??
74
+ getPropertyType({
75
+ location,
76
+ type: outputTypeName,
77
+ }));
78
+ const property = propertyStructure({
79
+ hasQuestionToken: isCountOutput ? true : undefined,
80
+ isList,
81
+ isNullable: field.isNullable,
82
+ name: field.name,
83
+ propertyType,
84
+ });
85
+ classStructure.properties?.push(property);
86
+ if (propertySettings !== undefined) {
87
+ importDeclarations.create({ ...propertySettings });
88
+ }
89
+ else if (propertyType.some(p => p.includes('Prisma.Decimal'))) {
90
+ importDeclarations.add('Prisma', config.prismaClientImport);
91
+ }
92
+ // Get graphql type
93
+ let graphqlType;
94
+ const shouldHideField = settings?.shouldHideField({
95
+ name: outputTypeArg.name,
96
+ output: true,
97
+ }) === true ||
98
+ config.decorate.some(d => d.name === 'HideField' &&
99
+ d.from === '@nestjs/graphql' &&
100
+ d.isMatchField(field.name) &&
101
+ d.isMatchType(outputTypeName));
102
+ const fieldType = settings?.getFieldType({
103
+ name: outputTypeArg.name,
104
+ output: true,
105
+ });
106
+ if (fieldType !== undefined && isCustomsApplicable && !shouldHideField) {
107
+ graphqlType = fieldType.name;
108
+ importDeclarations.create({ ...fieldType });
109
+ }
110
+ else {
111
+ const graphqlImport = getGraphqlImport({
112
+ config,
113
+ fileType,
114
+ getSourceFile,
115
+ isId: false,
116
+ location,
117
+ sourceFile,
118
+ typeName: outputTypeName,
119
+ });
120
+ const referenceName = location === 'enumTypes' ? getEnumName(propertyType[0]) : propertyType[0];
121
+ graphqlType = graphqlImport.name;
122
+ if (graphqlImport.specifier !== null &&
123
+ graphqlImport.specifier !== undefined &&
124
+ graphqlImport.specifier.length > 0 &&
125
+ !importDeclarations.has(graphqlImport.name) &&
126
+ ((graphqlImport.name !== outputTypeArg.name && !shouldHideField) ||
127
+ (shouldHideField && referenceName === graphqlImport.name))) {
128
+ importDeclarations.set(graphqlImport.name, {
129
+ moduleSpecifier: graphqlImport.specifier,
130
+ namedImports: [{ name: graphqlImport.name }],
131
+ });
132
+ }
133
+ }
134
+ ok(property.decorators !== undefined, 'property.decorators is undefined');
135
+ if (shouldHideField) {
136
+ importDeclarations.add('HideField', nestjsGraphql);
137
+ property.decorators.push({ arguments: [], name: 'HideField' });
138
+ }
139
+ else {
140
+ // Generate `@Field()` decorator
141
+ property.decorators.push({
142
+ arguments: [
143
+ isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`,
144
+ JSON5.stringify({
145
+ ...settings?.fieldArguments(),
146
+ nullable: Boolean(field.isNullable),
147
+ }),
148
+ ],
149
+ name: 'Field',
150
+ });
151
+ if (isCustomsApplicable) {
152
+ for (const options of settings ?? []) {
153
+ const shouldApplyDecorator = options.kind === 'Decorator' &&
154
+ options.output &&
155
+ (options.match?.(field.name) ?? true);
156
+ if (shouldApplyDecorator) {
157
+ property.decorators.push({
158
+ arguments: options.arguments,
159
+ name: options.name,
160
+ });
161
+ ok(options.from !== null &&
162
+ options.from !== undefined &&
163
+ options.from.length > 0, "Missed 'from' part in configuration or field setting");
164
+ importDeclarations.create(options);
165
+ }
166
+ }
167
+ }
168
+ }
169
+ eventEmitter.emitSync('ClassProperty', property, {
170
+ isList,
171
+ location,
172
+ propertyType,
173
+ });
174
+ }
175
+ sourceFile.set({
176
+ statements: [...importDeclarations.toStatements(), classStructure],
177
+ });
178
+ }
179
+ //# sourceMappingURL=output-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-type.js","sourceRoot":"","sources":["../../src/handlers/output-type.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAkC,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC,MAAM,UAAU,UAAU,CAAC,aAAyB,EAAE,IAAoB;IACxE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,GAChF,IAAI,CAAC;IACP,MAAM,kBAAkB,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAEtD,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1E,MAAM,iBAAiB,GACrB,KAAK,KAAK,SAAS;QACnB,+CAA+C,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;QACxE,aA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,EAAE,cAAc,EAAE;wBAC7B,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;qBACpC,CAAC;iBACH;gBACD,IAAI,EAAE,OAAO;aACd,CAAC,CAAC;YAEH,IAAI,mBAAmB,EAAE,CAAC;gBACxB,KAAK,MAAM,OAAO,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;oBACrC,MAAM,oBAAoB,GACxB,OAAO,CAAC,IAAI,KAAK,WAAW;wBAC5B,OAAO,CAAC,MAAM;wBACd,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;oBAExC,IAAI,oBAAoB,EAAE,CAAC;wBACzB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;4BACvB,SAAS,EAAE,OAAO,CAAC,SAAqB;4BACxC,IAAI,EAAE,OAAO,CAAC,IAAI;yBACnB,CAAC,CAAC;wBACH,EAAE,CACA,OAAO,CAAC,IAAI,KAAK,IAAI;4BACnB,OAAO,CAAC,IAAI,KAAK,SAAS;4BAC1B,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EACzB,sDAAsD,CACvD,CAAC;wBACF,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;oBACrC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE;YAC/C,MAAM;YACN,QAAQ;YACR,YAAY;SACb,CAAC,CAAC;IACL,CAAC;IAED,UAAU,CAAC,GAAG,CAAC;QACb,UAAU,EAAE,CAAC,GAAG,kBAAkB,CAAC,YAAY,EAAE,EAAE,cAAc,CAAC;KACnE,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { EventArguments } from '../types.js';
2
+ /**
3
+ * Patches the generated type-registry file to make TypeScript happy:
4
+ *
5
+ * 1. Rewrite getType<T = unknown> to getType<T = any>
6
+ * The generator emits @Field(() => getType('Foo')) without explicit type args.
7
+ * With T = unknown, the return value isn't assignable to @nestjs/graphql's
8
+ * ReturnTypeFuncValue, causing TS2322 errors. any is assignable.
9
+ *
10
+ * 2. Prepend // @ts-nocheck to all generated files
11
+ * The generator has edge cases on deep relations that leave some imports
12
+ * pointing at truncated filenames. Files work at runtime (registry resolves
13
+ * types lazily) but tsc --noEmit rejects them.
14
+ */
15
+ export declare function patchTypeRegistry(args: EventArguments): void;
16
+ //# sourceMappingURL=patch-type-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patch-type-registry.d.ts","sourceRoot":"","sources":["../../src/handlers/patch-type-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAsC5D"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Patches the generated type-registry file to make TypeScript happy:
3
+ *
4
+ * 1. Rewrite getType<T = unknown> to getType<T = any>
5
+ * The generator emits @Field(() => getType('Foo')) without explicit type args.
6
+ * With T = unknown, the return value isn't assignable to @nestjs/graphql's
7
+ * ReturnTypeFuncValue, causing TS2322 errors. any is assignable.
8
+ *
9
+ * 2. Prepend // @ts-nocheck to all generated files
10
+ * The generator has edge cases on deep relations that leave some imports
11
+ * pointing at truncated filenames. Files work at runtime (registry resolves
12
+ * types lazily) but tsc --noEmit rejects them.
13
+ */
14
+ export function patchTypeRegistry(args) {
15
+ const { output, project } = args;
16
+ // type-registry is always .ts regardless of outputFilePattern
17
+ const registryFile = project.getSourceFile(`${output}/type-registry.ts`);
18
+ if (!registryFile) {
19
+ console.warn('nestjs-prisma-graphql: type-registry file not found, skipping patch');
20
+ return;
21
+ }
22
+ // Patch 1: <T = unknown> → <T = any>
23
+ const content = registryFile.getText();
24
+ const patched = content.replace(/<T = unknown>/g, '<T = any>');
25
+ if (patched !== content) {
26
+ registryFile.replaceWithText(patched);
27
+ console.log('nestjs-prisma-graphql: patched type-registry <T = unknown> → <T = any>');
28
+ }
29
+ // Patch 2: Prepend // @ts-nocheck to all generated files (if enabled)
30
+ // This suppresses type errors from truncated filenames on deep relations
31
+ if (args.config.esmSuppressTypeErrors) {
32
+ const _extension = args.config.outputFilePattern?.includes('.js') ? '.js' : '.ts';
33
+ const allSourceFiles = project.getSourceFiles(`${output}/**/*.{ts,js}`);
34
+ let nocheckCount = 0;
35
+ for (const sourceFile of allSourceFiles) {
36
+ const text = sourceFile.getText();
37
+ if (!text.startsWith('// @ts-nocheck')) {
38
+ sourceFile.replaceWithText(`// @ts-nocheck\n${text}`);
39
+ nocheckCount++;
40
+ }
41
+ }
42
+ if (nocheckCount > 0) {
43
+ console.log(`nestjs-prisma-graphql: added // @ts-nocheck to ${nocheckCount} files`);
44
+ }
45
+ }
46
+ }
47
+ //# sourceMappingURL=patch-type-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patch-type-registry.js","sourceRoot":"","sources":["../../src/handlers/patch-type-registry.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAoB;IACpD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEjC,8DAA8D;IAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,MAAM,mBAAmB,CAAC,CAAC;IAEzE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;QACpF,OAAO;IACT,CAAC;IAED,qCAAqC;IACrC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;IACvC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IAC/D,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,YAAY,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACxF,CAAC;IAED,sEAAsE;IACtE,yEAAyE;IACzE,IAAI,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAClF,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,MAAM,eAAe,CAAC,CAAC;QACxE,IAAI,YAAY,GAAG,CAAC,CAAC;QAErB,KAAK,MAAM,UAAU,IAAI,cAAc,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBACvC,UAAU,CAAC,eAAe,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;gBACtD,YAAY,EAAE,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,kDAAkD,YAAY,QAAQ,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { EventArguments } from '../types.js';
2
+ /**
3
+ * Post-process generated files to add .js extensions to relative imports
4
+ * and convert type-only imports to regular imports for ESM compatibility.
5
+ *
6
+ * This must run after all files are generated but before they're saved,
7
+ * to avoid the stack overflow that occurs when ts-morph tries to resolve
8
+ * .js extensions during generation with reExport="Directories".
9
+ */
10
+ export declare function postProcessImports(args: EventArguments): void;
11
+ //# sourceMappingURL=post-process-imports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post-process-imports.d.ts","sourceRoot":"","sources":["../../src/handlers/post-process-imports.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAkD7D"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Post-process generated files to add .js extensions to relative imports
3
+ * and convert type-only imports to regular imports for ESM compatibility.
4
+ *
5
+ * This must run after all files are generated but before they're saved,
6
+ * to avoid the stack overflow that occurs when ts-morph tries to resolve
7
+ * .js extensions during generation with reExport="Directories".
8
+ */
9
+ export function postProcessImports(args) {
10
+ const { config, output, project } = args;
11
+ if (!config.esmCompatible) {
12
+ return;
13
+ }
14
+ // Get all generated source files
15
+ const extension = config.outputFilePattern?.includes('.js') ? '.js' : '.ts';
16
+ const allSourceFiles = project.getSourceFiles(`${output}/**/*${extension}`);
17
+ let modifiedCount = 0;
18
+ for (const sourceFile of allSourceFiles) {
19
+ let modified = false;
20
+ const content = sourceFile.getText();
21
+ // Add .js to relative imports (both regular and type imports)
22
+ const withExtensions = content.replace(/from ['"](\.\.[/.][\w\-/]*(?:\/[\w\-]+)?)['"]/g, (match, importPath) => {
23
+ if (importPath && typeof importPath === 'string' && !importPath.endsWith('.js')) {
24
+ modified = true;
25
+ return `from '${importPath}.js'`;
26
+ }
27
+ return match;
28
+ });
29
+ // Convert type-only imports to regular imports
30
+ // This fixes the circular dependency issue where getType() fails
31
+ const withRegularImports = withExtensions.replace(/import\s+type\s+(\{[^}]+\})\s+from\s+['"]([^'"]+)['"]/g, (_match, imports, importPath) => {
32
+ modified = true;
33
+ return `import ${imports} from '${importPath}'`;
34
+ });
35
+ if (modified) {
36
+ sourceFile.replaceWithText(withRegularImports);
37
+ modifiedCount++;
38
+ }
39
+ }
40
+ if (modifiedCount > 0) {
41
+ console.log(`nestjs-prisma-graphql: added .js extensions and converted type imports in ${modifiedCount} files`);
42
+ }
43
+ }
44
+ //# sourceMappingURL=post-process-imports.js.map
@@ -0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AAC;YAChB,OAAO,UAAU,OAAO,UAAU,UAAU,GAAG,CAAC;QAClD,CAAC,CACF,CAAC;QAEF,IAAI,QAAQ,EAAE,CAAC;YACb,UAAU,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;YAC/C,aAAa,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IAED,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CACT,6EAA6E,aAAa,QAAQ,CACnG,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ type EnumValueDocInfo = {
2
+ description: string;
3
+ } | {
4
+ deprecationReason: string;
5
+ };
6
+ export declare function extractEnumValueDocs(values: ReadonlyArray<{
7
+ name: string;
8
+ [key: string]: unknown;
9
+ }>): Record<string, EnumValueDocInfo>;
10
+ export {};
11
+ //# sourceMappingURL=prisma-enum-doc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma-enum-doc.d.ts","sourceRoot":"","sources":["../../src/handlers/prisma-enum-doc.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,GAC9D,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAmBlC"}
@@ -0,0 +1,16 @@
1
+ export function extractEnumValueDocs(values) {
2
+ return Object.fromEntries(values
3
+ .map((value) => {
4
+ const { name } = value;
5
+ const { documentation } = value;
6
+ if (typeof documentation !== 'string') {
7
+ return null;
8
+ }
9
+ if (documentation.startsWith('@deprecated')) {
10
+ return [name, { deprecationReason: documentation.slice(11).trim() }];
11
+ }
12
+ return [name, { description: documentation }];
13
+ })
14
+ .filter((entry) => entry !== null));
15
+ }
16
+ //# sourceMappingURL=prisma-enum-doc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma-enum-doc.js","sourceRoot":"","sources":["../../src/handlers/prisma-enum-doc.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAClC,MAA+D;IAE/D,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM;SACH,GAAG,CAAC,CAAC,KAAK,EAAqC,EAAE;QAChD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;QAEhC,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAuC,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAC1E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EventEmitter } from '../types.js';
2
+ export declare function purgeOutput(emitter: EventEmitter): void;
3
+ //# sourceMappingURL=purge-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purge-output.d.ts","sourceRoot":"","sources":["../../src/handlers/purge-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,aAAa,CAAC;AAWhE,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAGvD"}
@@ -0,0 +1,34 @@
1
+ import { rmdirSync as rmdirSyncOriginal } from 'node:fs';
2
+ const rmdirTyped = rmdirSyncOriginal;
3
+ const rmdirSync = (path) => {
4
+ rmdirTyped(path);
5
+ };
6
+ export function purgeOutput(emitter) {
7
+ emitter.on('Begin', begin);
8
+ emitter.on('End', end);
9
+ }
10
+ function begin({ output, project }) {
11
+ const sourceFiles = project.getDirectory(output)?.getDescendantSourceFiles();
12
+ if (sourceFiles) {
13
+ for (const sourceFile of sourceFiles) {
14
+ sourceFile.delete();
15
+ }
16
+ }
17
+ }
18
+ function end({ output, project }) {
19
+ const directories = project
20
+ .getDirectory(output)
21
+ ?.getDescendantDirectories()
22
+ .filter(directory => directory.getSourceFiles().length === 0)
23
+ .map(directory => directory.getPath());
24
+ const directoryList = directories ?? [];
25
+ for (const directory of directoryList) {
26
+ try {
27
+ rmdirSync(directory);
28
+ }
29
+ catch {
30
+ // Ignore errors
31
+ }
32
+ }
33
+ }
34
+ //# sourceMappingURL=purge-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purge-output.js","sourceRoot":"","sources":["../../src/handlers/purge-output.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIzD,MAAM,UAAU,GAAkB,iBAAiB,CAAC;AACpD,MAAM,SAAS,GAAkB,CAAC,IAAY,EAAQ,EAAE;IACtD,UAAU,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,OAAqB;IAC/C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAkB;IAChD,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAE7E,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,UAAU,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAkB;IAC9C,MAAM,WAAW,GAAG,OAAO;SACxB,YAAY,CAAC,MAAM,CAAC;QACrB,EAAE,wBAAwB,EAAE;SAC3B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;SAC5D,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAEzC,MAAM,aAAa,GAAa,WAAW,IAAI,EAAE,CAAC;IAClD,KAAK,MAAM,SAAS,IAAI,aAAa,EAAE,CAAC;QACtC,IAAI,CAAC;YACH,SAAS,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { EventEmitter } from '../types.js';
2
+ export declare enum ReExport {
3
+ None = "None",
4
+ Directories = "Directories",
5
+ Single = "Single",
6
+ All = "All"
7
+ }
8
+ export declare function reExport(emitter: EventEmitter): void;
9
+ //# sourceMappingURL=re-export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"re-export.d.ts","sourceRoot":"","sources":["../../src/handlers/re-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,aAAa,CAAC;AAShE,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAEpD"}
@@ -0,0 +1,101 @@
1
+ import { StructureKind, } from 'ts-morph';
2
+ export var ReExport;
3
+ (function (ReExport) {
4
+ ReExport["None"] = "None";
5
+ ReExport["Directories"] = "Directories";
6
+ ReExport["Single"] = "Single";
7
+ ReExport["All"] = "All";
8
+ })(ReExport || (ReExport = {}));
9
+ export function reExport(emitter) {
10
+ emitter.on('BeforeGenerateFiles', beforeGenerateFiles);
11
+ }
12
+ function beforeGenerateFiles(args) {
13
+ const { config, output, project } = args;
14
+ const rootDirectory = project.getDirectoryOrThrow(output);
15
+ if ([ReExport.Directories, ReExport.All].includes(config.reExport)) {
16
+ // Collect all directories first to avoid iteration issues during file creation
17
+ const directories = [...rootDirectory.getDescendantDirectories()];
18
+ const indexFiles = [];
19
+ for (const directory of directories) {
20
+ const sourceFiles = directory
21
+ .getSourceFiles()
22
+ .filter(sourceFile => sourceFile.getBaseName() !== 'index.ts');
23
+ if (sourceFiles.length > 0) {
24
+ const exportDeclarations = sourceFiles.map(sourceFile => getExportDeclaration(directory, sourceFile));
25
+ indexFiles.push({
26
+ path: `${directory.getPath()}/index.ts`,
27
+ statements: exportDeclarations,
28
+ });
29
+ }
30
+ else {
31
+ const subdirs = directory.getDirectories();
32
+ if (subdirs.length > 0) {
33
+ const namespaceExportDeclarations = subdirs.map(sourceDirectory => getNamespaceExportDeclaration(directory, sourceDirectory));
34
+ indexFiles.push({
35
+ path: `${directory.getPath()}/index.ts`,
36
+ statements: namespaceExportDeclarations,
37
+ });
38
+ }
39
+ }
40
+ }
41
+ // Create all index files after iteration
42
+ for (const { path, statements } of indexFiles) {
43
+ project.createSourceFile(path, { statements }, { overwrite: true });
44
+ }
45
+ }
46
+ if (config.reExport === ReExport.Single) {
47
+ const sourceFiles = project
48
+ .getSourceFiles()
49
+ .filter(sourceFile => sourceFile.getBaseName() !== 'index.ts');
50
+ const exportDeclarations = sourceFiles.map(sourceFile => getExportDeclaration(rootDirectory, sourceFile));
51
+ rootDirectory.createSourceFile('index.ts', { statements: exportDeclarations }, { overwrite: true });
52
+ }
53
+ if (config.reExport === ReExport.All) {
54
+ const exportDeclarations = [];
55
+ const directories = rootDirectory.getDirectories();
56
+ for (const directory of directories) {
57
+ if (directory.getBaseName() === 'node_modules') {
58
+ continue;
59
+ }
60
+ const indexFile = directory.getSourceFile('index.ts');
61
+ if (indexFile) {
62
+ // For ESM, we need to explicitly reference the index.js file
63
+ const dirName = directory.getBaseName();
64
+ exportDeclarations.push({
65
+ kind: StructureKind.ExportDeclaration,
66
+ moduleSpecifier: `./${dirName}/index.js`,
67
+ });
68
+ }
69
+ }
70
+ if (exportDeclarations.length > 0) {
71
+ rootDirectory.createSourceFile('index.ts', { statements: exportDeclarations }, { overwrite: true });
72
+ }
73
+ }
74
+ }
75
+ function getExportDeclaration(directory, sourceFile) {
76
+ // For ESM, ensure module specifiers have .js extension
77
+ let moduleSpecifier = directory.getRelativePathAsModuleSpecifierTo(sourceFile);
78
+ if (!moduleSpecifier.endsWith('.js') && !moduleSpecifier.endsWith('.ts')) {
79
+ moduleSpecifier += '.js';
80
+ }
81
+ else if (moduleSpecifier.endsWith('.ts')) {
82
+ moduleSpecifier = `${moduleSpecifier.slice(0, -3)}.js`;
83
+ }
84
+ // Use namespace exports (export * from) instead of named exports
85
+ // to avoid stack overflow when processing many files with complex exports
86
+ return {
87
+ kind: StructureKind.ExportDeclaration,
88
+ moduleSpecifier,
89
+ };
90
+ }
91
+ function getNamespaceExportDeclaration(directory, sourceDirectory) {
92
+ let moduleSpecifier = directory.getRelativePathAsModuleSpecifierTo(sourceDirectory);
93
+ if (!moduleSpecifier.endsWith('/index.js')) {
94
+ moduleSpecifier += '/index.js';
95
+ }
96
+ return {
97
+ kind: StructureKind.ExportDeclaration,
98
+ moduleSpecifier,
99
+ };
100
+ }
101
+ //# sourceMappingURL=re-export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"re-export.js","sourceRoot":"","sources":["../../src/handlers/re-export.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,aAAa,GACd,MAAM,UAAU,CAAC;AAElB,MAAM,CAAN,IAAY,Q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