@kubb/ast 5.22.0 → 5.23.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 (155) hide show
  1. package/dist/base-IpYuh3ZP.d.cts +173 -0
  2. package/dist/base-IpYuh3ZP.d.ts +173 -0
  3. package/dist/constants-Ckeonm-D.js +141 -0
  4. package/dist/constants-Ckeonm-D.js.map +1 -0
  5. package/dist/constants-CquR083U.cjs +152 -0
  6. package/dist/constants-CquR083U.cjs.map +1 -0
  7. package/dist/factory.cjs +23 -0
  8. package/dist/factory.d.cts +4 -0
  9. package/dist/factory.d.ts +4 -0
  10. package/dist/factory.js +4 -0
  11. package/dist/file-BVqSiSvV.d.cts +624 -0
  12. package/dist/file-Cg0T6cgz.cjs +319 -0
  13. package/dist/file-Cg0T6cgz.cjs.map +1 -0
  14. package/dist/file-CnuL8oUj.js +283 -0
  15. package/dist/file-CnuL8oUj.js.map +1 -0
  16. package/dist/file-CvlMAp_d.js +131 -0
  17. package/dist/file-CvlMAp_d.js.map +1 -0
  18. package/dist/file-Dd50jPkH.cjs +142 -0
  19. package/dist/file-Dd50jPkH.cjs.map +1 -0
  20. package/dist/file-xJnBQPGq.d.ts +624 -0
  21. package/dist/file.cjs +3 -0
  22. package/dist/file.d.cts +2 -0
  23. package/dist/file.d.ts +2 -0
  24. package/dist/file.js +1 -0
  25. package/dist/graph-BcwFCvei.js +144 -0
  26. package/dist/graph-BcwFCvei.js.map +1 -0
  27. package/dist/graph-DcIY6tQb.cjs +173 -0
  28. package/dist/graph-DcIY6tQb.cjs.map +1 -0
  29. package/dist/graph.cjs +6 -0
  30. package/dist/graph.d.cts +2 -0
  31. package/dist/graph.d.ts +2 -0
  32. package/dist/graph.js +1 -0
  33. package/dist/guards-B8qDgSaT.d.cts +23 -0
  34. package/dist/guards-COVJE6TU.cjs +41 -0
  35. package/dist/guards-COVJE6TU.cjs.map +1 -0
  36. package/dist/guards-D-h9R_sV.d.ts +23 -0
  37. package/dist/guards-DlJkKsT1.js +30 -0
  38. package/dist/guards-DlJkKsT1.js.map +1 -0
  39. package/dist/http-Bm5lhVK4.cjs +12 -0
  40. package/dist/http-Bm5lhVK4.cjs.map +1 -0
  41. package/dist/http-DwboM6pK.js +7 -0
  42. package/dist/http-DwboM6pK.js.map +1 -0
  43. package/dist/http.cjs +4 -0
  44. package/dist/http.d.cts +3 -0
  45. package/dist/http.d.ts +3 -0
  46. package/dist/http.js +2 -0
  47. package/dist/index-BWd95onW.d.cts +5 -0
  48. package/dist/index-Bb1kqq8H.d.cts +20 -0
  49. package/dist/index-BngGJux5.d.cts +12 -0
  50. package/dist/index-BwnMIoLl.d.ts +24 -0
  51. package/dist/index-C-vhkzwR.d.cts +79 -0
  52. package/dist/index-CAGuKv6t.d.ts +74 -0
  53. package/dist/index-CFH4ZC7q.d.ts +44 -0
  54. package/dist/index-CIqwy4EE.d.cts +74 -0
  55. package/dist/index-Cc2K3OzU.d.cts +11 -0
  56. package/dist/index-Cc2K3OzU.d.ts +11 -0
  57. package/dist/index-Csf8xsCc.d.cts +46 -0
  58. package/dist/index-D3M2spDR.d.ts +12 -0
  59. package/dist/index-DNiIem0x.d.ts +79 -0
  60. package/dist/index-DSVef1pp.d.cts +24 -0
  61. package/dist/index-DU_jYpBt.d.cts +44 -0
  62. package/dist/index-DYDha-3I.d.cts +67 -0
  63. package/dist/index-DaHsMJ_S.d.ts +5 -0
  64. package/dist/index-Dp50LM3a.d.ts +67 -0
  65. package/dist/index-cpjUxIik.d.ts +46 -0
  66. package/dist/index-eGkM4FE9.d.ts +20 -0
  67. package/dist/index.cjs +87 -2131
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.d.cts +25 -2745
  70. package/dist/index.d.ts +25 -2745
  71. package/dist/index.js +40 -2052
  72. package/dist/index.js.map +1 -1
  73. package/dist/json-DH7_lcWm.js +74 -0
  74. package/dist/json-DH7_lcWm.js.map +1 -0
  75. package/dist/json-DURdtz9A.cjs +91 -0
  76. package/dist/json-DURdtz9A.cjs.map +1 -0
  77. package/dist/json.cjs +4 -0
  78. package/dist/json.d.cts +2 -0
  79. package/dist/json.d.ts +2 -0
  80. package/dist/json.js +1 -0
  81. package/dist/macro-D0KfNtff.js +104 -0
  82. package/dist/macro-D0KfNtff.js.map +1 -0
  83. package/dist/macro-DrTBT7fh.cjs +127 -0
  84. package/dist/macro-DrTBT7fh.cjs.map +1 -0
  85. package/dist/macro.cjs +4 -0
  86. package/dist/macro.d.cts +2 -0
  87. package/dist/macro.d.ts +2 -0
  88. package/dist/macro.js +1 -0
  89. package/dist/mediaType-CRjggmoG.js +19 -0
  90. package/dist/mediaType-CRjggmoG.js.map +1 -0
  91. package/dist/mediaType-D8uIO8sG.cjs +35 -0
  92. package/dist/mediaType-D8uIO8sG.cjs.map +1 -0
  93. package/dist/mediaType.cjs +4 -0
  94. package/dist/mediaType.d.cts +2 -0
  95. package/dist/mediaType.d.ts +2 -0
  96. package/dist/mediaType.js +1 -0
  97. package/dist/node-DjcETnc8.cjs +19 -0
  98. package/dist/node-DjcETnc8.cjs.map +1 -0
  99. package/dist/node-Djh-mZB2.js +14 -0
  100. package/dist/node-Djh-mZB2.js.map +1 -0
  101. package/dist/node.cjs +9 -0
  102. package/dist/node.d.cts +4 -0
  103. package/dist/node.d.ts +4 -0
  104. package/dist/node.js +5 -0
  105. package/dist/nodeText-DRb_rVd1.cjs +58 -0
  106. package/dist/nodeText-DRb_rVd1.cjs.map +1 -0
  107. package/dist/nodeText-DVVDZQjF.js +47 -0
  108. package/dist/nodeText-DVVDZQjF.js.map +1 -0
  109. package/dist/nodes-BB60Bq2H.cjs +320 -0
  110. package/dist/nodes-BB60Bq2H.cjs.map +1 -0
  111. package/dist/nodes-CWMa9xhW.js +231 -0
  112. package/dist/nodes-CWMa9xhW.js.map +1 -0
  113. package/dist/operation-BgRyVS7z.d.ts +1272 -0
  114. package/dist/operation-X7chCdL2.d.cts +1272 -0
  115. package/dist/optionality-D-zqzVMH.cjs +22 -0
  116. package/dist/optionality-D-zqzVMH.cjs.map +1 -0
  117. package/dist/optionality-DISn8ytP.js +17 -0
  118. package/dist/optionality-DISn8ytP.js.map +1 -0
  119. package/dist/promise-BOdlgT0N.cjs +50 -0
  120. package/dist/promise-BOdlgT0N.cjs.map +1 -0
  121. package/dist/promise-RpnEev9D.js +45 -0
  122. package/dist/promise-RpnEev9D.js.map +1 -0
  123. package/dist/ref-Bu7PoHar.js +22 -0
  124. package/dist/ref-Bu7PoHar.js.map +1 -0
  125. package/dist/ref-P0ZLT1Bg.cjs +39 -0
  126. package/dist/ref-P0ZLT1Bg.cjs.map +1 -0
  127. package/dist/ref.cjs +7 -0
  128. package/dist/ref.d.cts +2 -0
  129. package/dist/ref.d.ts +2 -0
  130. package/dist/ref.js +3 -0
  131. package/dist/refs-CYHpRlQo.cjs +131 -0
  132. package/dist/refs-CYHpRlQo.cjs.map +1 -0
  133. package/dist/refs-YCV3CznS.js +102 -0
  134. package/dist/refs-YCV3CznS.js.map +1 -0
  135. package/dist/rolldown-runtime-BV8xUvPy.cjs +52 -0
  136. package/dist/rolldown-runtime-BYyVTPww.js +16 -0
  137. package/dist/schema-2ZAQk7qE.js +44 -0
  138. package/dist/schema-2ZAQk7qE.js.map +1 -0
  139. package/dist/schema-BIErWqgc.cjs +214 -0
  140. package/dist/schema-BIErWqgc.cjs.map +1 -0
  141. package/dist/schema-DloctnMm.js +179 -0
  142. package/dist/schema-DloctnMm.js.map +1 -0
  143. package/dist/schema-hxMlgCrV.cjs +49 -0
  144. package/dist/schema-hxMlgCrV.cjs.map +1 -0
  145. package/dist/schema.cjs +16 -0
  146. package/dist/schema.d.cts +5 -0
  147. package/dist/schema.d.ts +5 -0
  148. package/dist/schema.js +6 -0
  149. package/dist/visitor-BZozlXBF.d.ts +179 -0
  150. package/dist/visitor-Bw_opzjF.d.cts +179 -0
  151. package/dist/visitor-DTrzvA3R.cjs +382 -0
  152. package/dist/visitor-DTrzvA3R.cjs.map +1 -0
  153. package/dist/visitor-NoQSUQTu.js +347 -0
  154. package/dist/visitor-NoQSUQTu.js.map +1 -0
  155. package/package.json +101 -1
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Union of the values of an object type, such as `ValueOf<typeof nodeKinds>` for an `as const` table.
3
+ */
4
+ type ValueOf<T> = T[keyof T];
5
+ /**
6
+ * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
7
+ */
8
+ declare const nodeKinds: {
9
+ readonly input: 'Input';
10
+ readonly operation: 'Operation';
11
+ readonly schema: 'Schema';
12
+ readonly property: 'Property';
13
+ readonly parameter: 'Parameter';
14
+ readonly response: 'Response';
15
+ readonly requestBody: 'RequestBody';
16
+ readonly content: 'Content';
17
+ readonly type: 'Type';
18
+ readonly file: 'File';
19
+ readonly import: 'Import';
20
+ readonly export: 'Export';
21
+ readonly source: 'Source';
22
+ readonly const: 'Const';
23
+ readonly function: 'Function';
24
+ readonly arrowFunction: 'ArrowFunction';
25
+ readonly text: 'Text';
26
+ readonly break: 'Break';
27
+ readonly jsx: 'Jsx';
28
+ };
29
+ /**
30
+ * Schema type discriminators used by all AST schema nodes.
31
+ *
32
+ * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).
33
+ */
34
+ declare const schemaTypes: {
35
+ /**
36
+ * Text value.
37
+ */
38
+ readonly string: 'string';
39
+ /**
40
+ * Floating-point number (`float`, `double`).
41
+ */
42
+ readonly number: 'number';
43
+ /**
44
+ * Whole number (`int32`). Use `bigint` for `int64`.
45
+ */
46
+ readonly integer: 'integer';
47
+ /**
48
+ * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.
49
+ */
50
+ readonly bigint: 'bigint';
51
+ /**
52
+ * Boolean value.
53
+ */
54
+ readonly boolean: 'boolean';
55
+ /**
56
+ * Explicit null value.
57
+ */
58
+ readonly null: 'null';
59
+ /**
60
+ * Any value (no type restriction).
61
+ */
62
+ readonly any: 'any';
63
+ /**
64
+ * Unknown value (must be narrowed before usage).
65
+ */
66
+ readonly unknown: 'unknown';
67
+ /**
68
+ * No return value (`void`).
69
+ */
70
+ readonly void: 'void';
71
+ /**
72
+ * Object with named properties.
73
+ */
74
+ readonly object: 'object';
75
+ /**
76
+ * Sequential list of items.
77
+ */
78
+ readonly array: 'array';
79
+ /**
80
+ * Fixed-length list with position-specific items.
81
+ */
82
+ readonly tuple: 'tuple';
83
+ /**
84
+ * "One of" multiple schema members.
85
+ */
86
+ readonly union: 'union';
87
+ /**
88
+ * "All of" multiple schema members.
89
+ */
90
+ readonly intersection: 'intersection';
91
+ /** "Not" a single schema member. */
92
+ readonly not: 'not';
93
+ /**
94
+ * Enum schema.
95
+ */
96
+ readonly enum: 'enum';
97
+ /**
98
+ * Reference to another schema.
99
+ */
100
+ readonly ref: 'ref';
101
+ /**
102
+ * Calendar date (for example `2026-03-24`).
103
+ */
104
+ readonly date: 'date';
105
+ /**
106
+ * Date-time value (for example `2026-03-24T09:00:00Z`).
107
+ */
108
+ readonly datetime: 'datetime';
109
+ /**
110
+ * Time-only value (for example `09:00:00`).
111
+ */
112
+ readonly time: 'time';
113
+ /**
114
+ * UUID value.
115
+ */
116
+ readonly uuid: 'uuid';
117
+ /**
118
+ * Email address value.
119
+ */
120
+ readonly email: 'email';
121
+ /**
122
+ * URL value.
123
+ */
124
+ readonly url: 'url';
125
+ /**
126
+ * IPv4 address value.
127
+ */
128
+ readonly ipv4: 'ipv4';
129
+ /**
130
+ * IPv6 address value.
131
+ */
132
+ readonly ipv6: 'ipv6';
133
+ /**
134
+ * Binary/blob value.
135
+ */
136
+ readonly blob: 'blob';
137
+ /**
138
+ * Impossible value (`never`).
139
+ */
140
+ readonly never: 'never';
141
+ };
142
+ /**
143
+ * `kind` values used by AST nodes.
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const kind: NodeKind = 'Schema'
148
+ * ```
149
+ */
150
+ type NodeKind = ValueOf<typeof nodeKinds>;
151
+ /**
152
+ * Base shape shared by all AST nodes.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * const base: BaseNode = { kind: 'Input' }
157
+ * ```
158
+ */
159
+ type BaseNode = {
160
+ /**
161
+ * Node discriminator.
162
+ */
163
+ kind: NodeKind;
164
+ /**
165
+ * Where the node comes from in the input, in the form the adapter's `locate` reads. Document
166
+ * adapters such as OpenAPI and AsyncAPI use an RFC 6901 JSON pointer, for example
167
+ * `#/components/schemas/Pet`. Plugins can copy it to the code nodes they emit.
168
+ */
169
+ pointer?: string;
170
+ };
171
+ /** `Omit` applied to each member of a union, so the union survives. */
172
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
173
+ export { schemaTypes as a, nodeKinds as i, DistributiveOmit as n, NodeKind as r, BaseNode as t };
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Union of the values of an object type, such as `ValueOf<typeof nodeKinds>` for an `as const` table.
3
+ */
4
+ type ValueOf<T> = T[keyof T];
5
+ /**
6
+ * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
7
+ */
8
+ declare const nodeKinds: {
9
+ readonly input: 'Input';
10
+ readonly operation: 'Operation';
11
+ readonly schema: 'Schema';
12
+ readonly property: 'Property';
13
+ readonly parameter: 'Parameter';
14
+ readonly response: 'Response';
15
+ readonly requestBody: 'RequestBody';
16
+ readonly content: 'Content';
17
+ readonly type: 'Type';
18
+ readonly file: 'File';
19
+ readonly import: 'Import';
20
+ readonly export: 'Export';
21
+ readonly source: 'Source';
22
+ readonly const: 'Const';
23
+ readonly function: 'Function';
24
+ readonly arrowFunction: 'ArrowFunction';
25
+ readonly text: 'Text';
26
+ readonly break: 'Break';
27
+ readonly jsx: 'Jsx';
28
+ };
29
+ /**
30
+ * Schema type discriminators used by all AST schema nodes.
31
+ *
32
+ * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).
33
+ */
34
+ declare const schemaTypes: {
35
+ /**
36
+ * Text value.
37
+ */
38
+ readonly string: 'string';
39
+ /**
40
+ * Floating-point number (`float`, `double`).
41
+ */
42
+ readonly number: 'number';
43
+ /**
44
+ * Whole number (`int32`). Use `bigint` for `int64`.
45
+ */
46
+ readonly integer: 'integer';
47
+ /**
48
+ * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.
49
+ */
50
+ readonly bigint: 'bigint';
51
+ /**
52
+ * Boolean value.
53
+ */
54
+ readonly boolean: 'boolean';
55
+ /**
56
+ * Explicit null value.
57
+ */
58
+ readonly null: 'null';
59
+ /**
60
+ * Any value (no type restriction).
61
+ */
62
+ readonly any: 'any';
63
+ /**
64
+ * Unknown value (must be narrowed before usage).
65
+ */
66
+ readonly unknown: 'unknown';
67
+ /**
68
+ * No return value (`void`).
69
+ */
70
+ readonly void: 'void';
71
+ /**
72
+ * Object with named properties.
73
+ */
74
+ readonly object: 'object';
75
+ /**
76
+ * Sequential list of items.
77
+ */
78
+ readonly array: 'array';
79
+ /**
80
+ * Fixed-length list with position-specific items.
81
+ */
82
+ readonly tuple: 'tuple';
83
+ /**
84
+ * "One of" multiple schema members.
85
+ */
86
+ readonly union: 'union';
87
+ /**
88
+ * "All of" multiple schema members.
89
+ */
90
+ readonly intersection: 'intersection';
91
+ /** "Not" a single schema member. */
92
+ readonly not: 'not';
93
+ /**
94
+ * Enum schema.
95
+ */
96
+ readonly enum: 'enum';
97
+ /**
98
+ * Reference to another schema.
99
+ */
100
+ readonly ref: 'ref';
101
+ /**
102
+ * Calendar date (for example `2026-03-24`).
103
+ */
104
+ readonly date: 'date';
105
+ /**
106
+ * Date-time value (for example `2026-03-24T09:00:00Z`).
107
+ */
108
+ readonly datetime: 'datetime';
109
+ /**
110
+ * Time-only value (for example `09:00:00`).
111
+ */
112
+ readonly time: 'time';
113
+ /**
114
+ * UUID value.
115
+ */
116
+ readonly uuid: 'uuid';
117
+ /**
118
+ * Email address value.
119
+ */
120
+ readonly email: 'email';
121
+ /**
122
+ * URL value.
123
+ */
124
+ readonly url: 'url';
125
+ /**
126
+ * IPv4 address value.
127
+ */
128
+ readonly ipv4: 'ipv4';
129
+ /**
130
+ * IPv6 address value.
131
+ */
132
+ readonly ipv6: 'ipv6';
133
+ /**
134
+ * Binary/blob value.
135
+ */
136
+ readonly blob: 'blob';
137
+ /**
138
+ * Impossible value (`never`).
139
+ */
140
+ readonly never: 'never';
141
+ };
142
+ /**
143
+ * `kind` values used by AST nodes.
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const kind: NodeKind = 'Schema'
148
+ * ```
149
+ */
150
+ type NodeKind = ValueOf<typeof nodeKinds>;
151
+ /**
152
+ * Base shape shared by all AST nodes.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * const base: BaseNode = { kind: 'Input' }
157
+ * ```
158
+ */
159
+ type BaseNode = {
160
+ /**
161
+ * Node discriminator.
162
+ */
163
+ kind: NodeKind;
164
+ /**
165
+ * Where the node comes from in the input, in the form the adapter's `locate` reads. Document
166
+ * adapters such as OpenAPI and AsyncAPI use an RFC 6901 JSON pointer, for example
167
+ * `#/components/schemas/Pet`. Plugins can copy it to the code nodes they emit.
168
+ */
169
+ pointer?: string;
170
+ };
171
+ /** `Omit` applied to each member of a union, so the union survives. */
172
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
173
+ export { schemaTypes as a, nodeKinds as i, DistributiveOmit as n, NodeKind as r, BaseNode as t };
@@ -0,0 +1,141 @@
1
+ // src/constants.ts
2
+ /**
3
+ * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
4
+ */
5
+ const nodeKinds = {
6
+ input: "Input",
7
+ operation: "Operation",
8
+ schema: "Schema",
9
+ property: "Property",
10
+ parameter: "Parameter",
11
+ response: "Response",
12
+ requestBody: "RequestBody",
13
+ content: "Content",
14
+ type: "Type",
15
+ file: "File",
16
+ import: "Import",
17
+ export: "Export",
18
+ source: "Source",
19
+ const: "Const",
20
+ function: "Function",
21
+ arrowFunction: "ArrowFunction",
22
+ text: "Text",
23
+ break: "Break",
24
+ jsx: "Jsx"
25
+ };
26
+ /**
27
+ * Schema type discriminators used by all AST schema nodes.
28
+ *
29
+ * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).
30
+ */
31
+ const schemaTypes = {
32
+ /**
33
+ * Text value.
34
+ */
35
+ string: "string",
36
+ /**
37
+ * Floating-point number (`float`, `double`).
38
+ */
39
+ number: "number",
40
+ /**
41
+ * Whole number (`int32`). Use `bigint` for `int64`.
42
+ */
43
+ integer: "integer",
44
+ /**
45
+ * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.
46
+ */
47
+ bigint: "bigint",
48
+ /**
49
+ * Boolean value.
50
+ */
51
+ boolean: "boolean",
52
+ /**
53
+ * Explicit null value.
54
+ */
55
+ null: "null",
56
+ /**
57
+ * Any value (no type restriction).
58
+ */
59
+ any: "any",
60
+ /**
61
+ * Unknown value (must be narrowed before usage).
62
+ */
63
+ unknown: "unknown",
64
+ /**
65
+ * No return value (`void`).
66
+ */
67
+ void: "void",
68
+ /**
69
+ * Object with named properties.
70
+ */
71
+ object: "object",
72
+ /**
73
+ * Sequential list of items.
74
+ */
75
+ array: "array",
76
+ /**
77
+ * Fixed-length list with position-specific items.
78
+ */
79
+ tuple: "tuple",
80
+ /**
81
+ * "One of" multiple schema members.
82
+ */
83
+ union: "union",
84
+ /**
85
+ * "All of" multiple schema members.
86
+ */
87
+ intersection: "intersection",
88
+ /** "Not" a single schema member. */
89
+ not: "not",
90
+ /**
91
+ * Enum schema.
92
+ */
93
+ enum: "enum",
94
+ /**
95
+ * Reference to another schema.
96
+ */
97
+ ref: "ref",
98
+ /**
99
+ * Calendar date (for example `2026-03-24`).
100
+ */
101
+ date: "date",
102
+ /**
103
+ * Date-time value (for example `2026-03-24T09:00:00Z`).
104
+ */
105
+ datetime: "datetime",
106
+ /**
107
+ * Time-only value (for example `09:00:00`).
108
+ */
109
+ time: "time",
110
+ /**
111
+ * UUID value.
112
+ */
113
+ uuid: "uuid",
114
+ /**
115
+ * Email address value.
116
+ */
117
+ email: "email",
118
+ /**
119
+ * URL value.
120
+ */
121
+ url: "url",
122
+ /**
123
+ * IPv4 address value.
124
+ */
125
+ ipv4: "ipv4",
126
+ /**
127
+ * IPv6 address value.
128
+ */
129
+ ipv6: "ipv6",
130
+ /**
131
+ * Binary/blob value.
132
+ */
133
+ blob: "blob",
134
+ /**
135
+ * Impossible value (`never`).
136
+ */
137
+ never: "never"
138
+ };
139
+ export { schemaTypes as n, nodeKinds as t };
140
+
141
+ //# sourceMappingURL=constants-Ckeonm-D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-Ckeonm-D.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
@@ -0,0 +1,152 @@
1
+ // src/constants.ts
2
+ /**
3
+ * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
4
+ */
5
+ const nodeKinds = {
6
+ input: "Input",
7
+ operation: "Operation",
8
+ schema: "Schema",
9
+ property: "Property",
10
+ parameter: "Parameter",
11
+ response: "Response",
12
+ requestBody: "RequestBody",
13
+ content: "Content",
14
+ type: "Type",
15
+ file: "File",
16
+ import: "Import",
17
+ export: "Export",
18
+ source: "Source",
19
+ const: "Const",
20
+ function: "Function",
21
+ arrowFunction: "ArrowFunction",
22
+ text: "Text",
23
+ break: "Break",
24
+ jsx: "Jsx"
25
+ };
26
+ /**
27
+ * Schema type discriminators used by all AST schema nodes.
28
+ *
29
+ * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).
30
+ */
31
+ const schemaTypes = {
32
+ /**
33
+ * Text value.
34
+ */
35
+ string: "string",
36
+ /**
37
+ * Floating-point number (`float`, `double`).
38
+ */
39
+ number: "number",
40
+ /**
41
+ * Whole number (`int32`). Use `bigint` for `int64`.
42
+ */
43
+ integer: "integer",
44
+ /**
45
+ * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.
46
+ */
47
+ bigint: "bigint",
48
+ /**
49
+ * Boolean value.
50
+ */
51
+ boolean: "boolean",
52
+ /**
53
+ * Explicit null value.
54
+ */
55
+ null: "null",
56
+ /**
57
+ * Any value (no type restriction).
58
+ */
59
+ any: "any",
60
+ /**
61
+ * Unknown value (must be narrowed before usage).
62
+ */
63
+ unknown: "unknown",
64
+ /**
65
+ * No return value (`void`).
66
+ */
67
+ void: "void",
68
+ /**
69
+ * Object with named properties.
70
+ */
71
+ object: "object",
72
+ /**
73
+ * Sequential list of items.
74
+ */
75
+ array: "array",
76
+ /**
77
+ * Fixed-length list with position-specific items.
78
+ */
79
+ tuple: "tuple",
80
+ /**
81
+ * "One of" multiple schema members.
82
+ */
83
+ union: "union",
84
+ /**
85
+ * "All of" multiple schema members.
86
+ */
87
+ intersection: "intersection",
88
+ /** "Not" a single schema member. */
89
+ not: "not",
90
+ /**
91
+ * Enum schema.
92
+ */
93
+ enum: "enum",
94
+ /**
95
+ * Reference to another schema.
96
+ */
97
+ ref: "ref",
98
+ /**
99
+ * Calendar date (for example `2026-03-24`).
100
+ */
101
+ date: "date",
102
+ /**
103
+ * Date-time value (for example `2026-03-24T09:00:00Z`).
104
+ */
105
+ datetime: "datetime",
106
+ /**
107
+ * Time-only value (for example `09:00:00`).
108
+ */
109
+ time: "time",
110
+ /**
111
+ * UUID value.
112
+ */
113
+ uuid: "uuid",
114
+ /**
115
+ * Email address value.
116
+ */
117
+ email: "email",
118
+ /**
119
+ * URL value.
120
+ */
121
+ url: "url",
122
+ /**
123
+ * IPv4 address value.
124
+ */
125
+ ipv4: "ipv4",
126
+ /**
127
+ * IPv6 address value.
128
+ */
129
+ ipv6: "ipv6",
130
+ /**
131
+ * Binary/blob value.
132
+ */
133
+ blob: "blob",
134
+ /**
135
+ * Impossible value (`never`).
136
+ */
137
+ never: "never"
138
+ };
139
+ Object.defineProperty(exports, "nodeKinds", {
140
+ enumerable: true,
141
+ get: function() {
142
+ return nodeKinds;
143
+ }
144
+ });
145
+ Object.defineProperty(exports, "schemaTypes", {
146
+ enumerable: true,
147
+ get: function() {
148
+ return schemaTypes;
149
+ }
150
+ });
151
+
152
+ //# sourceMappingURL=constants-CquR083U.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-CquR083U.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
@@ -0,0 +1,23 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_schema = require("./schema-hxMlgCrV.cjs");
3
+ const require_file = require("./file-Cg0T6cgz.cjs");
4
+ const require_nodes = require("./nodes-BB60Bq2H.cjs");
5
+ exports.createArrowFunction = require_nodes.createArrowFunction;
6
+ exports.createBreak = require_nodes.createBreak;
7
+ exports.createConst = require_nodes.createConst;
8
+ exports.createContent = require_nodes.createContent;
9
+ exports.createExport = require_file.createExport;
10
+ exports.createFile = require_file.createFile;
11
+ exports.createFunction = require_nodes.createFunction;
12
+ exports.createImport = require_file.createImport;
13
+ exports.createInput = require_nodes.createInput;
14
+ exports.createJsx = require_nodes.createJsx;
15
+ exports.createOperation = require_nodes.createOperation;
16
+ exports.createParameter = require_nodes.createParameter;
17
+ exports.createProperty = require_nodes.createProperty;
18
+ exports.createRequestBody = require_nodes.createRequestBody;
19
+ exports.createResponse = require_nodes.createResponse;
20
+ exports.createSchema = require_schema.createSchema;
21
+ exports.createSource = require_file.createSource;
22
+ exports.createText = require_nodes.createText;
23
+ exports.createType = require_nodes.createType;
@@ -0,0 +1,4 @@
1
+ import { C as createJsx, S as createFunction, T as createType, a as UserFileNode, b as createBreak, c as createImport, l as createSource, o as createExport, s as createFile, w as createText, x as createConst, y as createArrowFunction } from "./file-BVqSiSvV.cjs";
2
+ import { Y as createSchema, Z as createProperty, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-X7chCdL2.cjs";
3
+ import { t as Node } from "./index-DSVef1pp.cjs";
4
+ export { Node, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
@@ -0,0 +1,4 @@
1
+ import { C as createJsx, S as createFunction, T as createType, a as UserFileNode, b as createBreak, c as createImport, l as createSource, o as createExport, s as createFile, w as createText, x as createConst, y as createArrowFunction } from "./file-xJnBQPGq.js";
2
+ import { Y as createSchema, Z as createProperty, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-BgRyVS7z.js";
3
+ import { t as Node } from "./index-BwnMIoLl.js";
4
+ export { Node, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
@@ -0,0 +1,4 @@
1
+ import { t as createSchema } from "./schema-2ZAQk7qE.js";
2
+ import { i as createSource, n as createFile, r as createImport, t as createExport } from "./file-CnuL8oUj.js";
3
+ import { a as createOperation, c as createContent, d as createConst, f as createFunction, h as createType, i as createParameter, l as createArrowFunction, m as createText, n as createResponse, o as createRequestBody, p as createJsx, r as createProperty, s as createInput, u as createBreak } from "./nodes-CWMa9xhW.js";
4
+ export { createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };