@skmtc/core 0.26.0 → 0.28.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 (238) hide show
  1. package/README.md +4 -2
  2. package/esm/anchors/ParserAdapter.d.ts +22 -3
  3. package/esm/anchors/ParserAdapter.d.ts.map +1 -1
  4. package/esm/anchors/attribute.d.ts.map +1 -1
  5. package/esm/anchors/buildSidecar.d.ts.map +1 -1
  6. package/esm/anchors/generationMap.d.ts.map +1 -1
  7. package/esm/context/CoreContext.d.ts.map +1 -1
  8. package/esm/context/CoreContext.js +4 -2
  9. package/esm/context/GenerateContext.d.ts +12 -0
  10. package/esm/context/GenerateContext.d.ts.map +1 -1
  11. package/esm/context/GenerateContext.js +117 -23
  12. package/esm/context/ParseContext.d.ts.map +1 -1
  13. package/esm/context/generateTypes.d.ts +31 -0
  14. package/esm/context/generateTypes.d.ts.map +1 -1
  15. package/esm/deps/jsr.io/@std/path/1.1.6/extname.d.ts +25 -0
  16. package/esm/deps/jsr.io/@std/path/1.1.6/extname.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/path/1.1.6/extname.js +31 -0
  18. package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts +42 -0
  19. package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.js +98 -0
  21. package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +18 -0
  22. package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.js +83 -0
  24. package/esm/dsl/GeneratorKeys.d.ts.map +1 -1
  25. package/esm/dsl/Lang.d.ts.map +1 -1
  26. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  27. package/esm/dsl/model/ModelDriver.js +1 -2
  28. package/esm/dsl/model/toModelProjectionBase.d.ts +1 -1
  29. package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  30. package/esm/dsl/model/toModelProjectionBase.js +9 -9
  31. package/esm/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
  32. package/esm/dsl/operation/gql/GqlOperationDriver.js +1 -3
  33. package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +1 -1
  34. package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
  35. package/esm/dsl/operation/gql/toGqlOperationProjectionBase.js +9 -9
  36. package/esm/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
  37. package/esm/dsl/operation/oas/OasOperationDriver.js +1 -3
  38. package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts +1 -1
  39. package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
  40. package/esm/dsl/operation/oas/toOasOperationProjectionBase.js +9 -15
  41. package/esm/dsl/webhook/WebhookDriver.d.ts.map +1 -1
  42. package/esm/dsl/webhook/WebhookDriver.js +1 -3
  43. package/esm/dsl/webhook/toWebhookProjectionBase.d.ts +1 -1
  44. package/esm/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
  45. package/esm/dsl/webhook/toWebhookProjectionBase.js +9 -15
  46. package/esm/enrichments/EnrichmentAudit.d.ts +79 -0
  47. package/esm/enrichments/EnrichmentAudit.d.ts.map +1 -0
  48. package/esm/enrichments/EnrichmentAudit.js +210 -0
  49. package/esm/enrichments/EnrichmentWarning.d.ts +72 -0
  50. package/esm/enrichments/EnrichmentWarning.d.ts.map +1 -0
  51. package/esm/enrichments/EnrichmentWarning.js +50 -0
  52. package/esm/enrichments/findUnknownKeys.d.ts +40 -0
  53. package/esm/enrichments/findUnknownKeys.d.ts.map +1 -0
  54. package/esm/enrichments/findUnknownKeys.js +80 -0
  55. package/esm/enrichments/parseEnrichmentUmbrella.d.ts +63 -0
  56. package/esm/enrichments/parseEnrichmentUmbrella.d.ts.map +1 -0
  57. package/esm/enrichments/parseEnrichmentUmbrella.js +66 -0
  58. package/esm/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
  59. package/esm/enrichments/toEnrichmentDescriptor.js +1 -20
  60. package/esm/enrichments/valibotShape.d.ts +51 -0
  61. package/esm/enrichments/valibotShape.d.ts.map +1 -0
  62. package/esm/enrichments/valibotShape.js +37 -0
  63. package/esm/enrichments/validateConfig.d.ts.map +1 -1
  64. package/esm/gql/_helpers/unwrapType.d.ts.map +1 -1
  65. package/esm/gql/enum/toEnumType.d.ts.map +1 -1
  66. package/esm/gql/field/toFieldSchema.d.ts.map +1 -1
  67. package/esm/gql/input/toInputType.d.ts.map +1 -1
  68. package/esm/gql/interface/toInterfaceUnion.d.ts.map +1 -1
  69. package/esm/gql/object/toObjectType.d.ts.map +1 -1
  70. package/esm/gql/operation/toRootField.d.ts.map +1 -1
  71. package/esm/gql/union/toUnionType.d.ts.map +1 -1
  72. package/esm/helpers/applyGeneratedSuffix.d.ts +43 -0
  73. package/esm/helpers/applyGeneratedSuffix.d.ts.map +1 -0
  74. package/esm/helpers/applyGeneratedSuffix.js +79 -0
  75. package/esm/helpers/nearestKey.d.ts +18 -0
  76. package/esm/helpers/nearestKey.d.ts.map +1 -0
  77. package/esm/helpers/nearestKey.js +60 -0
  78. package/esm/helpers/strings.d.ts.map +1 -1
  79. package/esm/mod.d.ts +3 -0
  80. package/esm/mod.d.ts.map +1 -1
  81. package/esm/mod.js +3 -0
  82. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  83. package/esm/oas/document/Document.d.ts.map +1 -1
  84. package/esm/oas/integer/Integer.d.ts.map +1 -1
  85. package/esm/oas/ref/Ref.d.ts.map +1 -1
  86. package/esm/oas/schemaPath/traverseSchema.d.ts.map +1 -1
  87. package/esm/oas/schemaPath/traverseSchema.js +3 -1
  88. package/esm/parse/v3-0/array/toArray.d.ts.map +1 -1
  89. package/esm/parse/v3-0/boolean/toBoolean.d.ts.map +1 -1
  90. package/esm/parse/v3-0/integer/toInteger.d.ts.map +1 -1
  91. package/esm/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
  92. package/esm/parse/v3-0/ref/toRefV31.d.ts.map +1 -1
  93. package/esm/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  94. package/esm/parse/v3-0/schema/toSchemasV3.js +7 -1
  95. package/esm/parse/v3-0/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  96. package/esm/parse/v3-0/string/toString.d.ts.map +1 -1
  97. package/esm/parse/v3-0/union/toUnion.d.ts.map +1 -1
  98. package/esm/parse/v3-0/unknown/toUnknown.d.ts.map +1 -1
  99. package/esm/parse/v3-0/webhook/toWebhooksV3.d.ts.map +1 -1
  100. package/esm/parse/v3-1/array/toArray.d.ts.map +1 -1
  101. package/esm/parse/v3-1/boolean/toBoolean.d.ts.map +1 -1
  102. package/esm/parse/v3-1/integer/toInteger.d.ts.map +1 -1
  103. package/esm/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
  104. package/esm/parse/v3-1/ref/toRefV31.d.ts.map +1 -1
  105. package/esm/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  106. package/esm/parse/v3-1/schema/toSchemasV3.js +7 -1
  107. package/esm/parse/v3-1/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  108. package/esm/parse/v3-1/string/toString.d.ts.map +1 -1
  109. package/esm/parse/v3-1/union/toUnion.d.ts.map +1 -1
  110. package/esm/parse/v3-1/unknown/toUnknown.d.ts.map +1 -1
  111. package/esm/parse/v3-1/webhook/toWebhooksV3.d.ts.map +1 -1
  112. package/esm/run/toArtifacts.d.ts.map +1 -1
  113. package/esm/run/toArtifacts.js +2 -1
  114. package/esm/types/Manifest.d.ts +17 -0
  115. package/esm/types/Manifest.d.ts.map +1 -1
  116. package/esm/types/Manifest.js +4 -1
  117. package/esm/types/Settings.d.ts +37 -3
  118. package/esm/types/Settings.d.ts.map +1 -1
  119. package/esm/types/Settings.js +15 -20
  120. package/package.json +1 -1
  121. package/script/anchors/ParserAdapter.d.ts +22 -3
  122. package/script/anchors/ParserAdapter.d.ts.map +1 -1
  123. package/script/anchors/attribute.d.ts.map +1 -1
  124. package/script/anchors/buildSidecar.d.ts.map +1 -1
  125. package/script/anchors/generationMap.d.ts.map +1 -1
  126. package/script/context/CoreContext.d.ts.map +1 -1
  127. package/script/context/CoreContext.js +4 -2
  128. package/script/context/GenerateContext.d.ts +12 -0
  129. package/script/context/GenerateContext.d.ts.map +1 -1
  130. package/script/context/GenerateContext.js +117 -23
  131. package/script/context/ParseContext.d.ts.map +1 -1
  132. package/script/context/generateTypes.d.ts +31 -0
  133. package/script/context/generateTypes.d.ts.map +1 -1
  134. package/script/deps/jsr.io/@std/path/1.1.6/extname.d.ts +25 -0
  135. package/script/deps/jsr.io/@std/path/1.1.6/extname.d.ts.map +1 -0
  136. package/script/deps/jsr.io/@std/path/1.1.6/extname.js +34 -0
  137. package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts +42 -0
  138. package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts.map +1 -0
  139. package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.js +101 -0
  140. package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +18 -0
  141. package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts.map +1 -0
  142. package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.js +86 -0
  143. package/script/dsl/GeneratorKeys.d.ts.map +1 -1
  144. package/script/dsl/Lang.d.ts.map +1 -1
  145. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  146. package/script/dsl/model/ModelDriver.js +1 -5
  147. package/script/dsl/model/toModelProjectionBase.d.ts +1 -1
  148. package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  149. package/script/dsl/model/toModelProjectionBase.js +9 -45
  150. package/script/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
  151. package/script/dsl/operation/gql/GqlOperationDriver.js +1 -6
  152. package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +1 -1
  153. package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
  154. package/script/dsl/operation/gql/toGqlOperationProjectionBase.js +9 -45
  155. package/script/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
  156. package/script/dsl/operation/oas/OasOperationDriver.js +1 -6
  157. package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts +1 -1
  158. package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
  159. package/script/dsl/operation/oas/toOasOperationProjectionBase.js +9 -51
  160. package/script/dsl/webhook/WebhookDriver.d.ts.map +1 -1
  161. package/script/dsl/webhook/WebhookDriver.js +1 -6
  162. package/script/dsl/webhook/toWebhookProjectionBase.d.ts +1 -1
  163. package/script/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
  164. package/script/dsl/webhook/toWebhookProjectionBase.js +9 -51
  165. package/script/enrichments/EnrichmentAudit.d.ts +79 -0
  166. package/script/enrichments/EnrichmentAudit.d.ts.map +1 -0
  167. package/script/enrichments/EnrichmentAudit.js +215 -0
  168. package/script/enrichments/EnrichmentWarning.d.ts +72 -0
  169. package/script/enrichments/EnrichmentWarning.d.ts.map +1 -0
  170. package/script/enrichments/EnrichmentWarning.js +87 -0
  171. package/script/enrichments/findUnknownKeys.d.ts +40 -0
  172. package/script/enrichments/findUnknownKeys.d.ts.map +1 -0
  173. package/script/enrichments/findUnknownKeys.js +84 -0
  174. package/script/enrichments/parseEnrichmentUmbrella.d.ts +63 -0
  175. package/script/enrichments/parseEnrichmentUmbrella.d.ts.map +1 -0
  176. package/script/enrichments/parseEnrichmentUmbrella.js +103 -0
  177. package/script/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
  178. package/script/enrichments/toEnrichmentDescriptor.js +10 -29
  179. package/script/enrichments/valibotShape.d.ts +51 -0
  180. package/script/enrichments/valibotShape.d.ts.map +1 -0
  181. package/script/enrichments/valibotShape.js +44 -0
  182. package/script/enrichments/validateConfig.d.ts.map +1 -1
  183. package/script/gql/_helpers/unwrapType.d.ts.map +1 -1
  184. package/script/gql/enum/toEnumType.d.ts.map +1 -1
  185. package/script/gql/field/toFieldSchema.d.ts.map +1 -1
  186. package/script/gql/input/toInputType.d.ts.map +1 -1
  187. package/script/gql/interface/toInterfaceUnion.d.ts.map +1 -1
  188. package/script/gql/object/toObjectType.d.ts.map +1 -1
  189. package/script/gql/operation/toRootField.d.ts.map +1 -1
  190. package/script/gql/union/toUnionType.d.ts.map +1 -1
  191. package/script/helpers/applyGeneratedSuffix.d.ts +43 -0
  192. package/script/helpers/applyGeneratedSuffix.d.ts.map +1 -0
  193. package/script/helpers/applyGeneratedSuffix.js +84 -0
  194. package/script/helpers/nearestKey.d.ts +18 -0
  195. package/script/helpers/nearestKey.d.ts.map +1 -0
  196. package/script/helpers/nearestKey.js +64 -0
  197. package/script/helpers/strings.d.ts.map +1 -1
  198. package/script/mod.d.ts +3 -0
  199. package/script/mod.d.ts.map +1 -1
  200. package/script/mod.js +3 -0
  201. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  202. package/script/oas/document/Document.d.ts.map +1 -1
  203. package/script/oas/integer/Integer.d.ts.map +1 -1
  204. package/script/oas/ref/Ref.d.ts.map +1 -1
  205. package/script/oas/schemaPath/traverseSchema.d.ts.map +1 -1
  206. package/script/oas/schemaPath/traverseSchema.js +3 -1
  207. package/script/parse/v3-0/array/toArray.d.ts.map +1 -1
  208. package/script/parse/v3-0/boolean/toBoolean.d.ts.map +1 -1
  209. package/script/parse/v3-0/integer/toInteger.d.ts.map +1 -1
  210. package/script/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
  211. package/script/parse/v3-0/ref/toRefV31.d.ts.map +1 -1
  212. package/script/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  213. package/script/parse/v3-0/schema/toSchemasV3.js +7 -1
  214. package/script/parse/v3-0/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  215. package/script/parse/v3-0/string/toString.d.ts.map +1 -1
  216. package/script/parse/v3-0/union/toUnion.d.ts.map +1 -1
  217. package/script/parse/v3-0/unknown/toUnknown.d.ts.map +1 -1
  218. package/script/parse/v3-0/webhook/toWebhooksV3.d.ts.map +1 -1
  219. package/script/parse/v3-1/array/toArray.d.ts.map +1 -1
  220. package/script/parse/v3-1/boolean/toBoolean.d.ts.map +1 -1
  221. package/script/parse/v3-1/integer/toInteger.d.ts.map +1 -1
  222. package/script/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
  223. package/script/parse/v3-1/ref/toRefV31.d.ts.map +1 -1
  224. package/script/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  225. package/script/parse/v3-1/schema/toSchemasV3.js +7 -1
  226. package/script/parse/v3-1/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  227. package/script/parse/v3-1/string/toString.d.ts.map +1 -1
  228. package/script/parse/v3-1/union/toUnion.d.ts.map +1 -1
  229. package/script/parse/v3-1/unknown/toUnknown.d.ts.map +1 -1
  230. package/script/parse/v3-1/webhook/toWebhooksV3.d.ts.map +1 -1
  231. package/script/run/toArtifacts.d.ts.map +1 -1
  232. package/script/run/toArtifacts.js +2 -1
  233. package/script/types/Manifest.d.ts +17 -0
  234. package/script/types/Manifest.d.ts.map +1 -1
  235. package/script/types/Manifest.js +4 -1
  236. package/script/types/Settings.d.ts +37 -3
  237. package/script/types/Settings.d.ts.map +1 -1
  238. package/script/types/Settings.js +12 -17
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview The enrichment-warning surface — the manifest's record of
4
+ * enrichment config that did not do what the consumer intended.
5
+ *
6
+ * Three validation layers precede this one: structural validation at CLI
7
+ * load (`generatorEnrichments`), the per-leaf Valibot parse at generate
8
+ * time (a wrongly-typed value in a reached leaf throws), and the
9
+ * missing-`'main'` variant throw (`toVariantList`). All three are loud.
10
+ * What they cannot see is *addressing*: a typo'd generator id, path,
11
+ * method, or model name makes `get()` miss silently — defaults apply and
12
+ * the config entry is dead. Unknown leaf keys are equally silent:
13
+ * `v.object` strips them before the generator sees them.
14
+ *
15
+ * `EnrichmentWarning` is the shared shape for both detectors:
16
+ *
17
+ * - the **consumption audit** (`EnrichmentAudit`) — records every
18
+ * enrichment lookup the engine performs during the generate walk and,
19
+ * post-walk, flags configured entries no lookup ever touched;
20
+ * - **unknown-key detection** (`findUnknownKeys`, run inside
21
+ * `parseEnrichmentUmbrella`) — flags leaf keys the generator's schema
22
+ * does not declare.
23
+ *
24
+ * Both are warn-level and fail-open: generation output is never affected.
25
+ * The warnings ride the manifest (`manifest.enrichmentWarnings`) so
26
+ * post-run diagnostics can re-read them without re-running.
27
+ *
28
+ * @module EnrichmentWarning
29
+ */
30
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ var desc = Object.getOwnPropertyDescriptor(m, k);
33
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
34
+ desc = { enumerable: true, get: function() { return m[k]; } };
35
+ }
36
+ Object.defineProperty(o, k2, desc);
37
+ }) : (function(o, m, k, k2) {
38
+ if (k2 === undefined) k2 = k;
39
+ o[k2] = m[k];
40
+ }));
41
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
42
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
43
+ }) : function(o, v) {
44
+ o["default"] = v;
45
+ });
46
+ var __importStar = (this && this.__importStar) || (function () {
47
+ var ownKeys = function(o) {
48
+ ownKeys = Object.getOwnPropertyNames || function (o) {
49
+ var ar = [];
50
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
51
+ return ar;
52
+ };
53
+ return ownKeys(o);
54
+ };
55
+ return function (mod) {
56
+ if (mod && mod.__esModule) return mod;
57
+ var result = {};
58
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
59
+ __setModuleDefault(result, mod);
60
+ return result;
61
+ };
62
+ })();
63
+ Object.defineProperty(exports, "__esModule", { value: true });
64
+ exports.formatEnrichmentPath = exports.enrichmentWarning = exports.enrichmentWarningType = void 0;
65
+ const v = __importStar(require("valibot"));
66
+ exports.enrichmentWarningType = v.picklist([
67
+ 'UNCONSUMED_ENRICHMENT',
68
+ 'UNKNOWN_GENERATOR_ID',
69
+ 'UNKNOWN_ENRICHMENT_KEY',
70
+ 'SKIPPED_SUBJECT_ENRICHMENT',
71
+ 'SKIPPED_GENERATOR_ENRICHMENT'
72
+ ]);
73
+ exports.enrichmentWarning = v.object({
74
+ level: v.picklist(['warning', 'info']),
75
+ type: exports.enrichmentWarningType,
76
+ path: v.array(v.string()),
77
+ message: v.string(),
78
+ suggestion: v.optional(v.string())
79
+ });
80
+ /**
81
+ * Render a routing path for warning messages:
82
+ * `['@skmtc/gen-shadcn-form', '/pets', 'post']` →
83
+ * `'@skmtc/gen-shadcn-form → /pets → post'`. The arrow separator keeps
84
+ * segments visually distinct even when they contain dots or slashes.
85
+ */
86
+ const formatEnrichmentPath = (path) => path.join(' → ');
87
+ exports.formatEnrichmentPath = formatEnrichmentPath;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @fileoverview Unknown-key detection for enrichment leaves.
3
+ *
4
+ * Valibot's `v.object` strips keys the schema does not declare — a
5
+ * misspelled optional key (`submitLabl` for `submitLabel`) parses cleanly
6
+ * and the generator silently sees the default. `findUnknownKeys` walks a
7
+ * value against its schema and reports every key the schema would drop,
8
+ * so `parseEnrichmentUmbrella` can surface them as
9
+ * `UNKNOWN_ENRICHMENT_KEY` warnings.
10
+ *
11
+ * Comparing against the *schema* (not the parsed output) keeps the check
12
+ * immune to `v.pipe` transforms that legitimately reshape output, and
13
+ * gives correct "did you mean …?" suggestions — the intended key is in
14
+ * the schema's entries even when it is optional and absent from the
15
+ * parsed value. This is deliberately a warning layer, not
16
+ * `v.strictObject`: a shared client.json paired with an older generator
17
+ * version stays survivable under version skew instead of hard-failing.
18
+ *
19
+ * The walk is fail-open: unions, intersections, loose objects, and any
20
+ * shape it cannot attribute keys to are left alone.
21
+ *
22
+ * @module findUnknownKeys
23
+ */
24
+ /**
25
+ * One key the schema would silently drop. `path` runs from the walked
26
+ * root down to the unknown key (array indices as strings); `suggestion`
27
+ * is the nearest declared key at the same level, when a plausible typo
28
+ * target exists.
29
+ */
30
+ export type UnknownKey = {
31
+ path: string[];
32
+ suggestion?: string;
33
+ };
34
+ /**
35
+ * Every key in `value` that `schema` does not declare and `v.parse` would
36
+ * therefore drop. Wrong-typed values are not this function's concern —
37
+ * the subsequent `v.parse` throws on those as before.
38
+ */
39
+ export declare const findUnknownKeys: (schema: unknown, value: unknown) => UnknownKey[];
40
+ //# sourceMappingURL=findUnknownKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findUnknownKeys.d.ts","sourceRoot":"","sources":["../../src/enrichments/findUnknownKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAgDD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,EAAE,OAAO,OAAO,KAAG,UAAU,EAI3E,CAAA"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Unknown-key detection for enrichment leaves.
4
+ *
5
+ * Valibot's `v.object` strips keys the schema does not declare — a
6
+ * misspelled optional key (`submitLabl` for `submitLabel`) parses cleanly
7
+ * and the generator silently sees the default. `findUnknownKeys` walks a
8
+ * value against its schema and reports every key the schema would drop,
9
+ * so `parseEnrichmentUmbrella` can surface them as
10
+ * `UNKNOWN_ENRICHMENT_KEY` warnings.
11
+ *
12
+ * Comparing against the *schema* (not the parsed output) keeps the check
13
+ * immune to `v.pipe` transforms that legitimately reshape output, and
14
+ * gives correct "did you mean …?" suggestions — the intended key is in
15
+ * the schema's entries even when it is optional and absent from the
16
+ * parsed value. This is deliberately a warning layer, not
17
+ * `v.strictObject`: a shared client.json paired with an older generator
18
+ * version stays survivable under version skew instead of hard-failing.
19
+ *
20
+ * The walk is fail-open: unions, intersections, loose objects, and any
21
+ * shape it cannot attribute keys to are left alone.
22
+ *
23
+ * @module findUnknownKeys
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.findUnknownKeys = void 0;
27
+ const valibotShape_js_1 = require("./valibotShape.js");
28
+ const nearestKey_js_1 = require("../helpers/nearestKey.js");
29
+ const isRecord = (input) => typeof input === 'object' && input !== null && !Array.isArray(input);
30
+ const walk = (rawSchema, value, path, out) => {
31
+ if (value === undefined || value === null)
32
+ return;
33
+ if (!(0, valibotShape_js_1.isValibotSchema)(rawSchema))
34
+ return;
35
+ // A piped schema spreads its base, so `type` / `entries` / `item` are
36
+ // still visible here — no explicit pipe handling needed.
37
+ const { inner } = (0, valibotShape_js_1.unwrap)(rawSchema);
38
+ switch (inner.type) {
39
+ case 'object': {
40
+ if (!isRecord(value) || !(0, valibotShape_js_1.isEntriesRecord)(inner.entries))
41
+ return;
42
+ const entries = inner.entries;
43
+ const declared = Object.keys(entries);
44
+ for (const [key, member] of Object.entries(value)) {
45
+ if (key in entries) {
46
+ walk(entries[key], member, [...path, key], out);
47
+ continue;
48
+ }
49
+ const suggestion = (0, nearestKey_js_1.nearestKey)(key, declared);
50
+ out.push({ path: [...path, key], ...(suggestion !== undefined ? { suggestion } : {}) });
51
+ }
52
+ return;
53
+ }
54
+ case 'record': {
55
+ if (!isRecord(value))
56
+ return;
57
+ for (const [key, member] of Object.entries(value)) {
58
+ walk(inner.value, member, [...path, key], out);
59
+ }
60
+ return;
61
+ }
62
+ case 'array': {
63
+ if (!Array.isArray(value))
64
+ return;
65
+ value.forEach((member, index) => walk(inner.item, member, [...path, String(index)], out));
66
+ return;
67
+ }
68
+ default:
69
+ // Leaves, unions, intersections, loose/strict objects: nothing to
70
+ // attribute, or Valibot itself errors loudly (strict). Fail open.
71
+ return;
72
+ }
73
+ };
74
+ /**
75
+ * Every key in `value` that `schema` does not declare and `v.parse` would
76
+ * therefore drop. Wrong-typed values are not this function's concern —
77
+ * the subsequent `v.parse` throws on those as before.
78
+ */
79
+ const findUnknownKeys = (schema, value) => {
80
+ const out = [];
81
+ walk(schema, value, [], out);
82
+ return out;
83
+ };
84
+ exports.findUnknownKeys = findUnknownKeys;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @fileoverview The shared umbrella-parse seam for the projection-base
3
+ * factories.
4
+ *
5
+ * Every `static toEnrichments` — OAS operation, webhook, GQL operation,
6
+ * model — assembles the same `{ subject, generator, stack }` umbrella
7
+ * from three storage spots and parses it through the generator's
8
+ * composite schema. This helper centralizes that assembly so both
9
+ * enrichment-validation mechanisms ride one seam:
10
+ *
11
+ * - the reads go through `context.readEnrichment` — the recording
12
+ * accessor feeding the consumption audit (`EnrichmentAudit`);
13
+ * - the raw values are diffed against the schema (`findUnknownKeys`)
14
+ * and dropped keys surface as `UNKNOWN_ENRICHMENT_KEY` warnings.
15
+ *
16
+ * The `stack` scope is exempt from unknown-key detection: it is a single
17
+ * bag shared by every generator in the composition, and each consumer
18
+ * declares only the fields it reads — keys other generators own are
19
+ * expected, not typos.
20
+ *
21
+ * A wrong-typed value still throws exactly as before — the `v.parse` at
22
+ * the end is unchanged, and unknown-key detection runs first so a
23
+ * throwing leaf doesn't hide a dropped key.
24
+ *
25
+ * @module parseEnrichmentUmbrella
26
+ */
27
+ import * as v from 'valibot';
28
+ import { type EnrichmentWarning } from './EnrichmentWarning.js';
29
+ /**
30
+ * Minimal structural view of the context the parse needs. Any
31
+ * `GenerateContext` satisfies it; kept structural so the helper stays
32
+ * decoupled from the full context type and is trivially testable.
33
+ */
34
+ type UmbrellaParseContext = {
35
+ readEnrichment: (segments: readonly string[]) => unknown;
36
+ reportEnrichmentWarning: (warning: EnrichmentWarning) => void;
37
+ };
38
+ type ParseEnrichmentUmbrellaArgs<EnrichmentType> = {
39
+ context: UmbrellaParseContext;
40
+ generatorId: string;
41
+ /**
42
+ * Subject routing segments under `[generatorId]`, including the
43
+ * variant — `[path, method, variant]` for OAS operations,
44
+ * `[name, method, variant]` for webhooks,
45
+ * `[rootKind, fieldName, variant]` for GQL operations,
46
+ * `[refName, variant]` for models.
47
+ */
48
+ subjectSegments: readonly string[];
49
+ /** The generator's composite `{ subject, generator, stack }` schema. */
50
+ schema: v.GenericSchema<EnrichmentType>;
51
+ };
52
+ /**
53
+ * Assemble and parse one `{ subject, generator, stack }` enrichment
54
+ * umbrella, recording the reads for the consumption audit and reporting
55
+ * schema-dropped keys.
56
+ *
57
+ * @throws on a wrong-typed value, exactly like the raw `v.parse` this
58
+ * wraps — the generator's item is then recorded as `error` and the run
59
+ * continues (fail-open).
60
+ */
61
+ export declare const parseEnrichmentUmbrella: <EnrichmentType>({ context, generatorId, subjectSegments, schema }: ParseEnrichmentUmbrellaArgs<EnrichmentType>) => EnrichmentType;
62
+ export {};
63
+ //# sourceMappingURL=parseEnrichmentUmbrella.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseEnrichmentUmbrella.d.ts","sourceRoot":"","sources":["../../src/enrichments/parseEnrichmentUmbrella.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAErF;;;;GAIG;AACH,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAA;IACxD,uBAAuB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED,KAAK,2BAA2B,CAAC,cAAc,IAAI;IACjD,OAAO,EAAE,oBAAoB,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;OAMG;IACH,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,wEAAwE;IACxE,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;CACxC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAAI,cAAc,EAAE,mDAKrD,2BAA2B,CAAC,cAAc,CAAC,KAAG,cAgChD,CAAA"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview The shared umbrella-parse seam for the projection-base
4
+ * factories.
5
+ *
6
+ * Every `static toEnrichments` — OAS operation, webhook, GQL operation,
7
+ * model — assembles the same `{ subject, generator, stack }` umbrella
8
+ * from three storage spots and parses it through the generator's
9
+ * composite schema. This helper centralizes that assembly so both
10
+ * enrichment-validation mechanisms ride one seam:
11
+ *
12
+ * - the reads go through `context.readEnrichment` — the recording
13
+ * accessor feeding the consumption audit (`EnrichmentAudit`);
14
+ * - the raw values are diffed against the schema (`findUnknownKeys`)
15
+ * and dropped keys surface as `UNKNOWN_ENRICHMENT_KEY` warnings.
16
+ *
17
+ * The `stack` scope is exempt from unknown-key detection: it is a single
18
+ * bag shared by every generator in the composition, and each consumer
19
+ * declares only the fields it reads — keys other generators own are
20
+ * expected, not typos.
21
+ *
22
+ * A wrong-typed value still throws exactly as before — the `v.parse` at
23
+ * the end is unchanged, and unknown-key detection runs first so a
24
+ * throwing leaf doesn't hide a dropped key.
25
+ *
26
+ * @module parseEnrichmentUmbrella
27
+ */
28
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
+ if (k2 === undefined) k2 = k;
30
+ var desc = Object.getOwnPropertyDescriptor(m, k);
31
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32
+ desc = { enumerable: true, get: function() { return m[k]; } };
33
+ }
34
+ Object.defineProperty(o, k2, desc);
35
+ }) : (function(o, m, k, k2) {
36
+ if (k2 === undefined) k2 = k;
37
+ o[k2] = m[k];
38
+ }));
39
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
40
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
41
+ }) : function(o, v) {
42
+ o["default"] = v;
43
+ });
44
+ var __importStar = (this && this.__importStar) || (function () {
45
+ var ownKeys = function(o) {
46
+ ownKeys = Object.getOwnPropertyNames || function (o) {
47
+ var ar = [];
48
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
49
+ return ar;
50
+ };
51
+ return ownKeys(o);
52
+ };
53
+ return function (mod) {
54
+ if (mod && mod.__esModule) return mod;
55
+ var result = {};
56
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
57
+ __setModuleDefault(result, mod);
58
+ return result;
59
+ };
60
+ })();
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.parseEnrichmentUmbrella = void 0;
63
+ const v = __importStar(require("valibot"));
64
+ const Enrichments_js_1 = require("../types/Enrichments.js");
65
+ const findUnknownKeys_js_1 = require("./findUnknownKeys.js");
66
+ const EnrichmentWarning_js_1 = require("./EnrichmentWarning.js");
67
+ /**
68
+ * Assemble and parse one `{ subject, generator, stack }` enrichment
69
+ * umbrella, recording the reads for the consumption audit and reporting
70
+ * schema-dropped keys.
71
+ *
72
+ * @throws on a wrong-typed value, exactly like the raw `v.parse` this
73
+ * wraps — the generator's item is then recorded as `error` and the run
74
+ * continues (fail-open).
75
+ */
76
+ const parseEnrichmentUmbrella = ({ context, generatorId, subjectSegments, schema }) => {
77
+ const raw = {
78
+ subject: context.readEnrichment([generatorId, ...subjectSegments]),
79
+ generator: context.readEnrichment([generatorId, Enrichments_js_1.GENERATOR_ENRICHMENT_KEY]),
80
+ stack: context.readEnrichment([Enrichments_js_1.STACK_ENRICHMENT_KEY])
81
+ };
82
+ // Diff the generator-owned scopes against the schema (stack excluded —
83
+ // shared bag). Walking the umbrella keeps the scope schemas attributed
84
+ // without reaching into the composite's entries.
85
+ const unknownKeys = (0, findUnknownKeys_js_1.findUnknownKeys)(schema, { subject: raw.subject, generator: raw.generator });
86
+ for (const { path, suggestion } of unknownKeys) {
87
+ const [scope, ...leafPath] = path;
88
+ const routingPath = scope === 'subject'
89
+ ? [generatorId, ...subjectSegments, ...leafPath]
90
+ : [generatorId, Enrichments_js_1.GENERATOR_ENRICHMENT_KEY, ...leafPath];
91
+ context.reportEnrichmentWarning({
92
+ level: 'warning',
93
+ type: 'UNKNOWN_ENRICHMENT_KEY',
94
+ path: routingPath,
95
+ message: `unknown enrichment key '${routingPath[routingPath.length - 1]}' at ` +
96
+ `'${(0, EnrichmentWarning_js_1.formatEnrichmentPath)(routingPath.slice(0, -1))}' — ignored` +
97
+ (suggestion !== undefined ? ` (did you mean '${suggestion}'?)` : ''),
98
+ ...(suggestion !== undefined ? { suggestion } : {})
99
+ });
100
+ }
101
+ return v.parse(schema, raw);
102
+ };
103
+ exports.parseEnrichmentUmbrella = parseEnrichmentUmbrella;
@@ -1 +1 @@
1
- {"version":3,"file":"toEnrichmentDescriptor.d.ts","sourceRoot":"","sources":["../../src/enrichments/toEnrichmentDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAGjC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,8BAA8B;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,GACC;IACA,IAAI,EAAE,cAAc,CAAA;IACpB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB,GACC;IACA,IAAI,EAAE,OAAO,CAAA;IACb,0BAA0B;IAC1B,IAAI,EAAE,eAAe,CAAA;CACtB,GACC;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,kCAAkC;IAClC,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B,CAAA;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,CAAA;AAExE,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AAEzD,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AAE3D;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB;;;;;OAKG;IACH,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,CAAA;IACpE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,aAAa,CAAA;IACnD;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,OAAO,CAAA;CACxC,CAAA;AAqJD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,CAAC,CAAC,aAAa,GAAG,SAAS,KAAG,eAAe,EAKvF,CAAA;AAsBD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,gBAAgB,KAAG,oBAK/D,CAAA"}
1
+ {"version":3,"file":"toEnrichmentDescriptor.d.ts","sourceRoot":"","sources":["../../src/enrichments/toEnrichmentDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAUjC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,8BAA8B;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,GACD;IACE,IAAI,EAAE,cAAc,CAAA;IACpB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB,GACD;IACE,IAAI,EAAE,OAAO,CAAA;IACb,0BAA0B;IAC1B,IAAI,EAAE,eAAe,CAAA;CACtB,GACD;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,kCAAkC;IAClC,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B,CAAA;AAEL;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,CAAA;AAExE,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AAEzD,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AAE3D;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB;;;;;OAKG;IACH,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,CAAA;IACpE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,aAAa,CAAA;IACnD;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,OAAO,CAAA;CACxC,CAAA;AAwGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,CAAC,CAAC,aAAa,GAAG,SAAS,KAAG,eAAe,EAKvF,CAAA;AAsBD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,gBAAgB,KAAG,oBAK/D,CAAA"}
@@ -2,27 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toEnrichmentDescriptor = exports.toEnrichmentFields = void 0;
4
4
  const ModuleSelect_js_1 = require("../types/ModuleSelect.js");
5
- const isValibotSchema = (input) => typeof input === 'object' &&
6
- input !== null &&
7
- 'type' in input &&
8
- typeof input.type === 'string';
9
- const isEntriesRecord = (input) => typeof input === 'object' && input !== null;
5
+ const valibotShape_js_1 = require("./valibotShape.js");
10
6
  const isOptionsArray = (input) => Array.isArray(input);
11
- const WRAPPER_TYPES = new Set(['optional', 'nullable', 'nullish']);
12
- const unwrap = (schema) => {
13
- if (WRAPPER_TYPES.has(schema.type) && isValibotSchema(schema.wrapped)) {
14
- return { inner: schema.wrapped, optional: true };
15
- }
16
- return { inner: schema, optional: false };
17
- };
18
- /**
19
- * A `v.pipe(base, …actions)` schema spreads `base` and adds a `pipe` array
20
- * whose first element IS the original base schema. The `moduleSelect`
21
- * registry lookup must therefore also check the pipe's base, or piping a
22
- * moduleSelect through metadata (`v.title(…)`) would silently demote it to
23
- * a generic object widget.
24
- */
25
- const baseOf = (schema) => Array.isArray(schema.pipe) && isValibotSchema(schema.pipe[0]) ? schema.pipe[0] : schema;
26
7
  /** The `v.title(…)` metadata riding a piped schema, if any — the field label. */
27
8
  const titleOf = (schema) => {
28
9
  if (!Array.isArray(schema.pipe))
@@ -49,7 +30,7 @@ const titleOf = (schema) => {
49
30
  * rule is structural — it names no scope, so it composes with the generic
50
31
  * object walk rather than special-casing `subject` / `generator` / `stack`.
51
32
  */
52
- const isOmittedMember = (rawSchema) => isValibotSchema(rawSchema) && unwrap(rawSchema).inner.type === 'undefined';
33
+ const isOmittedMember = (rawSchema) => (0, valibotShape_js_1.isValibotSchema)(rawSchema) && (0, valibotShape_js_1.unwrap)(rawSchema).inner.type === 'undefined';
53
34
  const toLabel = (key) => {
54
35
  if (key === '')
55
36
  return '';
@@ -57,7 +38,7 @@ const toLabel = (key) => {
57
38
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
58
39
  };
59
40
  const typeFor = (schema) => {
60
- const moduleType = (0, ModuleSelect_js_1.moduleTypeOf)(schema) ?? (0, ModuleSelect_js_1.moduleTypeOf)(baseOf(schema));
41
+ const moduleType = (0, ModuleSelect_js_1.moduleTypeOf)(schema) ?? (0, ModuleSelect_js_1.moduleTypeOf)((0, valibotShape_js_1.baseOf)(schema));
61
42
  if (moduleType !== undefined) {
62
43
  return { type: 'moduleSelect', moduleType };
63
44
  }
@@ -73,14 +54,14 @@ const typeFor = (schema) => {
73
54
  return { type: 'select', options: opts };
74
55
  }
75
56
  case 'object': {
76
- const entries = isEntriesRecord(schema.entries) ? schema.entries : {};
57
+ const entries = (0, valibotShape_js_1.isEntriesRecord)(schema.entries) ? schema.entries : {};
77
58
  return {
78
59
  type: 'object',
79
60
  fields: walkEntries(entries)
80
61
  };
81
62
  }
82
63
  case 'array': {
83
- if (isValibotSchema(schema.item)) {
64
+ if ((0, valibotShape_js_1.isValibotSchema)(schema.item)) {
84
65
  return { type: 'array', item: walkFromShape('', schema.item) };
85
66
  }
86
67
  // An unrecognisable item schema degrades to a text item — consistent
@@ -92,14 +73,14 @@ const typeFor = (schema) => {
92
73
  }
93
74
  };
94
75
  const walkFromShape = (key, rawSchema) => {
95
- const { inner, optional } = unwrap(rawSchema);
76
+ const { inner, optional } = (0, valibotShape_js_1.unwrap)(rawSchema);
96
77
  // A `v.title(…)` label wins over the key-derived one; the title may ride
97
78
  // the schema itself or sit inside an optional wrapper.
98
79
  const label = titleOf(inner) ?? titleOf(rawSchema) ?? toLabel(key);
99
80
  return { key, label, optional, ...typeFor(inner) };
100
81
  };
101
82
  const walkField = (key, rawSchema) => {
102
- if (!isValibotSchema(rawSchema)) {
83
+ if (!(0, valibotShape_js_1.isValibotSchema)(rawSchema)) {
103
84
  return { key, label: toLabel(key), optional: false, type: 'text' };
104
85
  }
105
86
  return walkFromShape(key, rawSchema);
@@ -134,10 +115,10 @@ const walkEntries = (entries) => Object.keys(entries)
134
115
  * when only the field shape is needed.
135
116
  */
136
117
  const toEnrichmentFields = (schema) => {
137
- if (!isValibotSchema(schema))
118
+ if (!(0, valibotShape_js_1.isValibotSchema)(schema))
138
119
  return [];
139
- const { inner } = unwrap(schema);
140
- if (inner.type !== 'object' || !isEntriesRecord(inner.entries))
120
+ const { inner } = (0, valibotShape_js_1.unwrap)(schema);
121
+ if (inner.type !== 'object' || !(0, valibotShape_js_1.isEntriesRecord)(inner.entries))
141
122
  return [];
142
123
  return walkEntries(inner.entries);
143
124
  };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @fileoverview Structural view of Valibot schemas as observed at runtime.
3
+ *
4
+ * Valibot's declared `GenericSchema` is opaque (intentionally a black box
5
+ * for parse calls) but the runtime objects expose tagged-union shape via
6
+ * `type` plus the wrapper / container properties below. The walkers that
7
+ * traverse generator enrichment schemas — `toEnrichmentDescriptor` (form
8
+ * projection) and `findUnknownKeys` (dropped-key detection) — narrow into
9
+ * this view once at each entry point and stay inside it.
10
+ *
11
+ * @module valibotShape
12
+ */
13
+ import type * as v from 'valibot';
14
+ /**
15
+ * The runtime shape of a Valibot schema node. `wrapped` carries the inner
16
+ * schema of `optional` / `nullable` / `nullish` wrappers; `entries` the
17
+ * member schemas of an `object`; `item` an `array`'s element schema;
18
+ * `key` / `value` a `record`'s key and value schemas; `options` a
19
+ * `picklist` / union's choices; `pipe` a `v.pipe(...)`'s action chain
20
+ * (whose first element is the base schema).
21
+ */
22
+ export type ValibotSchemaShape = {
23
+ readonly type: string;
24
+ readonly wrapped?: unknown;
25
+ readonly entries?: unknown;
26
+ readonly item?: unknown;
27
+ readonly key?: unknown;
28
+ readonly value?: unknown;
29
+ readonly options?: unknown;
30
+ readonly pipe?: unknown;
31
+ };
32
+ export declare const isValibotSchema: (input: unknown) => input is ValibotSchemaShape;
33
+ export declare const isEntriesRecord: (input: unknown) => input is Record<string, v.GenericSchema>;
34
+ /**
35
+ * Strip a single `optional` / `nullable` / `nullish` wrapper, reporting
36
+ * whether one was present. Wrappers don't nest in practice (a schema is
37
+ * declared optional once), so one level suffices.
38
+ */
39
+ export declare const unwrap: (schema: ValibotSchemaShape) => {
40
+ inner: ValibotSchemaShape;
41
+ optional: boolean;
42
+ };
43
+ /**
44
+ * A `v.pipe(base, …actions)` schema spreads `base` and adds a `pipe` array
45
+ * whose first element IS the original base schema. Lookups keyed on schema
46
+ * *identity* (e.g. the `moduleSelect` registry) must therefore also check
47
+ * the pipe's base, or piping a schema through metadata (`v.title(…)`)
48
+ * would silently break the lookup.
49
+ */
50
+ export declare const baseOf: (schema: ValibotSchemaShape) => ValibotSchemaShape;
51
+ //# sourceMappingURL=valibotShape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valibotShape.d.ts","sourceRoot":"","sources":["../../src/enrichments/valibotShape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,kBAIH,CAAA;AAEvD,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aAAa,CAC3C,CAAA;AAI7C;;;;GAIG;AACH,eAAO,MAAM,MAAM,GACjB,QAAQ,kBAAkB,KACzB;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAKhD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,QAAQ,kBAAkB,KAAG,kBACqC,CAAA"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Structural view of Valibot schemas as observed at runtime.
4
+ *
5
+ * Valibot's declared `GenericSchema` is opaque (intentionally a black box
6
+ * for parse calls) but the runtime objects expose tagged-union shape via
7
+ * `type` plus the wrapper / container properties below. The walkers that
8
+ * traverse generator enrichment schemas — `toEnrichmentDescriptor` (form
9
+ * projection) and `findUnknownKeys` (dropped-key detection) — narrow into
10
+ * this view once at each entry point and stay inside it.
11
+ *
12
+ * @module valibotShape
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.baseOf = exports.unwrap = exports.isEntriesRecord = exports.isValibotSchema = void 0;
16
+ const isValibotSchema = (input) => typeof input === 'object' &&
17
+ input !== null &&
18
+ 'type' in input &&
19
+ typeof input.type === 'string';
20
+ exports.isValibotSchema = isValibotSchema;
21
+ const isEntriesRecord = (input) => typeof input === 'object' && input !== null;
22
+ exports.isEntriesRecord = isEntriesRecord;
23
+ const WRAPPER_TYPES = new Set(['optional', 'nullable', 'nullish']);
24
+ /**
25
+ * Strip a single `optional` / `nullable` / `nullish` wrapper, reporting
26
+ * whether one was present. Wrappers don't nest in practice (a schema is
27
+ * declared optional once), so one level suffices.
28
+ */
29
+ const unwrap = (schema) => {
30
+ if (WRAPPER_TYPES.has(schema.type) && (0, exports.isValibotSchema)(schema.wrapped)) {
31
+ return { inner: schema.wrapped, optional: true };
32
+ }
33
+ return { inner: schema, optional: false };
34
+ };
35
+ exports.unwrap = unwrap;
36
+ /**
37
+ * A `v.pipe(base, …actions)` schema spreads `base` and adds a `pipe` array
38
+ * whose first element IS the original base schema. Lookups keyed on schema
39
+ * *identity* (e.g. the `moduleSelect` registry) must therefore also check
40
+ * the pipe's base, or piping a schema through metadata (`v.title(…)`)
41
+ * would silently break the lookup.
42
+ */
43
+ const baseOf = (schema) => Array.isArray(schema.pipe) && (0, exports.isValibotSchema)(schema.pipe[0]) ? schema.pipe[0] : schema;
44
+ exports.baseOf = baseOf;
@@ -1 +1 @@
1
- {"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/enrichments/validateConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;AAEzE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,yBAAyB,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAkID;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,oBAAoB,GAAG,SAAS,EAC7C,SAAS,SAAS,gBAAgB,EAAE,KACnC,yBAAyB,EA6C3B,CAAA"}
1
+ {"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/enrichments/validateConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;AAEzE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,yBAAyB,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAuID;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,oBAAoB,GAAG,SAAS,EAC7C,SAAS,SAAS,gBAAgB,EAAE,KACnC,yBAAyB,EA+C3B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"unwrapType.d.ts","sourceRoot":"","sources":["../../../src/gql/_helpers/unwrapType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAGtB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,qEAAqE;IACrE,KAAK,EAAE,gBAAgB,CAAA;IACvB,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAA;IACf,oDAAoD;IACpD,aAAa,EAAE,OAAO,CAAA;IACtB,gFAAgF;IAChF,YAAY,EAAE,OAAO,CAAA;IACrB,yDAAyD;IACzD,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,WAAW,KAAG,aA2C9C,CAAA"}
1
+ {"version":3,"file":"unwrapType.d.ts","sourceRoot":"","sources":["../../../src/gql/_helpers/unwrapType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAA6B,MAAM,SAAS,CAAA;AAE5F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,qEAAqE;IACrE,KAAK,EAAE,gBAAgB,CAAA;IACvB,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAA;IACf,oDAAoD;IACpD,aAAa,EAAE,OAAO,CAAA;IACtB,gFAAgF;IAChF,YAAY,EAAE,OAAO,CAAA;IACrB,yDAAyD;IACzD,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,WAAW,KAAG,aA2C9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toEnumType.d.ts","sourceRoot":"","sources":["../../../src/gql/enum/toEnumType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,eAAe,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,6CAKxB,cAAc,KAAG,SAanB,CAAA"}
1
+ {"version":3,"file":"toEnumType.d.ts","sourceRoot":"","sources":["../../../src/gql/enum/toEnumType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,eAAe,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,6CAKxB,cAAc,KAAG,SAenB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toFieldSchema.d.ts","sourceRoot":"","sources":["../../../src/gql/field/toFieldSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAU1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GAAI,+BAI3B,iBAAiB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CA+EjD,CAAA"}
1
+ {"version":3,"file":"toFieldSchema.d.ts","sourceRoot":"","sources":["../../../src/gql/field/toFieldSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAU1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GAAI,+BAI3B,iBAAiB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAoFjD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toInputType.d.ts","sourceRoot":"","sources":["../../../src/gql/input/toInputType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAKtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,sBAAsB,CAAA;IACjC,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GAAI,oCAIzB,eAAe,KAAG,SAiCpB,CAAA"}
1
+ {"version":3,"file":"toInputType.d.ts","sourceRoot":"","sources":["../../../src/gql/input/toInputType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAKtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,sBAAsB,CAAA;IACjC,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GAAI,oCAAoC,eAAe,KAAG,SAmCjF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toInterfaceUnion.d.ts","sourceRoot":"","sources":["../../../src/gql/interface/toInterfaceUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAKnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,oBAAoB,CAAA;IACnC,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAI9B,oBAAoB,KAAG,QAyBzB,CAAA"}
1
+ {"version":3,"file":"toInterfaceUnion.d.ts","sourceRoot":"","sources":["../../../src/gql/interface/toInterfaceUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAKnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,oBAAoB,CAAA;IACnC,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAI9B,oBAAoB,KAAG,QA2BzB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toObjectType.d.ts","sourceRoot":"","sources":["../../../src/gql/object/toObjectType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAKtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,iBAAiB,GAAG,oBAAoB,CAAA;IACpD,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,qCAI1B,gBAAgB,KAAG,SAwDrB,CAAA"}
1
+ {"version":3,"file":"toObjectType.d.ts","sourceRoot":"","sources":["../../../src/gql/object/toObjectType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAKtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,iBAAiB,GAAG,oBAAoB,CAAA;IACpD,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,qCAAqC,gBAAgB,KAAG,SA0DpF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toRootField.d.ts","sourceRoot":"","sources":["../../../src/gql/operation/toRootField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,SAAS,CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,WAAW,CAAA;IACrB,KAAK,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACrC,OAAO,EAAE,gBAAgB,CAAA;IACzB;;;;;;OAMG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,0CAKzB,eAAe,KAAG,YAyDpB,CAAA"}
1
+ {"version":3,"file":"toRootField.d.ts","sourceRoot":"","sources":["../../../src/gql/operation/toRootField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,SAAS,CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,WAAW,CAAA;IACrB,KAAK,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACrC,OAAO,EAAE,gBAAgB,CAAA;IACzB;;;;;;OAMG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,0CAKzB,eAAe,KAAG,YA4DpB,CAAA"}