@pegasusheavy/nestjs-prisma-graphql 1.4.3 → 1.6.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 (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 +69 -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,68 @@
1
+ import { isManyAndReturnOutputType } from '../helpers/is-many-and-return.js';
2
+ import { pascalCase } from '../helpers/pascal-case.js';
3
+ /**
4
+ * See https://github.com/prisma/prisma/blob/master/src/packages/client/src/generation/TSClient/Model.ts@getAggregationTypes
5
+ * Subscribes on: 'ArgsType'
6
+ */
7
+ export function argsType(field, args) {
8
+ if (['queryRaw', 'executeRaw'].includes(field.name)) {
9
+ return;
10
+ }
11
+ if (isManyAndReturnOutputType(field.name)) {
12
+ return;
13
+ }
14
+ const { eventEmitter, getModelName, typeNames } = args;
15
+ let className = pascalCase(`${field.name}Args`);
16
+ const modelName = getModelName(className) ?? '';
17
+ switch (className) {
18
+ case `Aggregate${modelName}Args`: {
19
+ className = `${modelName}AggregateArgs`;
20
+ break;
21
+ }
22
+ case `GroupBy${modelName}Args`: {
23
+ className = `${modelName}GroupByArgs`;
24
+ break;
25
+ }
26
+ }
27
+ const inputType = {
28
+ constraints: { maxNumFields: null, minNumFields: null },
29
+ fields: [...field.args],
30
+ name: className,
31
+ };
32
+ if (!field.args.some(x => x.name === '_count') &&
33
+ [`${modelName}AggregateArgs`, `${modelName}GroupByArgs`].includes(className)) {
34
+ const names = ['Count', 'Avg', 'Sum', 'Min', 'Max'];
35
+ if (`${modelName}GroupByArgs` === inputType.name) {
36
+ // Make `by` property array only, noEnumerable
37
+ const byField = inputType.fields.find(f => f.name === 'by');
38
+ if (byField?.inputTypes) {
39
+ byField.inputTypes = byField.inputTypes.filter(it => it.isList);
40
+ }
41
+ }
42
+ for (const name of names) {
43
+ if (!typeNames.has(`${modelName}${name}AggregateInput`)) {
44
+ continue;
45
+ }
46
+ inputType.fields.push({
47
+ inputTypes: [
48
+ {
49
+ isList: false,
50
+ location: 'inputObjectTypes',
51
+ type: `${modelName}${name}AggregateInput`,
52
+ },
53
+ ],
54
+ isNullable: true,
55
+ isRequired: false,
56
+ isParameterizable: false,
57
+ name: `_${name.toLowerCase()}`,
58
+ });
59
+ }
60
+ }
61
+ eventEmitter.emitSync('InputType', {
62
+ ...args,
63
+ classDecoratorName: 'ArgsType',
64
+ fileType: 'args',
65
+ inputType,
66
+ });
67
+ }
68
+ //# sourceMappingURL=args-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args-type.js","sourceRoot":"","sources":["../../src/handlers/args-type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAA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'
4
+ */
5
+ export declare function combineScalarFilters(eventEmitter: EventEmitter): void;
6
+ //# sourceMappingURL=combine-scalar-filters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combine-scalar-filters.d.ts","sourceRoot":"","sources":["../../src/handlers/combine-scalar-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAwB,MAAM,aAAa,CAAC;AAMtF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAIrE"}
@@ -0,0 +1,110 @@
1
+ import { cloneDeep, keyBy, remove } from 'lodash-es';
2
+ import { BeforeGenerateField } from '../event-names.js';
3
+ /**
4
+ * Subscribes on 'BeforeInputType'
5
+ */
6
+ export function combineScalarFilters(eventEmitter) {
7
+ eventEmitter.on('BeforeInputType', beforeInputType);
8
+ eventEmitter.on(BeforeGenerateField, beforeGenerateField);
9
+ eventEmitter.on('PostBegin', postBegin);
10
+ }
11
+ function beforeInputType(args) {
12
+ const { inputType, removeTypes } = args;
13
+ if (isContainBogus(inputType.name) && isScalarFilter(inputType)) {
14
+ removeTypes.add(inputType.name);
15
+ inputType.name = replaceBogus(inputType.name);
16
+ }
17
+ }
18
+ function beforeGenerateField(field) {
19
+ for (const fieldInput of field.inputTypes) {
20
+ if (fieldInput.location !== 'inputObjectTypes') {
21
+ continue;
22
+ }
23
+ const fieldInputType = fieldInput.type;
24
+ if (isContainBogus(fieldInputType)) {
25
+ fieldInput.type = replaceBogus(fieldInputType);
26
+ }
27
+ }
28
+ }
29
+ function replaceBogus(name) {
30
+ return name.replaceAll(/Nullable|Nested/g, '');
31
+ }
32
+ function isContainBogus(name) {
33
+ return (name.startsWith('Nested') ||
34
+ (name.includes('Nullable') && name.endsWith('Filter')) ||
35
+ name.endsWith('NullableFilter'));
36
+ }
37
+ function isScalarFilter(inputType) {
38
+ if (!inputType.name.endsWith('Filter')) {
39
+ return false;
40
+ }
41
+ let result = false;
42
+ const equals = inputType.fields.find(f => f.name === 'equals');
43
+ if (equals) {
44
+ result = equals.inputTypes.every(x => {
45
+ return ['enumTypes', 'scalar'].includes(x.location);
46
+ });
47
+ }
48
+ return result;
49
+ }
50
+ function postBegin(args) {
51
+ const { modelNames, schema } = args;
52
+ const inputTypes = schema.inputObjectTypes.prisma ?? [];
53
+ const enumTypes = schema.enumTypes.model ?? [];
54
+ const types = [
55
+ 'Bool',
56
+ 'Int',
57
+ 'String',
58
+ 'DateTime',
59
+ 'Decimal',
60
+ 'Float',
61
+ 'Json',
62
+ 'Bytes',
63
+ 'BigInt',
64
+ ];
65
+ for (const enumType of enumTypes) {
66
+ const { name } = enumType;
67
+ types.push(`Enum${name}`);
68
+ }
69
+ const inputTypeByName = keyBy(inputTypes, it => it.name);
70
+ const replaceBogusFilters = (filterName, filterNameCandidates) => {
71
+ for (const filterNameCandidate of filterNameCandidates) {
72
+ const candidate = inputTypeByName[filterNameCandidate];
73
+ if (candidate) {
74
+ const it = cloneDeep({ ...candidate, name: filterName });
75
+ inputTypes.push(it);
76
+ inputTypeByName[filterName] = it;
77
+ break;
78
+ }
79
+ }
80
+ };
81
+ for (const type of types) {
82
+ // Scalar filters
83
+ replaceBogusFilters(`${type}Filter`, [
84
+ `${type}NullableFilter`,
85
+ `Nested${type}NullableFilter`,
86
+ ]);
87
+ replaceBogusFilters(`${type}WithAggregatesFilter`, [
88
+ `${type}NullableWithAggregatesFilter`,
89
+ `Nested${type}NullableWithAggregatesFilter`,
90
+ ]);
91
+ replaceBogusFilters(`${type}ListFilter`, [
92
+ `${type}NullableListFilter`,
93
+ `Nested${type}NullableListFilter`,
94
+ ]);
95
+ }
96
+ for (const modelName of modelNames) {
97
+ replaceBogusFilters(`${modelName}RelationFilter`, [
98
+ `${modelName}NullableRelationFilter`,
99
+ ]);
100
+ }
101
+ for (const modelName of modelNames) {
102
+ replaceBogusFilters(`${modelName}ScalarRelationFilter`, [
103
+ `${modelName}NullableScalarRelationFilter`,
104
+ ]);
105
+ }
106
+ remove(inputTypes, it => {
107
+ return isContainBogus(it.name);
108
+ });
109
+ }
110
+ //# sourceMappingURL=combine-scalar-filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combine-scalar-filters.js","sourceRoot":"","sources":["../../src/handlers/combine-scalar-filters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA0B;IAC7D,YAAY,CAAC,EAAE,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IAC1D,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,eAAe,CACtB,IAIC;IAED,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAExC,IAAI,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;QAChE,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChC,SAAS,CAAC,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAgB;IAC3C,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAC1C,IAAI,UAAU,CAAC,QAAQ,KAAK,kBAAkB,EAAE,CAAC;YAC/C,SAAS;QACX,CAAC;QACD,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;QACvC,IAAI,cAAc,CAAC,cAAc,CAAC,EAAE,CAAC;YACnC,UAAU,CAAC,IAAI,GAAG,YAAY,CAAC,cAAc,CAAC,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IAAI,oBAAoB;SAClC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,mBAAmB,CAAC,GAAG,SAAS,gBAAgB,EAAE;YAChD,GAAG,SAAS,wBAAwB;SACrC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,mBAAmB,CAAC,GAAG,SAAS,sBAAsB,EAAE;YACtD,GAAG,SAAS,8BAA8B;SAC3C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE;QACtB,OAAO,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { EventArguments, OutputType } from '../types.js';
2
+ /**
3
+ * Create aggregate inputs from aggregate outputs.
4
+ * See client/src/generation/TSClient.ts @ getAggregationTypes
5
+ * Subscribes on: 'AggregateOutput'
6
+ */
7
+ export declare function createAggregateInput(args: EventArguments & {
8
+ outputType: OutputType;
9
+ }): void;
10
+ //# sourceMappingURL=create-aggregate-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-aggregate-input.d.ts","sourceRoot":"","sources":["../../src/handlers/create-aggregate-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAa,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAChD,IAAI,CA4BN"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Create aggregate inputs from aggregate outputs.
3
+ * See client/src/generation/TSClient.ts @ getAggregationTypes
4
+ * Subscribes on: 'AggregateOutput'
5
+ */
6
+ export function createAggregateInput(args) {
7
+ const { eventEmitter, outputType } = args;
8
+ const className = `${outputType.name}Input`;
9
+ const inputType = {
10
+ constraints: { maxNumFields: null, minNumFields: null },
11
+ fields: outputType.fields.map(x => ({
12
+ inputTypes: [
13
+ {
14
+ isList: false,
15
+ location: 'scalar',
16
+ type: 'true',
17
+ },
18
+ ],
19
+ isNullable: x.isNullable ?? true,
20
+ isRequired: false,
21
+ isParameterizable: false,
22
+ name: x.name,
23
+ })),
24
+ name: className,
25
+ };
26
+ eventEmitter.emitSync('InputType', {
27
+ ...args,
28
+ classDecoratorName: 'InputType',
29
+ fileType: 'input',
30
+ inputType,
31
+ });
32
+ }
33
+ //# sourceMappingURL=create-aggregate-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-aggregate-input.js","sourceRoot":"","sources":["../../src/handlers/create-aggregate-input.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAiD;IAEjD,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1C,MAAM,SAAS,GAAG,GAAG,UAAU,CAAC,IAAI,OAAO,CAAC;IAE5C,MAAM,SAAS,GAAc;QAC3B,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE;QACvD,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,UAAU,EAAE;gBACV;oBACE,MAAM,EAAE,KAAK;oBACb,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,MAAM;iBACb;aACF;YACD,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;YAChC,UAAU,EAAE,KAAK;YACjB,iBAAiB,EAAE,KAAK;YACxB,IAAI,EAAE,CAAC,CAAC,IAAI;SACb,CAAC,CAAC;QACH,IAAI,EAAE,SAAS;KAChB,CAAC;IAEF,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAE;QACjC,GAAG,IAAI;QACP,kBAAkB,EAAE,WAAW;QAC/B,QAAQ,EAAE,OAAO;QACjB,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { EventArguments } from '../types.js';
2
+ /**
3
+ * Generate the decimal-helpers.ts file that provides Decimal transformation
4
+ * utilities compatible with Prisma 7+.
5
+ *
6
+ * This replaces the dependency on prisma-graphql-type-decimal which is
7
+ * incompatible with Prisma 7's new client structure.
8
+ */
9
+ export declare function generateDecimalHelpers(args: EventArguments): void;
10
+ //# sourceMappingURL=decimal-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal-helpers.d.ts","sourceRoot":"","sources":["../../src/handlers/decimal-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAoEjE"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Generate the decimal-helpers.ts file that provides Decimal transformation
3
+ * utilities compatible with Prisma 7+.
4
+ *
5
+ * This replaces the dependency on prisma-graphql-type-decimal which is
6
+ * incompatible with Prisma 7's new client structure.
7
+ */
8
+ export function generateDecimalHelpers(args) {
9
+ const { output, project } = args;
10
+ const rootDirectory = project.getDirectory(output) ?? project.createDirectory(output);
11
+ const sourceFile = rootDirectory.createSourceFile('decimal-helpers.ts', undefined, {
12
+ overwrite: true,
13
+ });
14
+ // Generate decimal helper functions using decimal.js
15
+ const helpersCode = `/**
16
+ * Decimal Helpers for Prisma GraphQL
17
+ *
18
+ * This module provides utilities for transforming Decimal values
19
+ * between GraphQL and Prisma, compatible with Prisma 7+.
20
+ *
21
+ * These functions replace the prisma-graphql-type-decimal package
22
+ * which is incompatible with Prisma 7's new client structure.
23
+ */
24
+
25
+ import Decimal from 'decimal.js';
26
+
27
+ /**
28
+ * Reconstruct a Decimal from a serialized object.
29
+ * Prisma serializes Decimals as objects with d, e, s properties.
30
+ */
31
+ function createDecimalFromObject(object: { d: number[]; e: number; s: number }): Decimal {
32
+ return Object.create(Decimal.prototype, {
33
+ d: { value: object.d },
34
+ e: { value: object.e },
35
+ s: { value: object.s },
36
+ });
37
+ }
38
+
39
+ /**
40
+ * Transform input values to Decimal instances.
41
+ * Used as a class-transformer Transform decorator argument.
42
+ *
43
+ * @param params - The transform parameters from class-transformer
44
+ * @returns The transformed Decimal or array of Decimals
45
+ */
46
+ export function transformToDecimal({ value }: { value: unknown }): Decimal | Decimal[] | null | undefined {
47
+ if (value == null) return value as null | undefined;
48
+
49
+ if (Array.isArray(value)) {
50
+ return value.map((v) => {
51
+ if (v instanceof Decimal) return v;
52
+ if (typeof v === 'object' && v !== null && 'd' in v && 'e' in v && 's' in v) {
53
+ return createDecimalFromObject(v as { d: number[]; e: number; s: number });
54
+ }
55
+ return new Decimal(v as string | number);
56
+ });
57
+ }
58
+
59
+ if (value instanceof Decimal) return value;
60
+ if (typeof value === 'object' && value !== null && 'd' in value && 'e' in value && 's' in value) {
61
+ return createDecimalFromObject(value as { d: number[]; e: number; s: number });
62
+ }
63
+ return new Decimal(value as string | number);
64
+ }
65
+
66
+ /**
67
+ * Re-export Decimal class for convenience
68
+ */
69
+ export { Decimal };
70
+ `;
71
+ sourceFile.addStatements(helpersCode);
72
+ }
73
+ //# sourceMappingURL=decimal-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal-helpers.js","sourceRoot":"","sources":["../../src/handlers/decimal-helpers.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAoB;IACzD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEjC,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAEtF,MAAM,UAAU,GAAG,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,EAAE;QACjF,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,qDAAqD;IACrD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDrB,CAAC;IAEA,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EventEmitter } from '../types.js';
2
+ export declare function emitSingle(emitter: EventEmitter): void;
3
+ //# sourceMappingURL=emit-single.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit-single.d.ts","sourceRoot":"","sources":["../../src/handlers/emit-single.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,YAAY,EAAE,MAAM,aAAa,CAAC;AAKtD,wBAAgB,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAEtD"}
@@ -0,0 +1,14 @@
1
+ import { partition } from 'lodash-es';
2
+ export function emitSingle(emitter) {
3
+ emitter.on('ClassProperty', classProperty);
4
+ }
5
+ function classProperty(property, eventArguments) {
6
+ const { isList, location, propertyType } = eventArguments;
7
+ if (['inputObjectTypes', 'outputObjectTypes'].includes(location) && !isList) {
8
+ const [safeTypes, instanceofTypes] = partition(propertyType, t => t === 'null' || t.startsWith('Prisma.'));
9
+ const mappedInstanceofTypes = instanceofTypes.map(t => `InstanceType<typeof ${t}>`);
10
+ // eslint-disable-next-line no-param-reassign
11
+ property.type = [...mappedInstanceofTypes, ...safeTypes].join(' | ');
12
+ }
13
+ }
14
+ //# sourceMappingURL=emit-single.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit-single.js","sourceRoot":"","sources":["../../src/handlers/emit-single.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,UAAU,UAAU,CAAC,OAAqB;IAC9C,OAAO,CAAC,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,aAAa,CACpB,QAAsC,EACtC,cAIC;IAED,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,cAAc,CAAC;IAC1D,IAAI,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC5E,MAAM,CAAC,SAAS,EAAE,eAAe,CAAC,GAAG,SAAS,CAC5C,YAAY,EACZ,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAC7C,CAAC;QACF,MAAM,qBAAqB,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;QAEpF,6CAA6C;QAC7C,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,qBAAqB,EAAE,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { EventArguments } from '../types.js';
2
+ /**
3
+ * Creates barrel exports (index.ts files) for the generated GraphQL types.
4
+ *
5
+ * When reExport="None", the generator doesn't create any barrel exports.
6
+ * This function creates them post-generation, avoiding the stack overflow
7
+ * that occurs when ts-morph tries to resolve .js extensions during generation
8
+ * with reExport="Directories".
9
+ *
10
+ * This is only needed when esmCompatible=true and reExport="None".
11
+ */
12
+ export declare function generateBarrelExports(args: EventArguments): void;
13
+ //# sourceMappingURL=generate-barrel-exports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-barrel-exports.d.ts","sourceRoot":"","sources":["../../src/handlers/generate-barrel-exports.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAiFhE"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Creates barrel exports (index.ts files) for the generated GraphQL types.
3
+ *
4
+ * When reExport="None", the generator doesn't create any barrel exports.
5
+ * This function creates them post-generation, avoiding the stack overflow
6
+ * that occurs when ts-morph tries to resolve .js extensions during generation
7
+ * with reExport="Directories".
8
+ *
9
+ * This is only needed when esmCompatible=true and reExport="None".
10
+ */
11
+ export function generateBarrelExports(args) {
12
+ const { config, output, project } = args;
13
+ // Only generate barrels when ESM compatible and no automatic re-export
14
+ if (!config.esmCompatible || String(config.reExport) !== 'None') {
15
+ return;
16
+ }
17
+ const rootDirectory = project.getDirectory(output);
18
+ if (!rootDirectory) {
19
+ console.warn('nestjs-prisma-graphql: output directory not found, skipping barrel generation');
20
+ return;
21
+ }
22
+ const _extension = config.outputFilePattern?.includes('.js') ? '.js' : '.ts';
23
+ const subdirs = rootDirectory.getDirectories();
24
+ let barrelCount = 0;
25
+ console.log(`nestjs-prisma-graphql: found ${subdirs.length} subdirectories for barrel generation`);
26
+ // Create index file in each subdirectory
27
+ for (const dir of subdirs) {
28
+ const dirName = dir.getBaseName();
29
+ // Skip special directories
30
+ if (dirName === 'type-registry' || dirName.startsWith('.')) {
31
+ continue;
32
+ }
33
+ const files = dir.getSourceFiles();
34
+ console.log(`nestjs-prisma-graphql: ${dirName} has ${files.length} source files`);
35
+ const exports = [];
36
+ for (const file of files) {
37
+ const fileName = file.getBaseName();
38
+ // Skip index files themselves
39
+ if (fileName === 'index.ts' || fileName === 'index.js') {
40
+ continue;
41
+ }
42
+ // Add export statement
43
+ exports.push(`export * from './${fileName}';`);
44
+ }
45
+ if (exports.length > 0) {
46
+ exports.sort();
47
+ dir.createSourceFile(`index.ts`, `${exports.join('\n')}\n`, { overwrite: true });
48
+ barrelCount++;
49
+ }
50
+ }
51
+ // Create root index file
52
+ const rootExports = [];
53
+ for (const dir of subdirs) {
54
+ const dirName = dir.getBaseName();
55
+ if (dirName.startsWith('.')) {
56
+ continue;
57
+ }
58
+ rootExports.push(`export * from './${dirName}/index.js';`);
59
+ }
60
+ if (rootExports.length > 0) {
61
+ rootExports.sort();
62
+ rootDirectory.createSourceFile('index.ts', `${rootExports.join('\n')}\n`, { overwrite: true });
63
+ barrelCount++;
64
+ }
65
+ if (barrelCount > 0) {
66
+ console.log(`nestjs-prisma-graphql: generated ${barrelCount} barrel export files`);
67
+ }
68
+ }
69
+ //# sourceMappingURL=generate-barrel-exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-barrel-exports.js","sourceRoot":"","sources":["../../src/handlers/generate-barrel-exports.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAoB;IACxD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEzC,uEAAuE;IACvE,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,MAAM,EAAE,CAAC;QAChE,OAAO;IACT,CAAC;IAED,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACnD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC;QAC9F,OAAO;IACT,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,MAAM,OAAO,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC;IAC/C,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,OAAO,CAAC,GAAG,CAAC,gCAAgC,OAAO,CAAC,MAAM,uCAAuC,CAAC,CAAC;IAEnG,yCAAyC;IACzC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,O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AED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,WAAW,CAAC,IAAI,EAAE,CAAC;QACnB,aAAa,CAAC,gBAAgB,CAC5B,UAAU,EACV,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAG,IAAI,EAC/B,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;QACF,WAAW,EAAE,CAAC;IAChB,CAAC;IAED,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,oCAAoC,WAAW,sBAAsB,CAAC,CAAC;IACrF,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EventArguments } from '../types.js';
2
+ export declare function generateFiles(args: EventArguments): Promise<void>;
3
+ //# sourceMappingURL=generate-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-files.d.ts","sourceRoot":"","sources":["../../src/handlers/generate-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAYlD,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqJvE"}
@@ -0,0 +1,133 @@
1
+ import { StructureKind, } from 'ts-morph';
2
+ import { ImportDeclarationMap } from '../helpers/import-declaration-map.js';
3
+ import { ok } from '../helpers/type-safe-assert.js';
4
+ export async function generateFiles(args) {
5
+ const { config, eventEmitter, output, project } = args;
6
+ if (config.emitSingle) {
7
+ const rootDirectory = project.getDirectory(output) ?? project.createDirectory(output);
8
+ const sourceFile = rootDirectory.getSourceFile('index.ts') ??
9
+ rootDirectory.createSourceFile('index.ts', undefined, { overwrite: true });
10
+ const statements = project.getSourceFiles().flatMap(s => {
11
+ if (s === sourceFile) {
12
+ return [];
13
+ }
14
+ const classDeclaration = s.getClass(() => true);
15
+ const stmts = s.getStructure().statements;
16
+ // Reget decorator full name
17
+ if (Array.isArray(stmts)) {
18
+ for (const statement of stmts) {
19
+ if (!(typeof statement === 'object' && statement.kind === StructureKind.Class)) {
20
+ continue;
21
+ }
22
+ for (const property of statement.properties ?? []) {
23
+ for (const decorator of property.decorators ?? []) {
24
+ const fullName = classDeclaration
25
+ ?.getProperty(property.name)
26
+ ?.getDecorator(decorator.name)
27
+ ?.getFullName();
28
+ ok(fullName !== undefined, `Cannot get full name of decorator of class ${String(statement.name)}`);
29
+ decorator.name = fullName;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ project.removeSourceFile(s);
35
+ return stmts;
36
+ });
37
+ const imports = new ImportDeclarationMap();
38
+ const enums = [];
39
+ const classes = [];
40
+ for (const statement of statements) {
41
+ if (typeof statement === 'string') {
42
+ if (statement.startsWith('registerEnumType')) {
43
+ enums.push(statement);
44
+ }
45
+ continue;
46
+ }
47
+ switch (statement.kind) {
48
+ case StructureKind.ImportDeclaration: {
49
+ if (statement.moduleSpecifier.startsWith('./') ||
50
+ statement.moduleSpecifier.startsWith('..')) {
51
+ continue;
52
+ }
53
+ for (const namedImport of statement.namedImports) {
54
+ const name = namedImport.alias ?? namedImport.name;
55
+ imports.add(name, statement.moduleSpecifier);
56
+ }
57
+ if (statement.defaultImport) {
58
+ imports.create({
59
+ defaultImport: statement.defaultImport,
60
+ from: statement.moduleSpecifier,
61
+ name: statement.defaultImport,
62
+ });
63
+ }
64
+ if (statement.namespaceImport) {
65
+ imports.create({
66
+ from: statement.moduleSpecifier,
67
+ name: statement.namespaceImport,
68
+ namespaceImport: statement.namespaceImport,
69
+ });
70
+ }
71
+ break;
72
+ }
73
+ case StructureKind.Enum: {
74
+ enums.unshift(statement);
75
+ break;
76
+ }
77
+ case StructureKind.Class: {
78
+ classes.push(statement);
79
+ break;
80
+ }
81
+ }
82
+ }
83
+ for (const customImport of config.customImport) {
84
+ imports.create(customImport);
85
+ }
86
+ sourceFile.set({
87
+ kind: StructureKind.SourceFile,
88
+ statements: [...imports.toStatements(), ...enums, ...classes],
89
+ });
90
+ }
91
+ const sourceFiles = project.getSourceFiles();
92
+ const sourceFileCount = sourceFiles.length;
93
+ const globalConsole = globalThis.console;
94
+ const logMessage = (msg) => {
95
+ globalConsole.log(msg);
96
+ };
97
+ logMessage(`nestjs-prisma-graphql: saving ${String(sourceFileCount)} source files to ${output}`);
98
+ if (sourceFileCount === 0) {
99
+ throw new Error('nestjs-prisma-graphql: project has 0 source files — nothing to write');
100
+ }
101
+ if (config.emitCompiled) {
102
+ project.compilerOptions.set({
103
+ declaration: true,
104
+ declarationDir: output,
105
+ emitDecoratorMetadata: false,
106
+ outDir: output,
107
+ rootDir: output,
108
+ skipLibCheck: true,
109
+ });
110
+ const emitResult = await project.emit();
111
+ const errors = emitResult.getDiagnostics().map(d => String(d.getMessageText()));
112
+ if (errors.length > 0) {
113
+ eventEmitter.emitSync('Warning', errors);
114
+ }
115
+ }
116
+ else {
117
+ // For large schemas (2000+ files), save in batches to avoid stack overflow
118
+ // ts-morph's project.save() can build up deep call stacks on large projects
119
+ const BATCH_SIZE = 100;
120
+ if (sourceFileCount > BATCH_SIZE) {
121
+ logMessage(`nestjs-prisma-graphql: using batched save for large schema (${String(sourceFileCount)} files)`);
122
+ for (let i = 0; i < sourceFileCount; i += BATCH_SIZE) {
123
+ const batch = sourceFiles.slice(i, i + BATCH_SIZE);
124
+ logMessage(`nestjs-prisma-graphql: saving batch ${String(Math.floor(i / BATCH_SIZE) + 1)}/${String(Math.ceil(sourceFileCount / BATCH_SIZE))} (${String(batch.length)} files)`);
125
+ await Promise.all(batch.map(async (sf) => await sf.save()));
126
+ }
127
+ }
128
+ else {
129
+ await project.save();
130
+ }
131
+ }
132
+ }
133
+ //# sourceMappingURL=generate-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../src/handlers/generate-files.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,aAAa,GACd,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC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GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;gBACnD,UAAU,CACR,uCAAuC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CACnK,CAAC;gBACF,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAC,EAAE,EAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { EventArguments, InputType } from '../types.js';
2
+ export declare function inputType(args: EventArguments & {
3
+ inputType: InputType;
4
+ fileType: string;
5
+ classDecoratorName: string;
6
+ }): void;
7
+ //# sourceMappingURL=input-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-type.d.ts","sourceRoot":"","sources":["../../src/handlers/input-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsB7D,wBAAgB,SAAS,CACvB,IAAI,EAAE,cAAc,GAAG;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,GACA,IAAI,CAuWN"}