@gqlkit-ts/cli 0.2.0 → 0.4.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 (235) hide show
  1. package/README.md +143 -0
  2. package/dist/auto-type-generator/auto-type-generator.d.ts +10 -4
  3. package/dist/auto-type-generator/auto-type-generator.d.ts.map +1 -1
  4. package/dist/auto-type-generator/auto-type-generator.js +656 -146
  5. package/dist/auto-type-generator/auto-type-generator.js.map +1 -1
  6. package/dist/auto-type-generator/index.d.ts +8 -1
  7. package/dist/auto-type-generator/index.d.ts.map +1 -1
  8. package/dist/auto-type-generator/index.js +3 -0
  9. package/dist/auto-type-generator/index.js.map +1 -1
  10. package/dist/auto-type-generator/inline-enum-collector.d.ts +13 -5
  11. package/dist/auto-type-generator/inline-enum-collector.d.ts.map +1 -1
  12. package/dist/auto-type-generator/inline-enum-collector.js +107 -71
  13. package/dist/auto-type-generator/inline-enum-collector.js.map +1 -1
  14. package/dist/auto-type-generator/inline-object-traverser.d.ts +20 -0
  15. package/dist/auto-type-generator/inline-object-traverser.d.ts.map +1 -0
  16. package/dist/auto-type-generator/inline-object-traverser.js +22 -0
  17. package/dist/auto-type-generator/inline-object-traverser.js.map +1 -0
  18. package/dist/auto-type-generator/inline-union-collector.d.ts +29 -0
  19. package/dist/auto-type-generator/inline-union-collector.d.ts.map +1 -0
  20. package/dist/auto-type-generator/inline-union-collector.js +216 -0
  21. package/dist/auto-type-generator/inline-union-collector.js.map +1 -0
  22. package/dist/auto-type-generator/inline-union-types.d.ts +29 -0
  23. package/dist/auto-type-generator/inline-union-types.d.ts.map +1 -0
  24. package/dist/auto-type-generator/inline-union-types.js +2 -0
  25. package/dist/auto-type-generator/inline-union-types.js.map +1 -0
  26. package/dist/auto-type-generator/inline-union-validator.d.ts +76 -0
  27. package/dist/auto-type-generator/inline-union-validator.d.ts.map +1 -0
  28. package/dist/auto-type-generator/inline-union-validator.js +329 -0
  29. package/dist/auto-type-generator/inline-union-validator.js.map +1 -0
  30. package/dist/auto-type-generator/naming-convention.d.ts +18 -1
  31. package/dist/auto-type-generator/naming-convention.d.ts.map +1 -1
  32. package/dist/auto-type-generator/naming-convention.js +16 -0
  33. package/dist/auto-type-generator/naming-convention.js.map +1 -1
  34. package/dist/auto-type-generator/resolve-type-generator.d.ts +20 -0
  35. package/dist/auto-type-generator/resolve-type-generator.d.ts.map +1 -0
  36. package/dist/auto-type-generator/resolve-type-generator.js +2 -0
  37. package/dist/auto-type-generator/resolve-type-generator.js.map +1 -0
  38. package/dist/auto-type-generator/resolver-field-iterator.d.ts +13 -0
  39. package/dist/auto-type-generator/resolver-field-iterator.d.ts.map +1 -0
  40. package/dist/auto-type-generator/resolver-field-iterator.js +22 -0
  41. package/dist/auto-type-generator/resolver-field-iterator.js.map +1 -0
  42. package/dist/auto-type-generator/typename-extractor.d.ts +26 -0
  43. package/dist/auto-type-generator/typename-extractor.d.ts.map +1 -0
  44. package/dist/auto-type-generator/typename-extractor.js +142 -0
  45. package/dist/auto-type-generator/typename-extractor.js.map +1 -0
  46. package/dist/auto-type-generator/typename-resolve-type-generator.d.ts +35 -0
  47. package/dist/auto-type-generator/typename-resolve-type-generator.d.ts.map +1 -0
  48. package/dist/auto-type-generator/typename-resolve-type-generator.js +177 -0
  49. package/dist/auto-type-generator/typename-resolve-type-generator.js.map +1 -0
  50. package/dist/auto-type-generator/typename-types.d.ts +43 -0
  51. package/dist/auto-type-generator/typename-types.d.ts.map +1 -0
  52. package/dist/auto-type-generator/typename-types.js +37 -0
  53. package/dist/auto-type-generator/typename-types.js.map +1 -0
  54. package/dist/auto-type-generator/typename-validator.d.ts +37 -0
  55. package/dist/auto-type-generator/typename-validator.d.ts.map +1 -0
  56. package/dist/auto-type-generator/typename-validator.js +206 -0
  57. package/dist/auto-type-generator/typename-validator.js.map +1 -0
  58. package/dist/cli.js +2 -0
  59. package/dist/cli.js.map +1 -1
  60. package/dist/commands/docs.d.ts +51 -0
  61. package/dist/commands/docs.d.ts.map +1 -0
  62. package/dist/commands/docs.js +154 -0
  63. package/dist/commands/docs.js.map +1 -0
  64. package/dist/config/types.d.ts +13 -0
  65. package/dist/config/types.d.ts.map +1 -1
  66. package/dist/config-loader/loader.d.ts +3 -0
  67. package/dist/config-loader/loader.d.ts.map +1 -1
  68. package/dist/config-loader/loader.js +1 -0
  69. package/dist/config-loader/loader.js.map +1 -1
  70. package/dist/config-loader/validator.d.ts.map +1 -1
  71. package/dist/config-loader/validator.js +23 -0
  72. package/dist/config-loader/validator.js.map +1 -1
  73. package/dist/gen-orchestrator/orchestrator.d.ts.map +1 -1
  74. package/dist/gen-orchestrator/orchestrator.js +32 -12
  75. package/dist/gen-orchestrator/orchestrator.js.map +1 -1
  76. package/dist/resolver-extractor/extract-resolvers.d.ts +19 -1
  77. package/dist/resolver-extractor/extract-resolvers.d.ts.map +1 -1
  78. package/dist/resolver-extractor/extractor/define-api-extractor.d.ts +5 -0
  79. package/dist/resolver-extractor/extractor/define-api-extractor.d.ts.map +1 -1
  80. package/dist/resolver-extractor/extractor/define-api-extractor.js +18 -65
  81. package/dist/resolver-extractor/extractor/define-api-extractor.js.map +1 -1
  82. package/dist/resolver-extractor/index.d.ts +0 -1
  83. package/dist/resolver-extractor/index.d.ts.map +1 -1
  84. package/dist/resolver-extractor/validator/abstract-resolver-validator.d.ts +1 -0
  85. package/dist/resolver-extractor/validator/abstract-resolver-validator.d.ts.map +1 -1
  86. package/dist/resolver-extractor/validator/abstract-resolver-validator.js +9 -5
  87. package/dist/resolver-extractor/validator/abstract-resolver-validator.js.map +1 -1
  88. package/dist/schema-generator/builder/ast-builder.d.ts +2 -2
  89. package/dist/schema-generator/builder/ast-builder.d.ts.map +1 -1
  90. package/dist/schema-generator/builder/ast-builder.js +12 -34
  91. package/dist/schema-generator/builder/ast-builder.js.map +1 -1
  92. package/dist/schema-generator/emitter/code-emitter.d.ts +3 -1
  93. package/dist/schema-generator/emitter/code-emitter.d.ts.map +1 -1
  94. package/dist/schema-generator/emitter/code-emitter.js +42 -12
  95. package/dist/schema-generator/emitter/code-emitter.js.map +1 -1
  96. package/dist/schema-generator/emitter/sdl-emitter.d.ts +0 -4
  97. package/dist/schema-generator/emitter/sdl-emitter.d.ts.map +1 -1
  98. package/dist/schema-generator/emitter/sdl-emitter.js +0 -4
  99. package/dist/schema-generator/emitter/sdl-emitter.js.map +1 -1
  100. package/dist/schema-generator/generate-schema.d.ts +3 -0
  101. package/dist/schema-generator/generate-schema.d.ts.map +1 -1
  102. package/dist/schema-generator/generate-schema.js +83 -5
  103. package/dist/schema-generator/generate-schema.js.map +1 -1
  104. package/dist/schema-generator/integrator/result-integrator.d.ts +19 -9
  105. package/dist/schema-generator/integrator/result-integrator.d.ts.map +1 -1
  106. package/dist/schema-generator/integrator/result-integrator.js +60 -44
  107. package/dist/schema-generator/integrator/result-integrator.js.map +1 -1
  108. package/dist/schema-generator/resolver-collector/resolver-collector.d.ts +2 -0
  109. package/dist/schema-generator/resolver-collector/resolver-collector.d.ts.map +1 -1
  110. package/dist/schema-generator/resolver-collector/resolver-collector.js +22 -0
  111. package/dist/schema-generator/resolver-collector/resolver-collector.js.map +1 -1
  112. package/dist/shared/branded-type-detector.d.ts +43 -0
  113. package/dist/shared/branded-type-detector.d.ts.map +1 -0
  114. package/dist/shared/branded-type-detector.js +146 -0
  115. package/dist/shared/branded-type-detector.js.map +1 -0
  116. package/dist/shared/enum-prefix-detector.d.ts +63 -0
  117. package/dist/shared/enum-prefix-detector.d.ts.map +1 -0
  118. package/dist/shared/enum-prefix-detector.js +80 -0
  119. package/dist/shared/enum-prefix-detector.js.map +1 -0
  120. package/dist/shared/ignore-fields-detector.d.ts +26 -0
  121. package/dist/shared/ignore-fields-detector.d.ts.map +1 -0
  122. package/dist/shared/ignore-fields-detector.js +83 -0
  123. package/dist/shared/ignore-fields-detector.js.map +1 -0
  124. package/dist/shared/ignore-fields-validator.d.ts +29 -0
  125. package/dist/shared/ignore-fields-validator.d.ts.map +1 -0
  126. package/dist/shared/ignore-fields-validator.js +43 -0
  127. package/dist/shared/ignore-fields-validator.js.map +1 -0
  128. package/dist/shared/index.d.ts +2 -0
  129. package/dist/shared/index.d.ts.map +1 -1
  130. package/dist/shared/index.js.map +1 -1
  131. package/dist/shared/source-location.d.ts +5 -0
  132. package/dist/shared/source-location.d.ts.map +1 -1
  133. package/dist/shared/source-location.js +7 -0
  134. package/dist/shared/source-location.js.map +1 -1
  135. package/dist/shared/string-utils.d.ts +2 -0
  136. package/dist/shared/string-utils.d.ts.map +1 -0
  137. package/dist/shared/string-utils.js +8 -0
  138. package/dist/shared/string-utils.js.map +1 -0
  139. package/dist/type-extractor/converter/field-eligibility.d.ts +8 -6
  140. package/dist/type-extractor/converter/field-eligibility.d.ts.map +1 -1
  141. package/dist/type-extractor/converter/field-eligibility.js +7 -28
  142. package/dist/type-extractor/converter/field-eligibility.js.map +1 -1
  143. package/dist/type-extractor/converter/graphql-converter.d.ts.map +1 -1
  144. package/dist/type-extractor/converter/graphql-converter.js +27 -18
  145. package/dist/type-extractor/converter/graphql-converter.js.map +1 -1
  146. package/dist/type-extractor/extractor/field-type-resolver.d.ts.map +1 -1
  147. package/dist/type-extractor/extractor/field-type-resolver.js +81 -7
  148. package/dist/type-extractor/extractor/field-type-resolver.js.map +1 -1
  149. package/dist/type-extractor/extractor/type-extractor.d.ts.map +1 -1
  150. package/dist/type-extractor/extractor/type-extractor.js +88 -23
  151. package/dist/type-extractor/extractor/type-extractor.js.map +1 -1
  152. package/dist/type-extractor/types/diagnostics.d.ts +1 -1
  153. package/dist/type-extractor/types/diagnostics.d.ts.map +1 -1
  154. package/dist/type-extractor/types/ts-type-reference-factory.d.ts +10 -2
  155. package/dist/type-extractor/types/ts-type-reference-factory.d.ts.map +1 -1
  156. package/dist/type-extractor/types/ts-type-reference-factory.js +8 -2
  157. package/dist/type-extractor/types/ts-type-reference-factory.js.map +1 -1
  158. package/dist/type-extractor/types/typescript.d.ts +4 -0
  159. package/dist/type-extractor/types/typescript.d.ts.map +1 -1
  160. package/dist/type-extractor/validator/type-validator.d.ts +1 -1
  161. package/dist/type-extractor/validator/type-validator.d.ts.map +1 -1
  162. package/dist/type-extractor/validator/type-validator.js +2 -10
  163. package/dist/type-extractor/validator/type-validator.js.map +1 -1
  164. package/docs/coding-agents.md +64 -0
  165. package/docs/configuration.md +15 -20
  166. package/docs/getting-started.md +15 -12
  167. package/docs/index.md +36 -22
  168. package/docs/integration/apollo.md +8 -40
  169. package/docs/integration/drizzle.md +6 -10
  170. package/docs/integration/prisma.md +196 -0
  171. package/docs/integration/yoga.md +8 -40
  172. package/docs/schema/abstract-resolvers.md +117 -0
  173. package/docs/schema/directives.md +5 -0
  174. package/docs/schema/documentation.md +5 -0
  175. package/docs/schema/enums.md +99 -0
  176. package/docs/schema/fields.md +64 -0
  177. package/docs/schema/index.md +21 -0
  178. package/docs/schema/inputs.md +115 -15
  179. package/docs/schema/interfaces.md +31 -1
  180. package/docs/schema/objects.md +40 -0
  181. package/docs/schema/queries-mutations.md +136 -22
  182. package/docs/schema/scalars.md +5 -0
  183. package/docs/schema/unions.md +208 -1
  184. package/docs/what-is-gqlkit.md +13 -8
  185. package/package.json +6 -4
  186. package/src/auto-type-generator/auto-type-generator.ts +969 -227
  187. package/src/auto-type-generator/index.ts +42 -0
  188. package/src/auto-type-generator/inline-enum-collector.ts +187 -139
  189. package/src/auto-type-generator/inline-object-traverser.ts +49 -0
  190. package/src/auto-type-generator/inline-union-collector.ts +402 -0
  191. package/src/auto-type-generator/inline-union-types.ts +33 -0
  192. package/src/auto-type-generator/inline-union-validator.ts +482 -0
  193. package/src/auto-type-generator/naming-convention.ts +38 -1
  194. package/src/auto-type-generator/resolve-type-generator.ts +21 -0
  195. package/src/auto-type-generator/resolver-field-iterator.ts +39 -0
  196. package/src/auto-type-generator/typename-extractor.ts +230 -0
  197. package/src/auto-type-generator/typename-resolve-type-generator.ts +281 -0
  198. package/src/auto-type-generator/typename-types.ts +66 -0
  199. package/src/auto-type-generator/typename-validator.ts +326 -0
  200. package/src/cli.ts +2 -0
  201. package/src/commands/docs.ts +211 -0
  202. package/src/config/types.ts +15 -0
  203. package/src/config-loader/loader.ts +4 -0
  204. package/src/config-loader/validator.ts +33 -0
  205. package/src/gen-orchestrator/orchestrator.ts +50 -17
  206. package/src/resolver-extractor/extract-resolvers.ts +19 -0
  207. package/src/resolver-extractor/extractor/define-api-extractor.ts +28 -94
  208. package/src/resolver-extractor/index.ts +0 -6
  209. package/src/resolver-extractor/validator/abstract-resolver-validator.ts +16 -8
  210. package/src/schema-generator/builder/ast-builder.ts +52 -81
  211. package/src/schema-generator/emitter/code-emitter.ts +82 -11
  212. package/src/schema-generator/emitter/sdl-emitter.ts +0 -4
  213. package/src/schema-generator/generate-schema.ts +109 -14
  214. package/src/schema-generator/integrator/result-integrator.ts +91 -63
  215. package/src/schema-generator/resolver-collector/resolver-collector.ts +34 -0
  216. package/src/shared/branded-type-detector.ts +182 -0
  217. package/src/shared/enum-prefix-detector.ts +99 -0
  218. package/src/shared/ignore-fields-detector.ts +109 -0
  219. package/src/shared/ignore-fields-validator.ts +66 -0
  220. package/src/shared/index.ts +2 -0
  221. package/src/shared/source-location.ts +11 -0
  222. package/src/shared/string-utils.ts +7 -0
  223. package/src/type-extractor/converter/field-eligibility.ts +13 -29
  224. package/src/type-extractor/converter/graphql-converter.ts +37 -23
  225. package/src/type-extractor/extractor/field-type-resolver.ts +97 -7
  226. package/src/type-extractor/extractor/type-extractor.ts +103 -26
  227. package/src/type-extractor/types/diagnostics.ts +13 -2
  228. package/src/type-extractor/types/ts-type-reference-factory.ts +18 -5
  229. package/src/type-extractor/types/typescript.ts +4 -0
  230. package/src/type-extractor/validator/type-validator.ts +2 -15
  231. package/dist/resolver-extractor/validator/only-validator.d.ts +0 -61
  232. package/dist/resolver-extractor/validator/only-validator.d.ts.map +0 -1
  233. package/dist/resolver-extractor/validator/only-validator.js +0 -76
  234. package/dist/resolver-extractor/validator/only-validator.js.map +0 -1
  235. package/src/resolver-extractor/validator/only-validator.ts +0 -158
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Branded type detector.
3
+ *
4
+ * This module provides functions to detect branded type patterns in TypeScript
5
+ * intersection types and extract the underlying primitive type.
6
+ *
7
+ * Branded types are intersection types combining a primitive with a marker object:
8
+ * - `string & { __brand: 'UserId' }`
9
+ * - `number & { readonly __brand: unique symbol }`
10
+ * - `boolean & { __nominal: true }`
11
+ */
12
+ import ts from "typescript";
13
+ /**
14
+ * Property names commonly used as brand markers.
15
+ * These indicate the type is a branded type, not an actual object.
16
+ */
17
+ const BRAND_PROPERTY_NAMES = new Set([
18
+ "__brand",
19
+ "_brand",
20
+ "brand",
21
+ "__nominal",
22
+ "_nominal",
23
+ "__tag",
24
+ "_tag",
25
+ "__type",
26
+ ]);
27
+ /**
28
+ * Property names to exclude from brand detection.
29
+ * These are used by gqlkit for scalar metadata, not branding.
30
+ */
31
+ const EXCLUDED_BRAND_PROPERTIES = new Set([
32
+ " $gqlkitScalar",
33
+ ]);
34
+ /**
35
+ * Detects if a type is a branded primitive type.
36
+ *
37
+ * A branded type is an intersection type where:
38
+ * 1. One member is a primitive type (string, number, or boolean)
39
+ * 2. Other members are pure brand markers (objects with only brand properties)
40
+ *
41
+ * @param type - The TypeScript type to analyze
42
+ * @returns Detection result with isBranded flag and baseType
43
+ */
44
+ export function detectBrandedType(type) {
45
+ const notBranded = { isBranded: false, baseType: null };
46
+ if (!type.isIntersection()) {
47
+ return notBranded;
48
+ }
49
+ let primitiveBase = null;
50
+ let hasNonBrandMember = false;
51
+ for (const member of type.types) {
52
+ const primitiveType = getPrimitiveType(member);
53
+ if (primitiveType !== null) {
54
+ if (primitiveBase !== null && primitiveBase !== primitiveType) {
55
+ // Multiple different primitive types - not a valid branded type
56
+ return notBranded;
57
+ }
58
+ primitiveBase = primitiveType;
59
+ continue;
60
+ }
61
+ // Check if this member is a pure brand marker
62
+ if (!isPureBrandMarker(member)) {
63
+ hasNonBrandMember = true;
64
+ break;
65
+ }
66
+ }
67
+ if (hasNonBrandMember || primitiveBase === null) {
68
+ return notBranded;
69
+ }
70
+ return { isBranded: true, baseType: primitiveBase };
71
+ }
72
+ /**
73
+ * Detects if all types in the array are branded with the same base type.
74
+ *
75
+ * This is useful for union types where branded boolean expands to:
76
+ * `(true & { __nominal: true }) | (false & { __nominal: true })`
77
+ *
78
+ * @param types - Array of TypeScript types to analyze
79
+ * @returns Common branded result if all types are branded with the same base, otherwise non-branded
80
+ */
81
+ export function detectUniformBrandedType(types) {
82
+ if (types.length === 0) {
83
+ return { isBranded: false, baseType: null };
84
+ }
85
+ const first = detectBrandedType(types[0]);
86
+ if (!first.isBranded) {
87
+ return { isBranded: false, baseType: null };
88
+ }
89
+ for (let i = 1; i < types.length; i++) {
90
+ const result = detectBrandedType(types[i]);
91
+ if (!result.isBranded || result.baseType !== first.baseType) {
92
+ return { isBranded: false, baseType: null };
93
+ }
94
+ }
95
+ return first;
96
+ }
97
+ /**
98
+ * Gets the primitive type from a TypeScript type.
99
+ *
100
+ * @returns "string", "number", "boolean", or null if not a primitive
101
+ */
102
+ function getPrimitiveType(type) {
103
+ if (type.flags & ts.TypeFlags.String) {
104
+ return "string";
105
+ }
106
+ if (type.flags & ts.TypeFlags.Number) {
107
+ return "number";
108
+ }
109
+ if (type.flags & ts.TypeFlags.Boolean ||
110
+ type.flags & ts.TypeFlags.BooleanLiteral) {
111
+ return "boolean";
112
+ }
113
+ return null;
114
+ }
115
+ /**
116
+ * Checks if a type is a pure brand marker.
117
+ *
118
+ * A pure brand marker is an object type where all properties are
119
+ * brand-related (e.g., __brand, __nominal, __tag).
120
+ *
121
+ * @param type - The type to check
122
+ * @returns true if the type is a pure brand marker
123
+ */
124
+ function isPureBrandMarker(type) {
125
+ if (!(type.flags & ts.TypeFlags.Object)) {
126
+ return false;
127
+ }
128
+ const properties = type.getProperties();
129
+ if (properties.length === 0) {
130
+ // Empty object is not a brand marker
131
+ return false;
132
+ }
133
+ for (const prop of properties) {
134
+ const propName = prop.getName();
135
+ // Excluded properties (like gqlkit metadata) disqualify as brand marker
136
+ if (EXCLUDED_BRAND_PROPERTIES.has(propName)) {
137
+ return false;
138
+ }
139
+ // If any property is not a brand property, this is not a pure brand marker
140
+ if (!BRAND_PROPERTY_NAMES.has(propName)) {
141
+ return false;
142
+ }
143
+ }
144
+ return true;
145
+ }
146
+ //# sourceMappingURL=branded-type-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branded-type-detector.js","sourceRoot":"","sources":["../../src/shared/branded-type-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAY5B;;;GAGG;AACH,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC;IACxD,SAAS;IACT,QAAQ;IACR,OAAO;IACP,WAAW;IACX,UAAU;IACV,OAAO;IACP,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,gBAAgB;CACjB,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAa;IAC7C,MAAM,UAAU,GAAsB,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAE3E,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QAC3B,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,IAAI,aAAa,GAA2C,IAAI,CAAC;IACjE,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAE9B,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAChC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YAC3B,IAAI,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,aAAa,EAAE,CAAC;gBAC9D,gEAAgE;gBACh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any naming convention to UPPER_SNAKE_CASE.
3
+ *
4
+ * Supports PascalCase, camelCase, UPPER_SNAKE_CASE, and single word inputs.
5
+ *
6
+ * @example
7
+ * toUpperSnakeCase("UserStatus") // => "USER_STATUS"
8
+ * toUpperSnakeCase("userStatus") // => "USER_STATUS"
9
+ * toUpperSnakeCase("USER_STATUS") // => "USER_STATUS"
10
+ * toUpperSnakeCase("Status") // => "STATUS"
11
+ */
12
+ export declare function toUpperSnakeCase(name: string): string;
13
+ /**
14
+ * Builds the prefix candidate string for enum prefix stripping.
15
+ *
16
+ * Converts the enum name to UPPER_SNAKE_CASE and appends "_" to create
17
+ * the prefix that will be checked against all enum values.
18
+ *
19
+ * @example
20
+ * buildEnumPrefixCandidate("UserStatus") // => "USER_STATUS_"
21
+ * buildEnumPrefixCandidate("userStatus") // => "USER_STATUS_"
22
+ * buildEnumPrefixCandidate("USER_STATUS") // => "USER_STATUS_"
23
+ * buildEnumPrefixCandidate("Status") // => "STATUS_"
24
+ */
25
+ export declare function buildEnumPrefixCandidate(enumName: string): string;
26
+ export interface DetectEnumPrefixParams {
27
+ readonly enumName: string;
28
+ readonly memberValues: ReadonlyArray<string>;
29
+ }
30
+ export interface DetectEnumPrefixResult {
31
+ readonly shouldStrip: boolean;
32
+ readonly prefix: string | null;
33
+ }
34
+ /**
35
+ * Detects whether an enum is a candidate for prefix stripping.
36
+ *
37
+ * Conditions for stripping:
38
+ * 1. All memberValues must start with `${toUpperSnakeCase(enumName)}_`
39
+ * 2. After removing the prefix, the remaining string must be non-empty
40
+ *
41
+ * @example
42
+ * detectEnumPrefix({
43
+ * enumName: "UserStatus",
44
+ * memberValues: ["USER_STATUS_ACTIVE", "USER_STATUS_INACTIVE"]
45
+ * })
46
+ * // => { shouldStrip: true, prefix: "USER_STATUS_" }
47
+ *
48
+ * detectEnumPrefix({
49
+ * enumName: "UserStatus",
50
+ * memberValues: ["ACTIVE", "INACTIVE"]
51
+ * })
52
+ * // => { shouldStrip: false, prefix: null }
53
+ */
54
+ export declare function detectEnumPrefix(params: DetectEnumPrefixParams): DetectEnumPrefixResult;
55
+ /**
56
+ * Removes the detected prefix from an enum value.
57
+ *
58
+ * @example
59
+ * stripEnumPrefix("USER_STATUS_ACTIVE", "USER_STATUS_")
60
+ * // => "ACTIVE"
61
+ */
62
+ export declare function stripEnumPrefix(value: string, prefix: string): string;
63
+ //# sourceMappingURL=enum-prefix-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-prefix-detector.d.ts","sourceRoot":"","sources":["../../src/shared/enum-prefix-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAqBxB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAErE"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Converts an enum name from any naming convention to UPPER_SNAKE_CASE.
3
+ *
4
+ * Supports PascalCase, camelCase, UPPER_SNAKE_CASE, and single word inputs.
5
+ *
6
+ * @example
7
+ * toUpperSnakeCase("UserStatus") // => "USER_STATUS"
8
+ * toUpperSnakeCase("userStatus") // => "USER_STATUS"
9
+ * toUpperSnakeCase("USER_STATUS") // => "USER_STATUS"
10
+ * toUpperSnakeCase("Status") // => "STATUS"
11
+ */
12
+ export function toUpperSnakeCase(name) {
13
+ return name
14
+ .replace(/([a-z])([A-Z])/g, "$1_$2")
15
+ .replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2")
16
+ .toUpperCase();
17
+ }
18
+ /**
19
+ * Builds the prefix candidate string for enum prefix stripping.
20
+ *
21
+ * Converts the enum name to UPPER_SNAKE_CASE and appends "_" to create
22
+ * the prefix that will be checked against all enum values.
23
+ *
24
+ * @example
25
+ * buildEnumPrefixCandidate("UserStatus") // => "USER_STATUS_"
26
+ * buildEnumPrefixCandidate("userStatus") // => "USER_STATUS_"
27
+ * buildEnumPrefixCandidate("USER_STATUS") // => "USER_STATUS_"
28
+ * buildEnumPrefixCandidate("Status") // => "STATUS_"
29
+ */
30
+ export function buildEnumPrefixCandidate(enumName) {
31
+ return `${toUpperSnakeCase(enumName)}_`;
32
+ }
33
+ /**
34
+ * Detects whether an enum is a candidate for prefix stripping.
35
+ *
36
+ * Conditions for stripping:
37
+ * 1. All memberValues must start with `${toUpperSnakeCase(enumName)}_`
38
+ * 2. After removing the prefix, the remaining string must be non-empty
39
+ *
40
+ * @example
41
+ * detectEnumPrefix({
42
+ * enumName: "UserStatus",
43
+ * memberValues: ["USER_STATUS_ACTIVE", "USER_STATUS_INACTIVE"]
44
+ * })
45
+ * // => { shouldStrip: true, prefix: "USER_STATUS_" }
46
+ *
47
+ * detectEnumPrefix({
48
+ * enumName: "UserStatus",
49
+ * memberValues: ["ACTIVE", "INACTIVE"]
50
+ * })
51
+ * // => { shouldStrip: false, prefix: null }
52
+ */
53
+ export function detectEnumPrefix(params) {
54
+ const { enumName, memberValues } = params;
55
+ if (memberValues.length === 0) {
56
+ return { shouldStrip: false, prefix: null };
57
+ }
58
+ const prefixCandidate = buildEnumPrefixCandidate(enumName);
59
+ for (const value of memberValues) {
60
+ if (!value.startsWith(prefixCandidate)) {
61
+ return { shouldStrip: false, prefix: null };
62
+ }
63
+ const stripped = value.slice(prefixCandidate.length);
64
+ if (stripped === "") {
65
+ return { shouldStrip: false, prefix: null };
66
+ }
67
+ }
68
+ return { shouldStrip: true, prefix: prefixCandidate };
69
+ }
70
+ /**
71
+ * Removes the detected prefix from an enum value.
72
+ *
73
+ * @example
74
+ * stripEnumPrefix("USER_STATUS_ACTIVE", "USER_STATUS_")
75
+ * // => "ACTIVE"
76
+ */
77
+ export function stripEnumPrefix(value, prefix) {
78
+ return value.slice(prefix.length);
79
+ }
80
+ //# sourceMappingURL=enum-prefix-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-prefix-detector.js","sourceRoot":"","sources":["../../src/shared/enum-prefix-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI;SACR,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;SACnC,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC;SACzC,WAAW,EAAE,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC1C,CAAC;AAYD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAA8B;IAE9B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAE1C,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,MAAM,eAAe,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAE3D,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;YACvC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC9C,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;YACpB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AACxD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,MAAc;IAC3D,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * IgnoreFields metadata detector.
3
+ *
4
+ * This module provides functions to detect ignoreFields metadata embedded
5
+ * in TypeScript intersection types using the $gqlkitTypeMeta property.
6
+ */
7
+ import ts from "typescript";
8
+ /**
9
+ * Parameters for detectIgnoreFieldsMetadata function.
10
+ */
11
+ export interface DetectIgnoreFieldsParams {
12
+ readonly type: ts.Type;
13
+ readonly checker: ts.TypeChecker;
14
+ }
15
+ /**
16
+ * Detects ignoreFields metadata from a TypeScript type.
17
+ *
18
+ * This function analyzes TypeScript types to detect ignoreFields metadata
19
+ * from the $gqlkitTypeMeta property. It extracts string literal or string
20
+ * literal union types and returns them as a Set.
21
+ *
22
+ * @param params - The detection parameters containing type and checker
23
+ * @returns The ignoreFields set or null if not specified
24
+ */
25
+ export declare function detectIgnoreFieldsMetadata(params: DetectIgnoreFieldsParams): ReadonlySet<string> | null;
26
+ //# sourceMappingURL=ignore-fields-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-fields-detector.d.ts","sourceRoot":"","sources":["../../src/shared/ignore-fields-detector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAM5B;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;CAClC;AA2DD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,wBAAwB,GAC/B,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAkB5B"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * IgnoreFields metadata detector.
3
+ *
4
+ * This module provides functions to detect ignoreFields metadata embedded
5
+ * in TypeScript intersection types using the $gqlkitTypeMeta property.
6
+ */
7
+ import ts from "typescript";
8
+ import { METADATA_PROPERTIES } from "./constants.js";
9
+ import { getActualMetadataType } from "./metadata-detector.js";
10
+ const TYPE_META_PROPERTY = METADATA_PROPERTIES.TYPE_META;
11
+ /**
12
+ * Extracts ignoreFields from a type's metadata.
13
+ * Returns null if the type doesn't have $gqlkitTypeMeta or ignoreFields is not specified.
14
+ */
15
+ function extractIgnoreFieldsFromType(type, checker) {
16
+ const metaProp = type.getProperty(TYPE_META_PROPERTY);
17
+ if (!metaProp) {
18
+ return null;
19
+ }
20
+ const rawMetadataType = checker.getTypeOfSymbol(metaProp);
21
+ const metadataType = getActualMetadataType(rawMetadataType);
22
+ if (!metadataType) {
23
+ return null;
24
+ }
25
+ const ignoreFieldsProp = metadataType.getProperty("ignoreFields");
26
+ if (!ignoreFieldsProp) {
27
+ return null;
28
+ }
29
+ const rawIgnoreFieldsType = checker.getTypeOfSymbol(ignoreFieldsProp);
30
+ const ignoreFieldsType = getActualMetadataType(rawIgnoreFieldsType);
31
+ if (!ignoreFieldsType) {
32
+ return null;
33
+ }
34
+ return extractStringLiteralUnion(ignoreFieldsType);
35
+ }
36
+ /**
37
+ * Extracts string literals from a type (single literal or union of literals).
38
+ */
39
+ function extractStringLiteralUnion(type) {
40
+ if (type.flags & ts.TypeFlags.StringLiteral) {
41
+ const value = type.value;
42
+ return new Set([value]);
43
+ }
44
+ if (type.isUnion()) {
45
+ const values = new Set();
46
+ for (const member of type.types) {
47
+ if (member.flags & ts.TypeFlags.StringLiteral) {
48
+ values.add(member.value);
49
+ }
50
+ }
51
+ if (values.size > 0) {
52
+ return values;
53
+ }
54
+ }
55
+ return null;
56
+ }
57
+ /**
58
+ * Detects ignoreFields metadata from a TypeScript type.
59
+ *
60
+ * This function analyzes TypeScript types to detect ignoreFields metadata
61
+ * from the $gqlkitTypeMeta property. It extracts string literal or string
62
+ * literal union types and returns them as a Set.
63
+ *
64
+ * @param params - The detection parameters containing type and checker
65
+ * @returns The ignoreFields set or null if not specified
66
+ */
67
+ export function detectIgnoreFieldsMetadata(params) {
68
+ const { type, checker } = params;
69
+ const result = extractIgnoreFieldsFromType(type, checker);
70
+ if (result) {
71
+ return result;
72
+ }
73
+ if (type.isIntersection()) {
74
+ for (const member of type.types) {
75
+ const memberResult = extractIgnoreFieldsFromType(member, checker);
76
+ if (memberResult) {
77
+ return memberResult;
78
+ }
79
+ }
80
+ }
81
+ return null;
82
+ }
83
+ //# sourceMappingURL=ignore-fields-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-fields-detector.js","sourceRoot":"","sources":["../../src/shared/ignore-fields-detector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,SAAS,CAAC;AAUzD;;;GAGG;AACH,SAAS,2BAA2B,CAClC,IAAa,EACb,OAAuB;IAEvB,MAAM,QAAQ,GAAG,IAAI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AC,KAAK,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAgC;IAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEjC,MAAM,MAAM,GAAG,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QAC1B,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChC,MAAM,YAAY,GAAG,2BAA2B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAClE,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,YAAY,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * IgnoreFields validator.
3
+ *
4
+ * This module provides validation functions for ignoreFields metadata,
5
+ * checking that specified field names exist in the type and that not
6
+ * all fields are excluded.
7
+ */
8
+ import type { Diagnostic, SourceLocation } from "../type-extractor/types/diagnostics.js";
9
+ /**
10
+ * Parameters for validateIgnoreFields function.
11
+ */
12
+ export interface ValidateIgnoreFieldsParams {
13
+ readonly typeName: string;
14
+ readonly ignoreFields: ReadonlySet<string>;
15
+ readonly allFieldNames: ReadonlySet<string>;
16
+ readonly sourceLocation: SourceLocation;
17
+ }
18
+ /**
19
+ * Validates ignoreFields metadata.
20
+ *
21
+ * This function checks:
22
+ * 1. All field names in ignoreFields exist in the type
23
+ * 2. Not all fields are excluded (at least one field must remain)
24
+ *
25
+ * @param params - The validation parameters
26
+ * @returns Array of diagnostics (empty if valid)
27
+ */
28
+ export declare function validateIgnoreFields(params: ValidateIgnoreFieldsParams): ReadonlyArray<Diagnostic>;
29
+ //# sourceMappingURL=ignore-fields-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-fields-validator.d.ts","sourceRoot":"","sources":["../../src/shared/ignore-fields-validator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,0BAA0B,GACjC,aAAa,CAAC,UAAU,CAAC,CA8B3B"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * IgnoreFields validator.
3
+ *
4
+ * This module provides validation functions for ignoreFields metadata,
5
+ * checking that specified field names exist in the type and that not
6
+ * all fields are excluded.
7
+ */
8
+ /**
9
+ * Validates ignoreFields metadata.
10
+ *
11
+ * This function checks:
12
+ * 1. All field names in ignoreFields exist in the type
13
+ * 2. Not all fields are excluded (at least one field must remain)
14
+ *
15
+ * @param params - The validation parameters
16
+ * @returns Array of diagnostics (empty if valid)
17
+ */
18
+ export function validateIgnoreFields(params) {
19
+ const { typeName, ignoreFields, allFieldNames, sourceLocation } = params;
20
+ const diagnostics = [];
21
+ for (const fieldName of ignoreFields) {
22
+ if (!allFieldNames.has(fieldName)) {
23
+ const availableFields = [...allFieldNames].sort().join(", ");
24
+ diagnostics.push({
25
+ code: "IGNORE_FIELD_NOT_FOUND",
26
+ message: `Type '${typeName}': ignoreFields contains unknown field '${fieldName}'. Available fields: ${availableFields}`,
27
+ severity: "error",
28
+ location: sourceLocation,
29
+ });
30
+ }
31
+ }
32
+ const remainingFieldCount = [...allFieldNames].filter((f) => !ignoreFields.has(f)).length;
33
+ if (remainingFieldCount === 0 && allFieldNames.size > 0) {
34
+ diagnostics.push({
35
+ code: "IGNORE_ALL_FIELDS",
36
+ message: `Type '${typeName}': ignoreFields excludes all fields. At least one field must remain.`,
37
+ severity: "error",
38
+ location: sourceLocation,
39
+ });
40
+ }
41
+ return diagnostics;
42
+ }
43
+ //# sourceMappingURL=ignore-fields-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-fields-validator.js","sourceRoot":"","sources":["../../src/shared/ignore-fields-validator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAkC;IAElC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IACzE,MAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE,CAAC;QACrC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAClC,MAAM,eAAe,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7D,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,SAAS,QAAQ,2CAA2C,SAAS,wBAAwB,eAAe,EAAE;gBACvH,QAAQ,EAAE,OAAO;gBACjB,QAAQ,EAAE,cAAc;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,mBAAmB,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,MAAM,CACnD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAC5B,CAAC,MAAM,CAAC;IAET,IAAI,mBAAmB,KAAK,CAAC,IAAI,aAAa,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACxD,WAAW,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,mBAAmB;YACzB,OAAO,EAAE,SAAS,QAAQ,sEAAsE;YAChG,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -3,6 +3,8 @@ export { collectDiagnostics, deduplicateDiagnostics } from "./diagnostics.js";
3
3
  export { type DirectiveArgumentDefinition, type DirectiveDefinitionError, type DirectiveDefinitionErrorCode, type DirectiveDefinitionExtractionResult, type DirectiveDefinitionInfo, type DirectiveLocation, extractDirectiveDefinitions, } from "./directive-definition-extractor.js";
4
4
  export type { DirectiveArgument, DirectiveArgumentValue, DirectiveDetectionError, DirectiveDetectionErrorCode, DirectiveDetectionResult, DirectiveInfo, } from "./directive-detector.js";
5
5
  export { type ScanOptions, type ScanResult, scanDirectory, } from "./file-scanner.js";
6
+ export type { DetectIgnoreFieldsParams } from "./ignore-fields-detector.js";
7
+ export type { ValidateIgnoreFieldsParams } from "./ignore-fields-validator.js";
6
8
  export type { TypeConverter } from "./inline-object-extractor.js";
7
9
  export { toPosixPath } from "./path-utils.js";
8
10
  export type { SourceLocation } from "./source-location.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,4BAA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,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAOL,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAS7C,OAAO,EAGL,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAOL,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAS7C,OAAO,EAGL,aAAa,GACd,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC"}
@@ -8,4 +8,9 @@ export interface SourceLocation {
8
8
  * Extracts source location from a TypeScript AST node.
9
9
  */
10
10
  export declare function getSourceLocationFromNode(node: ts.Node | undefined): SourceLocation | null;
11
+ /**
12
+ * Returns the source location if present, otherwise creates a default location
13
+ * with the given source file and line/column 1.
14
+ */
15
+ export declare function getSourceLocationOrDefault(location: SourceLocation | null, sourceFile: string): SourceLocation;
11
16
  //# sourceMappingURL=source-location.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-location.d.ts","sourceRoot":"","sources":["../../src/shared/source-location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GACxB,cAAc,GAAG,IAAI,CAavB"}
1
+ {"version":3,"file":"source-location.d.ts","sourceRoot":"","sources":["../../src/shared/source-location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GACxB,cAAc,GAAG,IAAI,CAavB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,EAAE,MAAM,GACjB,cAAc,CAEhB"}
@@ -12,4 +12,11 @@ export function getSourceLocationFromNode(node) {
12
12
  column: character + 1,
13
13
  };
14
14
  }
15
+ /**
16
+ * Returns the source location if present, otherwise creates a default location
17
+ * with the given source file and line/column 1.
18
+ */
19
+ export function getSourceLocationOrDefault(location, sourceFile) {
20
+ return location ?? { file: sourceFile, line: 1, column: 1 };
21
+ }
15
22
  //# sourceMappingURL=source-location.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-location.js","sourceRoot":"","sources":["../../src/shared/source-location.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAyB;IAEzB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,6BAA6B,CAClE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAC1B,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,QAAQ;QACzB,IAAI,EAAE,IAAI,GAAG,CAAC;QACd,MAAM,EAAE,SAAS,GAAG,CAAC;KACtB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"source-location.js","sourceRoot":"","sources":["../../src/shared/source-location.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAyB;IAEzB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,6BAA6B,CAClE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAC1B,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,QAAQ;QACzB,IAAI,EAAE,IAAI,GAAG,CAAC;QACd,MAAM,EAAE,SAAS,GAAG,CAAC;KACtB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,QAA+B,EAC/B,UAAkB;IAElB,OAAO,QAAQ,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function toScreamingSnakeCase(value: string): string;
2
+ //# sourceMappingURL=string-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/shared/string-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM1D"}
@@ -0,0 +1,8 @@
1
+ export function toScreamingSnakeCase(value) {
2
+ return value
3
+ .replace(/[-\s]+/g, "_")
4
+ .replace(/([a-z])([A-Z])/g, "$1_$2")
5
+ .replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2")
6
+ .toUpperCase();
7
+ }
8
+ //# sourceMappingURL=string-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-utils.js","sourceRoot":"","sources":["../../src/shared/string-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK;SACT,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;SACnC,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC;SACzC,WAAW,EAAE,CAAC;AACnB,CAAC"}
@@ -18,14 +18,16 @@ export type EligibilityResult = {
18
18
  readonly eligible: false;
19
19
  readonly skipReason: SkipReason;
20
20
  };
21
+ export type FieldEligibilityKind = "object" | "input";
22
+ export interface IsEligibleFieldParams {
23
+ readonly fieldName: string;
24
+ readonly kind: FieldEligibilityKind;
25
+ }
21
26
  /**
22
- * Check if a field name is eligible to be included as a GraphQL object field.
27
+ * Check if a field name is eligible to be included as a GraphQL field.
28
+ * Uses the kind parameter to determine the error message prefix.
23
29
  */
24
- export declare function isEligibleAsObjectField(fieldName: string): EligibilityResult;
25
- /**
26
- * Check if a field name is eligible to be included as a GraphQL input object field.
27
- */
28
- export declare function isEligibleAsInputObjectField(fieldName: string): EligibilityResult;
30
+ export declare function isEligibleField(params: IsEligibleFieldParams): EligibilityResult;
29
31
  /**
30
32
  * Check if an enum value name is eligible to be included as a GraphQL enum value.
31
33
  * Note: The name should be the converted (SCREAMING_SNAKE_CASE) name, not the original.
@@ -1 +1 @@
1
- {"version":3,"file":"field-eligibility.d.ts","sourceRoot":"","sources":["../../../src/type-extractor/converter/field-eligibility.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC;AAWlE;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAsB5E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,GAChB,iBAAiB,CAsBnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,iBAAiB,CAsBnB"}
1
+ {"version":3,"file":"field-eligibility.d.ts","sourceRoot":"","sources":["../../../src/type-extractor/converter/field-eligibility.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,iBAAiB,GACzB;IAAE,Q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