@scarn/sdk 0.0.0 → 0.8.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.
- package/dist/{chunk-4361gxk0.js → chunk-0y2fy5en.js} +7 -7
- package/dist/{chunk-91p9vzcs.js → chunk-3ctaaseb.js} +405 -402
- package/dist/{chunk-9s07v9r1.js → chunk-4ggr8af6.js} +8 -8
- package/dist/chunk-5zsavw98.js +91 -0
- package/dist/chunk-63f90zky.js +39 -0
- package/dist/{chunk-tfm5hjzm.js → chunk-700xe701.js} +9 -9
- package/dist/{chunk-njd6npf0.js → chunk-ar6hcj1r.js} +6 -6
- package/dist/chunk-cdanncng.js +74 -0
- package/dist/chunk-dp86pa6m.js +68 -0
- package/dist/chunk-e1h021kq.js +86 -0
- package/dist/{chunk-ny07ncb9.js → chunk-gds7w7zh.js} +35 -35
- package/dist/chunk-k4y5qt4y.js +14 -0
- package/dist/{chunk-eg1hcvhb.js → chunk-mz53r914.js} +16 -16
- package/dist/{chunk-631ffb6r.js → chunk-ngy1fdcx.js} +10 -10
- package/dist/chunk-p7yrcmqm.js +322 -0
- package/dist/{chunk-h9yxx0hd.js → chunk-rt9tq4j6.js} +7 -7
- package/dist/{chunk-dnn39qt4.js → chunk-skzxcba3.js} +2960 -2217
- package/dist/{chunk-ynk2bjae.js → chunk-vfeytkqx.js} +89 -88
- package/dist/{chunk-56e4kp0a.js → chunk-y2pv8d6a.js} +19 -19
- package/dist/chunk-y64skrwp.js +17 -0
- package/dist/{chunk-rq3q8vg7.js → chunk-yjtaq94c.js} +69 -69
- package/dist/{chunk-qpw5wt1p.js → chunk-zm72ksz0.js} +26 -27
- package/dist/client.js +53 -52
- package/dist/contracts/artifact-markers.js +12 -11
- package/dist/contracts/artifacts.js +23 -21
- package/dist/contracts/pipeline-document/index.js +94 -92
- package/dist/contracts/step-artifact-submissions.js +17 -20
- package/dist/defaults/index.js +140 -139
- package/dist/definitions/pipelines/index.js +22 -20
- package/dist/definitions/steps/index.js +70 -67
- package/dist/definitions/validation/index.js +15 -13
- package/dist/devcontainer-config-path.js +11 -9
- package/dist/env-vars.js +33 -31
- package/dist/eslint.js +2 -0
- package/dist/generated/types.gen.d.ts +7 -0
- package/dist/git-url/git-repo-identity.js +2 -0
- package/dist/health-checks.js +17 -15
- package/dist/index.js +280 -277
- package/dist/jsonc.js +8 -7
- package/dist/managed-runtimes.js +11 -9
- package/dist/opencode-mcp.js +27 -25
- package/dist/pipelines/index.js +78 -75
- package/dist/push/code-step-lookup.js +8 -7
- package/dist/push/index.js +51 -52
- package/dist/repo-config.js +21 -19
- package/dist/scarn-config-parser.js +6 -5
- package/package.json +1 -1
- package/dist/chunk-4vehh3dq.js +0 -333
- package/dist/chunk-5mmj03ah.js +0 -1074
- package/dist/chunk-b21233rt.js +0 -78
- package/dist/chunk-g0rdnn0r.js +0 -95
- package/dist/chunk-p6kc9wq8.js +0 -97
- package/dist/chunk-s0gap8r8.js +0 -14
- package/dist/chunk-zpqyjgb4.js +0 -49
package/dist/chunk-5mmj03ah.js
DELETED
|
@@ -1,1074 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__export,
|
|
4
|
-
NEVER,
|
|
5
|
-
$brand,
|
|
6
|
-
config,
|
|
7
|
-
clone,
|
|
8
|
-
exports_util,
|
|
9
|
-
flattenError,
|
|
10
|
-
formatError,
|
|
11
|
-
treeifyError,
|
|
12
|
-
prettifyError,
|
|
13
|
-
exports_regexes,
|
|
14
|
-
en_default,
|
|
15
|
-
exports_locales,
|
|
16
|
-
$output,
|
|
17
|
-
$input,
|
|
18
|
-
registry,
|
|
19
|
-
globalRegistry,
|
|
20
|
-
_coercedString,
|
|
21
|
-
TimePrecision,
|
|
22
|
-
_coercedNumber,
|
|
23
|
-
_coercedBoolean,
|
|
24
|
-
_coercedBigint,
|
|
25
|
-
_coercedDate,
|
|
26
|
-
_lt,
|
|
27
|
-
_lte,
|
|
28
|
-
_gt,
|
|
29
|
-
_gte,
|
|
30
|
-
_positive,
|
|
31
|
-
_negative,
|
|
32
|
-
_nonpositive,
|
|
33
|
-
_nonnegative,
|
|
34
|
-
_multipleOf,
|
|
35
|
-
_maxSize,
|
|
36
|
-
_minSize,
|
|
37
|
-
_size,
|
|
38
|
-
_maxLength,
|
|
39
|
-
_minLength,
|
|
40
|
-
_length,
|
|
41
|
-
_regex,
|
|
42
|
-
_lowercase,
|
|
43
|
-
_uppercase,
|
|
44
|
-
_includes,
|
|
45
|
-
_startsWith,
|
|
46
|
-
_endsWith,
|
|
47
|
-
_property,
|
|
48
|
-
_mime,
|
|
49
|
-
_overwrite,
|
|
50
|
-
_normalize,
|
|
51
|
-
_trim,
|
|
52
|
-
_toLowerCase,
|
|
53
|
-
_toUpperCase,
|
|
54
|
-
_slugify,
|
|
55
|
-
toJSONSchema,
|
|
56
|
-
exports_core,
|
|
57
|
-
exports_checks,
|
|
58
|
-
ZodISODateTime,
|
|
59
|
-
ZodISODate,
|
|
60
|
-
ZodISOTime,
|
|
61
|
-
ZodISODuration,
|
|
62
|
-
exports_iso,
|
|
63
|
-
ZodError,
|
|
64
|
-
ZodRealError,
|
|
65
|
-
parse,
|
|
66
|
-
parseAsync,
|
|
67
|
-
safeParse,
|
|
68
|
-
safeParseAsync,
|
|
69
|
-
encode,
|
|
70
|
-
decode,
|
|
71
|
-
encodeAsync,
|
|
72
|
-
decodeAsync,
|
|
73
|
-
safeEncode,
|
|
74
|
-
safeDecode,
|
|
75
|
-
safeEncodeAsync,
|
|
76
|
-
safeDecodeAsync,
|
|
77
|
-
ZodType,
|
|
78
|
-
_ZodString,
|
|
79
|
-
ZodString,
|
|
80
|
-
string,
|
|
81
|
-
ZodStringFormat,
|
|
82
|
-
ZodEmail,
|
|
83
|
-
email,
|
|
84
|
-
ZodGUID,
|
|
85
|
-
guid,
|
|
86
|
-
ZodUUID,
|
|
87
|
-
uuid,
|
|
88
|
-
uuidv4,
|
|
89
|
-
uuidv6,
|
|
90
|
-
uuidv7,
|
|
91
|
-
ZodURL,
|
|
92
|
-
url,
|
|
93
|
-
httpUrl,
|
|
94
|
-
ZodEmoji,
|
|
95
|
-
emoji,
|
|
96
|
-
ZodNanoID,
|
|
97
|
-
nanoid,
|
|
98
|
-
ZodCUID,
|
|
99
|
-
cuid,
|
|
100
|
-
ZodCUID2,
|
|
101
|
-
cuid2,
|
|
102
|
-
ZodULID,
|
|
103
|
-
ulid,
|
|
104
|
-
ZodXID,
|
|
105
|
-
xid,
|
|
106
|
-
ZodKSUID,
|
|
107
|
-
ksuid,
|
|
108
|
-
ZodIPv4,
|
|
109
|
-
ipv4,
|
|
110
|
-
ZodMAC,
|
|
111
|
-
mac,
|
|
112
|
-
ZodIPv6,
|
|
113
|
-
ipv6,
|
|
114
|
-
ZodCIDRv4,
|
|
115
|
-
cidrv4,
|
|
116
|
-
ZodCIDRv6,
|
|
117
|
-
cidrv6,
|
|
118
|
-
ZodBase64,
|
|
119
|
-
base64,
|
|
120
|
-
ZodBase64URL,
|
|
121
|
-
base64url,
|
|
122
|
-
ZodE164,
|
|
123
|
-
e164,
|
|
124
|
-
ZodJWT,
|
|
125
|
-
jwt,
|
|
126
|
-
ZodCustomStringFormat,
|
|
127
|
-
stringFormat,
|
|
128
|
-
hostname,
|
|
129
|
-
hex,
|
|
130
|
-
hash,
|
|
131
|
-
ZodNumber,
|
|
132
|
-
number,
|
|
133
|
-
ZodNumberFormat,
|
|
134
|
-
int,
|
|
135
|
-
float32,
|
|
136
|
-
float64,
|
|
137
|
-
int32,
|
|
138
|
-
uint32,
|
|
139
|
-
ZodBoolean,
|
|
140
|
-
boolean,
|
|
141
|
-
ZodBigInt,
|
|
142
|
-
bigint,
|
|
143
|
-
ZodBigIntFormat,
|
|
144
|
-
int64,
|
|
145
|
-
uint64,
|
|
146
|
-
ZodSymbol,
|
|
147
|
-
symbol,
|
|
148
|
-
ZodUndefined,
|
|
149
|
-
_undefined,
|
|
150
|
-
ZodNull,
|
|
151
|
-
_null,
|
|
152
|
-
ZodAny,
|
|
153
|
-
any3,
|
|
154
|
-
ZodUnknown,
|
|
155
|
-
unknown,
|
|
156
|
-
ZodNever,
|
|
157
|
-
never,
|
|
158
|
-
ZodVoid,
|
|
159
|
-
_void,
|
|
160
|
-
ZodDate,
|
|
161
|
-
date,
|
|
162
|
-
ZodArray,
|
|
163
|
-
array,
|
|
164
|
-
keyof,
|
|
165
|
-
ZodObject,
|
|
166
|
-
object,
|
|
167
|
-
strictObject,
|
|
168
|
-
looseObject,
|
|
169
|
-
ZodUnion,
|
|
170
|
-
union,
|
|
171
|
-
ZodXor,
|
|
172
|
-
xor,
|
|
173
|
-
ZodDiscriminatedUnion,
|
|
174
|
-
discriminatedUnion,
|
|
175
|
-
ZodIntersection,
|
|
176
|
-
intersection,
|
|
177
|
-
ZodTuple,
|
|
178
|
-
tuple,
|
|
179
|
-
ZodRecord,
|
|
180
|
-
record,
|
|
181
|
-
partialRecord,
|
|
182
|
-
looseRecord,
|
|
183
|
-
ZodMap,
|
|
184
|
-
map,
|
|
185
|
-
ZodSet,
|
|
186
|
-
set,
|
|
187
|
-
ZodEnum,
|
|
188
|
-
_enum,
|
|
189
|
-
nativeEnum,
|
|
190
|
-
ZodLiteral,
|
|
191
|
-
literal,
|
|
192
|
-
ZodFile,
|
|
193
|
-
file,
|
|
194
|
-
ZodTransform,
|
|
195
|
-
transform,
|
|
196
|
-
ZodOptional,
|
|
197
|
-
optional,
|
|
198
|
-
ZodExactOptional,
|
|
199
|
-
exactOptional,
|
|
200
|
-
ZodNullable,
|
|
201
|
-
nullable,
|
|
202
|
-
nullish,
|
|
203
|
-
ZodDefault,
|
|
204
|
-
_default,
|
|
205
|
-
ZodPrefault,
|
|
206
|
-
prefault,
|
|
207
|
-
ZodNonOptional,
|
|
208
|
-
nonoptional,
|
|
209
|
-
ZodSuccess,
|
|
210
|
-
success,
|
|
211
|
-
ZodCatch,
|
|
212
|
-
_catch,
|
|
213
|
-
ZodNaN,
|
|
214
|
-
nan,
|
|
215
|
-
ZodPipe,
|
|
216
|
-
pipe,
|
|
217
|
-
ZodCodec,
|
|
218
|
-
codec,
|
|
219
|
-
invertCodec,
|
|
220
|
-
ZodPreprocess,
|
|
221
|
-
ZodReadonly,
|
|
222
|
-
readonly,
|
|
223
|
-
ZodTemplateLiteral,
|
|
224
|
-
templateLiteral,
|
|
225
|
-
ZodLazy,
|
|
226
|
-
lazy,
|
|
227
|
-
ZodPromise,
|
|
228
|
-
promise,
|
|
229
|
-
ZodFunction,
|
|
230
|
-
_function,
|
|
231
|
-
ZodCustom,
|
|
232
|
-
check,
|
|
233
|
-
custom,
|
|
234
|
-
refine,
|
|
235
|
-
superRefine,
|
|
236
|
-
describe,
|
|
237
|
-
meta,
|
|
238
|
-
_instanceof,
|
|
239
|
-
stringbool,
|
|
240
|
-
json,
|
|
241
|
-
preprocess,
|
|
242
|
-
exports_schemas
|
|
243
|
-
} from "./chunk-dnn39qt4.js";
|
|
244
|
-
|
|
245
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
246
|
-
var exports_external = {};
|
|
247
|
-
__export(exports_external, {
|
|
248
|
-
$brand: () => $brand,
|
|
249
|
-
$input: () => $input,
|
|
250
|
-
$output: () => $output,
|
|
251
|
-
NEVER: () => NEVER,
|
|
252
|
-
TimePrecision: () => TimePrecision,
|
|
253
|
-
ZodAny: () => ZodAny,
|
|
254
|
-
ZodArray: () => ZodArray,
|
|
255
|
-
ZodBase64: () => ZodBase64,
|
|
256
|
-
ZodBase64URL: () => ZodBase64URL,
|
|
257
|
-
ZodBigInt: () => ZodBigInt,
|
|
258
|
-
ZodBigIntFormat: () => ZodBigIntFormat,
|
|
259
|
-
ZodBoolean: () => ZodBoolean,
|
|
260
|
-
ZodCIDRv4: () => ZodCIDRv4,
|
|
261
|
-
ZodCIDRv6: () => ZodCIDRv6,
|
|
262
|
-
ZodCUID: () => ZodCUID,
|
|
263
|
-
ZodCUID2: () => ZodCUID2,
|
|
264
|
-
ZodCatch: () => ZodCatch,
|
|
265
|
-
ZodCodec: () => ZodCodec,
|
|
266
|
-
ZodCustom: () => ZodCustom,
|
|
267
|
-
ZodCustomStringFormat: () => ZodCustomStringFormat,
|
|
268
|
-
ZodDate: () => ZodDate,
|
|
269
|
-
ZodDefault: () => ZodDefault,
|
|
270
|
-
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
271
|
-
ZodE164: () => ZodE164,
|
|
272
|
-
ZodEmail: () => ZodEmail,
|
|
273
|
-
ZodEmoji: () => ZodEmoji,
|
|
274
|
-
ZodEnum: () => ZodEnum,
|
|
275
|
-
ZodError: () => ZodError,
|
|
276
|
-
ZodExactOptional: () => ZodExactOptional,
|
|
277
|
-
ZodFile: () => ZodFile,
|
|
278
|
-
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
279
|
-
ZodFunction: () => ZodFunction,
|
|
280
|
-
ZodGUID: () => ZodGUID,
|
|
281
|
-
ZodIPv4: () => ZodIPv4,
|
|
282
|
-
ZodIPv6: () => ZodIPv6,
|
|
283
|
-
ZodISODate: () => ZodISODate,
|
|
284
|
-
ZodISODateTime: () => ZodISODateTime,
|
|
285
|
-
ZodISODuration: () => ZodISODuration,
|
|
286
|
-
ZodISOTime: () => ZodISOTime,
|
|
287
|
-
ZodIntersection: () => ZodIntersection,
|
|
288
|
-
ZodIssueCode: () => ZodIssueCode,
|
|
289
|
-
ZodJWT: () => ZodJWT,
|
|
290
|
-
ZodKSUID: () => ZodKSUID,
|
|
291
|
-
ZodLazy: () => ZodLazy,
|
|
292
|
-
ZodLiteral: () => ZodLiteral,
|
|
293
|
-
ZodMAC: () => ZodMAC,
|
|
294
|
-
ZodMap: () => ZodMap,
|
|
295
|
-
ZodNaN: () => ZodNaN,
|
|
296
|
-
ZodNanoID: () => ZodNanoID,
|
|
297
|
-
ZodNever: () => ZodNever,
|
|
298
|
-
ZodNonOptional: () => ZodNonOptional,
|
|
299
|
-
ZodNull: () => ZodNull,
|
|
300
|
-
ZodNullable: () => ZodNullable,
|
|
301
|
-
ZodNumber: () => ZodNumber,
|
|
302
|
-
ZodNumberFormat: () => ZodNumberFormat,
|
|
303
|
-
ZodObject: () => ZodObject,
|
|
304
|
-
ZodOptional: () => ZodOptional,
|
|
305
|
-
ZodPipe: () => ZodPipe,
|
|
306
|
-
ZodPrefault: () => ZodPrefault,
|
|
307
|
-
ZodPreprocess: () => ZodPreprocess,
|
|
308
|
-
ZodPromise: () => ZodPromise,
|
|
309
|
-
ZodReadonly: () => ZodReadonly,
|
|
310
|
-
ZodRealError: () => ZodRealError,
|
|
311
|
-
ZodRecord: () => ZodRecord,
|
|
312
|
-
ZodSet: () => ZodSet,
|
|
313
|
-
ZodString: () => ZodString,
|
|
314
|
-
ZodStringFormat: () => ZodStringFormat,
|
|
315
|
-
ZodSuccess: () => ZodSuccess,
|
|
316
|
-
ZodSymbol: () => ZodSymbol,
|
|
317
|
-
ZodTemplateLiteral: () => ZodTemplateLiteral,
|
|
318
|
-
ZodTransform: () => ZodTransform,
|
|
319
|
-
ZodTuple: () => ZodTuple,
|
|
320
|
-
ZodType: () => ZodType,
|
|
321
|
-
ZodULID: () => ZodULID,
|
|
322
|
-
ZodURL: () => ZodURL,
|
|
323
|
-
ZodUUID: () => ZodUUID,
|
|
324
|
-
ZodUndefined: () => ZodUndefined,
|
|
325
|
-
ZodUnion: () => ZodUnion,
|
|
326
|
-
ZodUnknown: () => ZodUnknown,
|
|
327
|
-
ZodVoid: () => ZodVoid,
|
|
328
|
-
ZodXID: () => ZodXID,
|
|
329
|
-
ZodXor: () => ZodXor,
|
|
330
|
-
_ZodString: () => _ZodString,
|
|
331
|
-
_default: () => _default,
|
|
332
|
-
_function: () => _function,
|
|
333
|
-
any: () => any3,
|
|
334
|
-
array: () => array,
|
|
335
|
-
base64: () => base64,
|
|
336
|
-
base64url: () => base64url,
|
|
337
|
-
bigint: () => bigint,
|
|
338
|
-
boolean: () => boolean,
|
|
339
|
-
catch: () => _catch,
|
|
340
|
-
check: () => check,
|
|
341
|
-
cidrv4: () => cidrv4,
|
|
342
|
-
cidrv6: () => cidrv6,
|
|
343
|
-
clone: () => clone,
|
|
344
|
-
codec: () => codec,
|
|
345
|
-
coerce: () => exports_coerce,
|
|
346
|
-
config: () => config,
|
|
347
|
-
core: () => exports_core,
|
|
348
|
-
cuid: () => cuid,
|
|
349
|
-
cuid2: () => cuid2,
|
|
350
|
-
custom: () => custom,
|
|
351
|
-
date: () => date,
|
|
352
|
-
decode: () => decode,
|
|
353
|
-
decodeAsync: () => decodeAsync,
|
|
354
|
-
describe: () => describe,
|
|
355
|
-
discriminatedUnion: () => discriminatedUnion,
|
|
356
|
-
e164: () => e164,
|
|
357
|
-
email: () => email,
|
|
358
|
-
emoji: () => emoji,
|
|
359
|
-
encode: () => encode,
|
|
360
|
-
encodeAsync: () => encodeAsync,
|
|
361
|
-
endsWith: () => _endsWith,
|
|
362
|
-
enum: () => _enum,
|
|
363
|
-
exactOptional: () => exactOptional,
|
|
364
|
-
file: () => file,
|
|
365
|
-
flattenError: () => flattenError,
|
|
366
|
-
float32: () => float32,
|
|
367
|
-
float64: () => float64,
|
|
368
|
-
formatError: () => formatError,
|
|
369
|
-
fromJSONSchema: () => fromJSONSchema,
|
|
370
|
-
function: () => _function,
|
|
371
|
-
getErrorMap: () => getErrorMap,
|
|
372
|
-
globalRegistry: () => globalRegistry,
|
|
373
|
-
gt: () => _gt,
|
|
374
|
-
gte: () => _gte,
|
|
375
|
-
guid: () => guid,
|
|
376
|
-
hash: () => hash,
|
|
377
|
-
hex: () => hex,
|
|
378
|
-
hostname: () => hostname,
|
|
379
|
-
httpUrl: () => httpUrl,
|
|
380
|
-
includes: () => _includes,
|
|
381
|
-
instanceof: () => _instanceof,
|
|
382
|
-
int: () => int,
|
|
383
|
-
int32: () => int32,
|
|
384
|
-
int64: () => int64,
|
|
385
|
-
intersection: () => intersection,
|
|
386
|
-
invertCodec: () => invertCodec,
|
|
387
|
-
ipv4: () => ipv4,
|
|
388
|
-
ipv6: () => ipv6,
|
|
389
|
-
iso: () => exports_iso,
|
|
390
|
-
json: () => json,
|
|
391
|
-
jwt: () => jwt,
|
|
392
|
-
keyof: () => keyof,
|
|
393
|
-
ksuid: () => ksuid,
|
|
394
|
-
lazy: () => lazy,
|
|
395
|
-
length: () => _length,
|
|
396
|
-
literal: () => literal,
|
|
397
|
-
locales: () => exports_locales,
|
|
398
|
-
looseObject: () => looseObject,
|
|
399
|
-
looseRecord: () => looseRecord,
|
|
400
|
-
lowercase: () => _lowercase,
|
|
401
|
-
lt: () => _lt,
|
|
402
|
-
lte: () => _lte,
|
|
403
|
-
mac: () => mac,
|
|
404
|
-
map: () => map,
|
|
405
|
-
maxLength: () => _maxLength,
|
|
406
|
-
maxSize: () => _maxSize,
|
|
407
|
-
meta: () => meta,
|
|
408
|
-
mime: () => _mime,
|
|
409
|
-
minLength: () => _minLength,
|
|
410
|
-
minSize: () => _minSize,
|
|
411
|
-
multipleOf: () => _multipleOf,
|
|
412
|
-
nan: () => nan,
|
|
413
|
-
nanoid: () => nanoid,
|
|
414
|
-
nativeEnum: () => nativeEnum,
|
|
415
|
-
negative: () => _negative,
|
|
416
|
-
never: () => never,
|
|
417
|
-
nonnegative: () => _nonnegative,
|
|
418
|
-
nonoptional: () => nonoptional,
|
|
419
|
-
nonpositive: () => _nonpositive,
|
|
420
|
-
normalize: () => _normalize,
|
|
421
|
-
null: () => _null,
|
|
422
|
-
nullable: () => nullable,
|
|
423
|
-
nullish: () => nullish,
|
|
424
|
-
number: () => number,
|
|
425
|
-
object: () => object,
|
|
426
|
-
optional: () => optional,
|
|
427
|
-
overwrite: () => _overwrite,
|
|
428
|
-
parse: () => parse,
|
|
429
|
-
parseAsync: () => parseAsync,
|
|
430
|
-
partialRecord: () => partialRecord,
|
|
431
|
-
pipe: () => pipe,
|
|
432
|
-
positive: () => _positive,
|
|
433
|
-
prefault: () => prefault,
|
|
434
|
-
preprocess: () => preprocess,
|
|
435
|
-
prettifyError: () => prettifyError,
|
|
436
|
-
promise: () => promise,
|
|
437
|
-
property: () => _property,
|
|
438
|
-
readonly: () => readonly,
|
|
439
|
-
record: () => record,
|
|
440
|
-
refine: () => refine,
|
|
441
|
-
regex: () => _regex,
|
|
442
|
-
regexes: () => exports_regexes,
|
|
443
|
-
registry: () => registry,
|
|
444
|
-
safeDecode: () => safeDecode,
|
|
445
|
-
safeDecodeAsync: () => safeDecodeAsync,
|
|
446
|
-
safeEncode: () => safeEncode,
|
|
447
|
-
safeEncodeAsync: () => safeEncodeAsync,
|
|
448
|
-
safeParse: () => safeParse,
|
|
449
|
-
safeParseAsync: () => safeParseAsync,
|
|
450
|
-
set: () => set,
|
|
451
|
-
setErrorMap: () => setErrorMap,
|
|
452
|
-
size: () => _size,
|
|
453
|
-
slugify: () => _slugify,
|
|
454
|
-
startsWith: () => _startsWith,
|
|
455
|
-
strictObject: () => strictObject,
|
|
456
|
-
string: () => string,
|
|
457
|
-
stringFormat: () => stringFormat,
|
|
458
|
-
stringbool: () => stringbool,
|
|
459
|
-
success: () => success,
|
|
460
|
-
superRefine: () => superRefine,
|
|
461
|
-
symbol: () => symbol,
|
|
462
|
-
templateLiteral: () => templateLiteral,
|
|
463
|
-
toJSONSchema: () => toJSONSchema,
|
|
464
|
-
toLowerCase: () => _toLowerCase,
|
|
465
|
-
toUpperCase: () => _toUpperCase,
|
|
466
|
-
transform: () => transform,
|
|
467
|
-
treeifyError: () => treeifyError,
|
|
468
|
-
trim: () => _trim,
|
|
469
|
-
tuple: () => tuple,
|
|
470
|
-
uint32: () => uint32,
|
|
471
|
-
uint64: () => uint64,
|
|
472
|
-
ulid: () => ulid,
|
|
473
|
-
undefined: () => _undefined,
|
|
474
|
-
union: () => union,
|
|
475
|
-
unknown: () => unknown,
|
|
476
|
-
uppercase: () => _uppercase,
|
|
477
|
-
url: () => url,
|
|
478
|
-
util: () => exports_util,
|
|
479
|
-
uuid: () => uuid,
|
|
480
|
-
uuidv4: () => uuidv4,
|
|
481
|
-
uuidv6: () => uuidv6,
|
|
482
|
-
uuidv7: () => uuidv7,
|
|
483
|
-
void: () => _void,
|
|
484
|
-
xid: () => xid,
|
|
485
|
-
xor: () => xor
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
489
|
-
var exports_coerce = {};
|
|
490
|
-
__export(exports_coerce, {
|
|
491
|
-
bigint: () => bigint2,
|
|
492
|
-
boolean: () => boolean2,
|
|
493
|
-
date: () => date2,
|
|
494
|
-
number: () => number2,
|
|
495
|
-
string: () => string2
|
|
496
|
-
});
|
|
497
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/compat.js
|
|
498
|
-
var ZodIssueCode = {
|
|
499
|
-
invalid_type: "invalid_type",
|
|
500
|
-
too_big: "too_big",
|
|
501
|
-
too_small: "too_small",
|
|
502
|
-
invalid_format: "invalid_format",
|
|
503
|
-
not_multiple_of: "not_multiple_of",
|
|
504
|
-
unrecognized_keys: "unrecognized_keys",
|
|
505
|
-
invalid_union: "invalid_union",
|
|
506
|
-
invalid_key: "invalid_key",
|
|
507
|
-
invalid_element: "invalid_element",
|
|
508
|
-
invalid_value: "invalid_value",
|
|
509
|
-
custom: "custom"
|
|
510
|
-
};
|
|
511
|
-
function setErrorMap(map) {
|
|
512
|
-
config({
|
|
513
|
-
customError: map
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
function getErrorMap() {
|
|
517
|
-
return config().customError;
|
|
518
|
-
}
|
|
519
|
-
var ZodFirstPartyTypeKind;
|
|
520
|
-
(function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
521
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
|
|
522
|
-
var z = {
|
|
523
|
-
...exports_schemas,
|
|
524
|
-
...exports_checks,
|
|
525
|
-
iso: exports_iso
|
|
526
|
-
};
|
|
527
|
-
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
528
|
-
"$schema",
|
|
529
|
-
"$ref",
|
|
530
|
-
"$defs",
|
|
531
|
-
"definitions",
|
|
532
|
-
"$id",
|
|
533
|
-
"id",
|
|
534
|
-
"$comment",
|
|
535
|
-
"$anchor",
|
|
536
|
-
"$vocabulary",
|
|
537
|
-
"$dynamicRef",
|
|
538
|
-
"$dynamicAnchor",
|
|
539
|
-
"type",
|
|
540
|
-
"enum",
|
|
541
|
-
"const",
|
|
542
|
-
"anyOf",
|
|
543
|
-
"oneOf",
|
|
544
|
-
"allOf",
|
|
545
|
-
"not",
|
|
546
|
-
"properties",
|
|
547
|
-
"required",
|
|
548
|
-
"additionalProperties",
|
|
549
|
-
"patternProperties",
|
|
550
|
-
"propertyNames",
|
|
551
|
-
"minProperties",
|
|
552
|
-
"maxProperties",
|
|
553
|
-
"items",
|
|
554
|
-
"prefixItems",
|
|
555
|
-
"additionalItems",
|
|
556
|
-
"minItems",
|
|
557
|
-
"maxItems",
|
|
558
|
-
"uniqueItems",
|
|
559
|
-
"contains",
|
|
560
|
-
"minContains",
|
|
561
|
-
"maxContains",
|
|
562
|
-
"minLength",
|
|
563
|
-
"maxLength",
|
|
564
|
-
"pattern",
|
|
565
|
-
"format",
|
|
566
|
-
"minimum",
|
|
567
|
-
"maximum",
|
|
568
|
-
"exclusiveMinimum",
|
|
569
|
-
"exclusiveMaximum",
|
|
570
|
-
"multipleOf",
|
|
571
|
-
"description",
|
|
572
|
-
"default",
|
|
573
|
-
"contentEncoding",
|
|
574
|
-
"contentMediaType",
|
|
575
|
-
"contentSchema",
|
|
576
|
-
"unevaluatedItems",
|
|
577
|
-
"unevaluatedProperties",
|
|
578
|
-
"if",
|
|
579
|
-
"then",
|
|
580
|
-
"else",
|
|
581
|
-
"dependentSchemas",
|
|
582
|
-
"dependentRequired",
|
|
583
|
-
"nullable",
|
|
584
|
-
"readOnly"
|
|
585
|
-
]);
|
|
586
|
-
function detectVersion(schema, defaultTarget) {
|
|
587
|
-
const $schema = schema.$schema;
|
|
588
|
-
if ($schema === "https://json-schema.org/draft/2020-12/schema") {
|
|
589
|
-
return "draft-2020-12";
|
|
590
|
-
}
|
|
591
|
-
if ($schema === "http://json-schema.org/draft-07/schema#") {
|
|
592
|
-
return "draft-7";
|
|
593
|
-
}
|
|
594
|
-
if ($schema === "http://json-schema.org/draft-04/schema#") {
|
|
595
|
-
return "draft-4";
|
|
596
|
-
}
|
|
597
|
-
return defaultTarget ?? "draft-2020-12";
|
|
598
|
-
}
|
|
599
|
-
function resolveRef(ref, ctx) {
|
|
600
|
-
if (!ref.startsWith("#")) {
|
|
601
|
-
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
602
|
-
}
|
|
603
|
-
const path = ref.slice(1).split("/").filter(Boolean);
|
|
604
|
-
if (path.length === 0) {
|
|
605
|
-
return ctx.rootSchema;
|
|
606
|
-
}
|
|
607
|
-
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
608
|
-
if (path[0] === defsKey) {
|
|
609
|
-
const key = path[1];
|
|
610
|
-
if (!key || !ctx.defs[key]) {
|
|
611
|
-
throw new Error(`Reference not found: ${ref}`);
|
|
612
|
-
}
|
|
613
|
-
return ctx.defs[key];
|
|
614
|
-
}
|
|
615
|
-
throw new Error(`Reference not found: ${ref}`);
|
|
616
|
-
}
|
|
617
|
-
function convertBaseSchema(schema, ctx) {
|
|
618
|
-
if (schema.not !== undefined) {
|
|
619
|
-
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
620
|
-
return z.never();
|
|
621
|
-
}
|
|
622
|
-
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
623
|
-
}
|
|
624
|
-
if (schema.unevaluatedItems !== undefined) {
|
|
625
|
-
throw new Error("unevaluatedItems is not supported");
|
|
626
|
-
}
|
|
627
|
-
if (schema.unevaluatedProperties !== undefined) {
|
|
628
|
-
throw new Error("unevaluatedProperties is not supported");
|
|
629
|
-
}
|
|
630
|
-
if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {
|
|
631
|
-
throw new Error("Conditional schemas (if/then/else) are not supported");
|
|
632
|
-
}
|
|
633
|
-
if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {
|
|
634
|
-
throw new Error("dependentSchemas and dependentRequired are not supported");
|
|
635
|
-
}
|
|
636
|
-
if (schema.$ref) {
|
|
637
|
-
const refPath = schema.$ref;
|
|
638
|
-
if (ctx.refs.has(refPath)) {
|
|
639
|
-
return ctx.refs.get(refPath);
|
|
640
|
-
}
|
|
641
|
-
if (ctx.processing.has(refPath)) {
|
|
642
|
-
return z.lazy(() => {
|
|
643
|
-
if (!ctx.refs.has(refPath)) {
|
|
644
|
-
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
645
|
-
}
|
|
646
|
-
return ctx.refs.get(refPath);
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
ctx.processing.add(refPath);
|
|
650
|
-
const resolved = resolveRef(refPath, ctx);
|
|
651
|
-
const zodSchema = convertSchema(resolved, ctx);
|
|
652
|
-
ctx.refs.set(refPath, zodSchema);
|
|
653
|
-
ctx.processing.delete(refPath);
|
|
654
|
-
return zodSchema;
|
|
655
|
-
}
|
|
656
|
-
if (schema.enum !== undefined) {
|
|
657
|
-
const enumValues = schema.enum;
|
|
658
|
-
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
659
|
-
return z.null();
|
|
660
|
-
}
|
|
661
|
-
if (enumValues.length === 0) {
|
|
662
|
-
return z.never();
|
|
663
|
-
}
|
|
664
|
-
if (enumValues.length === 1) {
|
|
665
|
-
return z.literal(enumValues[0]);
|
|
666
|
-
}
|
|
667
|
-
if (enumValues.every((v) => typeof v === "string")) {
|
|
668
|
-
return z.enum(enumValues);
|
|
669
|
-
}
|
|
670
|
-
const literalSchemas = enumValues.map((v) => z.literal(v));
|
|
671
|
-
if (literalSchemas.length < 2) {
|
|
672
|
-
return literalSchemas[0];
|
|
673
|
-
}
|
|
674
|
-
return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
675
|
-
}
|
|
676
|
-
if (schema.const !== undefined) {
|
|
677
|
-
return z.literal(schema.const);
|
|
678
|
-
}
|
|
679
|
-
const type = schema.type;
|
|
680
|
-
if (Array.isArray(type)) {
|
|
681
|
-
const typeSchemas = type.map((t) => {
|
|
682
|
-
const typeSchema = { ...schema, type: t };
|
|
683
|
-
return convertBaseSchema(typeSchema, ctx);
|
|
684
|
-
});
|
|
685
|
-
if (typeSchemas.length === 0) {
|
|
686
|
-
return z.never();
|
|
687
|
-
}
|
|
688
|
-
if (typeSchemas.length === 1) {
|
|
689
|
-
return typeSchemas[0];
|
|
690
|
-
}
|
|
691
|
-
return z.union(typeSchemas);
|
|
692
|
-
}
|
|
693
|
-
if (!type) {
|
|
694
|
-
return z.any();
|
|
695
|
-
}
|
|
696
|
-
let zodSchema;
|
|
697
|
-
switch (type) {
|
|
698
|
-
case "string": {
|
|
699
|
-
let stringSchema = z.string();
|
|
700
|
-
if (schema.format) {
|
|
701
|
-
const format = schema.format;
|
|
702
|
-
if (format === "email") {
|
|
703
|
-
stringSchema = stringSchema.check(z.email());
|
|
704
|
-
} else if (format === "uri" || format === "uri-reference") {
|
|
705
|
-
stringSchema = stringSchema.check(z.url());
|
|
706
|
-
} else if (format === "uuid" || format === "guid") {
|
|
707
|
-
stringSchema = stringSchema.check(z.uuid());
|
|
708
|
-
} else if (format === "date-time") {
|
|
709
|
-
stringSchema = stringSchema.check(z.iso.datetime());
|
|
710
|
-
} else if (format === "date") {
|
|
711
|
-
stringSchema = stringSchema.check(z.iso.date());
|
|
712
|
-
} else if (format === "time") {
|
|
713
|
-
stringSchema = stringSchema.check(z.iso.time());
|
|
714
|
-
} else if (format === "duration") {
|
|
715
|
-
stringSchema = stringSchema.check(z.iso.duration());
|
|
716
|
-
} else if (format === "ipv4") {
|
|
717
|
-
stringSchema = stringSchema.check(z.ipv4());
|
|
718
|
-
} else if (format === "ipv6") {
|
|
719
|
-
stringSchema = stringSchema.check(z.ipv6());
|
|
720
|
-
} else if (format === "mac") {
|
|
721
|
-
stringSchema = stringSchema.check(z.mac());
|
|
722
|
-
} else if (format === "cidr") {
|
|
723
|
-
stringSchema = stringSchema.check(z.cidrv4());
|
|
724
|
-
} else if (format === "cidr-v6") {
|
|
725
|
-
stringSchema = stringSchema.check(z.cidrv6());
|
|
726
|
-
} else if (format === "base64") {
|
|
727
|
-
stringSchema = stringSchema.check(z.base64());
|
|
728
|
-
} else if (format === "base64url") {
|
|
729
|
-
stringSchema = stringSchema.check(z.base64url());
|
|
730
|
-
} else if (format === "e164") {
|
|
731
|
-
stringSchema = stringSchema.check(z.e164());
|
|
732
|
-
} else if (format === "jwt") {
|
|
733
|
-
stringSchema = stringSchema.check(z.jwt());
|
|
734
|
-
} else if (format === "emoji") {
|
|
735
|
-
stringSchema = stringSchema.check(z.emoji());
|
|
736
|
-
} else if (format === "nanoid") {
|
|
737
|
-
stringSchema = stringSchema.check(z.nanoid());
|
|
738
|
-
} else if (format === "cuid") {
|
|
739
|
-
stringSchema = stringSchema.check(z.cuid());
|
|
740
|
-
} else if (format === "cuid2") {
|
|
741
|
-
stringSchema = stringSchema.check(z.cuid2());
|
|
742
|
-
} else if (format === "ulid") {
|
|
743
|
-
stringSchema = stringSchema.check(z.ulid());
|
|
744
|
-
} else if (format === "xid") {
|
|
745
|
-
stringSchema = stringSchema.check(z.xid());
|
|
746
|
-
} else if (format === "ksuid") {
|
|
747
|
-
stringSchema = stringSchema.check(z.ksuid());
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
if (typeof schema.minLength === "number") {
|
|
751
|
-
stringSchema = stringSchema.min(schema.minLength);
|
|
752
|
-
}
|
|
753
|
-
if (typeof schema.maxLength === "number") {
|
|
754
|
-
stringSchema = stringSchema.max(schema.maxLength);
|
|
755
|
-
}
|
|
756
|
-
if (schema.pattern) {
|
|
757
|
-
stringSchema = stringSchema.regex(new RegExp(schema.pattern));
|
|
758
|
-
}
|
|
759
|
-
zodSchema = stringSchema;
|
|
760
|
-
break;
|
|
761
|
-
}
|
|
762
|
-
case "number":
|
|
763
|
-
case "integer": {
|
|
764
|
-
let numberSchema = type === "integer" ? z.number().int() : z.number();
|
|
765
|
-
if (typeof schema.minimum === "number") {
|
|
766
|
-
numberSchema = numberSchema.min(schema.minimum);
|
|
767
|
-
}
|
|
768
|
-
if (typeof schema.maximum === "number") {
|
|
769
|
-
numberSchema = numberSchema.max(schema.maximum);
|
|
770
|
-
}
|
|
771
|
-
if (typeof schema.exclusiveMinimum === "number") {
|
|
772
|
-
numberSchema = numberSchema.gt(schema.exclusiveMinimum);
|
|
773
|
-
} else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
|
|
774
|
-
numberSchema = numberSchema.gt(schema.minimum);
|
|
775
|
-
}
|
|
776
|
-
if (typeof schema.exclusiveMaximum === "number") {
|
|
777
|
-
numberSchema = numberSchema.lt(schema.exclusiveMaximum);
|
|
778
|
-
} else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
|
|
779
|
-
numberSchema = numberSchema.lt(schema.maximum);
|
|
780
|
-
}
|
|
781
|
-
if (typeof schema.multipleOf === "number") {
|
|
782
|
-
numberSchema = numberSchema.multipleOf(schema.multipleOf);
|
|
783
|
-
}
|
|
784
|
-
zodSchema = numberSchema;
|
|
785
|
-
break;
|
|
786
|
-
}
|
|
787
|
-
case "boolean": {
|
|
788
|
-
zodSchema = z.boolean();
|
|
789
|
-
break;
|
|
790
|
-
}
|
|
791
|
-
case "null": {
|
|
792
|
-
zodSchema = z.null();
|
|
793
|
-
break;
|
|
794
|
-
}
|
|
795
|
-
case "object": {
|
|
796
|
-
const shape = {};
|
|
797
|
-
const properties = schema.properties || {};
|
|
798
|
-
const requiredSet = new Set(schema.required || []);
|
|
799
|
-
for (const [key, propSchema] of Object.entries(properties)) {
|
|
800
|
-
const propZodSchema = convertSchema(propSchema, ctx);
|
|
801
|
-
shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
|
|
802
|
-
}
|
|
803
|
-
if (schema.propertyNames) {
|
|
804
|
-
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
805
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
|
|
806
|
-
if (Object.keys(shape).length === 0) {
|
|
807
|
-
zodSchema = z.record(keySchema, valueSchema);
|
|
808
|
-
break;
|
|
809
|
-
}
|
|
810
|
-
const objectSchema = z.object(shape).passthrough();
|
|
811
|
-
const recordSchema = z.looseRecord(keySchema, valueSchema);
|
|
812
|
-
zodSchema = z.intersection(objectSchema, recordSchema);
|
|
813
|
-
break;
|
|
814
|
-
}
|
|
815
|
-
if (schema.patternProperties) {
|
|
816
|
-
const patternProps = schema.patternProperties;
|
|
817
|
-
const patternKeys = Object.keys(patternProps);
|
|
818
|
-
const looseRecords = [];
|
|
819
|
-
for (const pattern of patternKeys) {
|
|
820
|
-
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
821
|
-
const keySchema = z.string().regex(new RegExp(pattern));
|
|
822
|
-
looseRecords.push(z.looseRecord(keySchema, patternValue));
|
|
823
|
-
}
|
|
824
|
-
const schemasToIntersect = [];
|
|
825
|
-
if (Object.keys(shape).length > 0) {
|
|
826
|
-
schemasToIntersect.push(z.object(shape).passthrough());
|
|
827
|
-
}
|
|
828
|
-
schemasToIntersect.push(...looseRecords);
|
|
829
|
-
if (schemasToIntersect.length === 0) {
|
|
830
|
-
zodSchema = z.object({}).passthrough();
|
|
831
|
-
} else if (schemasToIntersect.length === 1) {
|
|
832
|
-
zodSchema = schemasToIntersect[0];
|
|
833
|
-
} else {
|
|
834
|
-
let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
835
|
-
for (let i = 2;i < schemasToIntersect.length; i++) {
|
|
836
|
-
result = z.intersection(result, schemasToIntersect[i]);
|
|
837
|
-
}
|
|
838
|
-
zodSchema = result;
|
|
839
|
-
}
|
|
840
|
-
break;
|
|
841
|
-
}
|
|
842
|
-
const objectSchema = z.object(shape);
|
|
843
|
-
if (schema.additionalProperties === false) {
|
|
844
|
-
zodSchema = objectSchema.strict();
|
|
845
|
-
} else if (typeof schema.additionalProperties === "object") {
|
|
846
|
-
zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
|
|
847
|
-
} else {
|
|
848
|
-
zodSchema = objectSchema.passthrough();
|
|
849
|
-
}
|
|
850
|
-
break;
|
|
851
|
-
}
|
|
852
|
-
case "array": {
|
|
853
|
-
const prefixItems = schema.prefixItems;
|
|
854
|
-
const items = schema.items;
|
|
855
|
-
if (prefixItems && Array.isArray(prefixItems)) {
|
|
856
|
-
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
857
|
-
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : undefined;
|
|
858
|
-
if (rest) {
|
|
859
|
-
zodSchema = z.tuple(tupleItems).rest(rest);
|
|
860
|
-
} else {
|
|
861
|
-
zodSchema = z.tuple(tupleItems);
|
|
862
|
-
}
|
|
863
|
-
if (typeof schema.minItems === "number") {
|
|
864
|
-
zodSchema = zodSchema.check(z.minLength(schema.minItems));
|
|
865
|
-
}
|
|
866
|
-
if (typeof schema.maxItems === "number") {
|
|
867
|
-
zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
|
|
868
|
-
}
|
|
869
|
-
} else if (Array.isArray(items)) {
|
|
870
|
-
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
871
|
-
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : undefined;
|
|
872
|
-
if (rest) {
|
|
873
|
-
zodSchema = z.tuple(tupleItems).rest(rest);
|
|
874
|
-
} else {
|
|
875
|
-
zodSchema = z.tuple(tupleItems);
|
|
876
|
-
}
|
|
877
|
-
if (typeof schema.minItems === "number") {
|
|
878
|
-
zodSchema = zodSchema.check(z.minLength(schema.minItems));
|
|
879
|
-
}
|
|
880
|
-
if (typeof schema.maxItems === "number") {
|
|
881
|
-
zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
|
|
882
|
-
}
|
|
883
|
-
} else if (items !== undefined) {
|
|
884
|
-
const element = convertSchema(items, ctx);
|
|
885
|
-
let arraySchema = z.array(element);
|
|
886
|
-
if (typeof schema.minItems === "number") {
|
|
887
|
-
arraySchema = arraySchema.min(schema.minItems);
|
|
888
|
-
}
|
|
889
|
-
if (typeof schema.maxItems === "number") {
|
|
890
|
-
arraySchema = arraySchema.max(schema.maxItems);
|
|
891
|
-
}
|
|
892
|
-
zodSchema = arraySchema;
|
|
893
|
-
} else {
|
|
894
|
-
zodSchema = z.array(z.any());
|
|
895
|
-
}
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
default:
|
|
899
|
-
throw new Error(`Unsupported type: ${type}`);
|
|
900
|
-
}
|
|
901
|
-
return zodSchema;
|
|
902
|
-
}
|
|
903
|
-
function convertSchema(schema, ctx) {
|
|
904
|
-
if (typeof schema === "boolean") {
|
|
905
|
-
return schema ? z.any() : z.never();
|
|
906
|
-
}
|
|
907
|
-
let baseSchema = convertBaseSchema(schema, ctx);
|
|
908
|
-
const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;
|
|
909
|
-
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
910
|
-
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
911
|
-
const anyOfUnion = z.union(options);
|
|
912
|
-
baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
913
|
-
}
|
|
914
|
-
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
915
|
-
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
916
|
-
const oneOfUnion = z.xor(options);
|
|
917
|
-
baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
918
|
-
}
|
|
919
|
-
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
920
|
-
if (schema.allOf.length === 0) {
|
|
921
|
-
baseSchema = hasExplicitType ? baseSchema : z.any();
|
|
922
|
-
} else {
|
|
923
|
-
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
924
|
-
const startIdx = hasExplicitType ? 0 : 1;
|
|
925
|
-
for (let i = startIdx;i < schema.allOf.length; i++) {
|
|
926
|
-
result = z.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
927
|
-
}
|
|
928
|
-
baseSchema = result;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
932
|
-
baseSchema = z.nullable(baseSchema);
|
|
933
|
-
}
|
|
934
|
-
if (schema.readOnly === true) {
|
|
935
|
-
baseSchema = z.readonly(baseSchema);
|
|
936
|
-
}
|
|
937
|
-
if (schema.default !== undefined) {
|
|
938
|
-
baseSchema = baseSchema.default(schema.default);
|
|
939
|
-
}
|
|
940
|
-
const extraMeta = {};
|
|
941
|
-
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
942
|
-
for (const key of coreMetadataKeys) {
|
|
943
|
-
if (key in schema) {
|
|
944
|
-
extraMeta[key] = schema[key];
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
|
|
948
|
-
for (const key of contentMetadataKeys) {
|
|
949
|
-
if (key in schema) {
|
|
950
|
-
extraMeta[key] = schema[key];
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
for (const key of Object.keys(schema)) {
|
|
954
|
-
if (!RECOGNIZED_KEYS.has(key)) {
|
|
955
|
-
extraMeta[key] = schema[key];
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
if (Object.keys(extraMeta).length > 0) {
|
|
959
|
-
ctx.registry.add(baseSchema, extraMeta);
|
|
960
|
-
}
|
|
961
|
-
if (schema.description) {
|
|
962
|
-
baseSchema = baseSchema.describe(schema.description);
|
|
963
|
-
}
|
|
964
|
-
return baseSchema;
|
|
965
|
-
}
|
|
966
|
-
function fromJSONSchema(schema, params) {
|
|
967
|
-
if (typeof schema === "boolean") {
|
|
968
|
-
return schema ? z.any() : z.never();
|
|
969
|
-
}
|
|
970
|
-
let normalized;
|
|
971
|
-
try {
|
|
972
|
-
normalized = JSON.parse(JSON.stringify(schema));
|
|
973
|
-
} catch {
|
|
974
|
-
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
975
|
-
}
|
|
976
|
-
const version = detectVersion(normalized, params?.defaultTarget);
|
|
977
|
-
const defs = normalized.$defs || normalized.definitions || {};
|
|
978
|
-
const ctx = {
|
|
979
|
-
version,
|
|
980
|
-
defs,
|
|
981
|
-
refs: new Map,
|
|
982
|
-
processing: new Set,
|
|
983
|
-
rootSchema: normalized,
|
|
984
|
-
registry: params?.registry ?? globalRegistry
|
|
985
|
-
};
|
|
986
|
-
return convertSchema(normalized, ctx);
|
|
987
|
-
}
|
|
988
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
989
|
-
function string2(params) {
|
|
990
|
-
return _coercedString(ZodString, params);
|
|
991
|
-
}
|
|
992
|
-
function number2(params) {
|
|
993
|
-
return _coercedNumber(ZodNumber, params);
|
|
994
|
-
}
|
|
995
|
-
function boolean2(params) {
|
|
996
|
-
return _coercedBoolean(ZodBoolean, params);
|
|
997
|
-
}
|
|
998
|
-
function bigint2(params) {
|
|
999
|
-
return _coercedBigint(ZodBigInt, params);
|
|
1000
|
-
}
|
|
1001
|
-
function date2(params) {
|
|
1002
|
-
return _coercedDate(ZodDate, params);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
1006
|
-
config(en_default());
|
|
1007
|
-
|
|
1008
|
-
// src/contracts/pipeline-document/built-ins.ts
|
|
1009
|
-
var BUILT_IN_ERRORS2 = [
|
|
1010
|
-
"Scarn.All",
|
|
1011
|
-
"Scarn.StepFailed",
|
|
1012
|
-
"Scarn.HealthCheckFailed",
|
|
1013
|
-
"Scarn.Timeout",
|
|
1014
|
-
"Scarn.HeartbeatTimeout",
|
|
1015
|
-
"Scarn.MaxRunsExceeded",
|
|
1016
|
-
"Scarn.MaxTurnsExceeded",
|
|
1017
|
-
"Scarn.ConditionError",
|
|
1018
|
-
"Scarn.ArgsError"
|
|
1019
|
-
];
|
|
1020
|
-
var WAIT_ERRORS2 = [
|
|
1021
|
-
"Scarn.All",
|
|
1022
|
-
"Scarn.MaxRunsExceeded",
|
|
1023
|
-
"Scarn.ArgsError"
|
|
1024
|
-
];
|
|
1025
|
-
function decisionResultSchema2(actions) {
|
|
1026
|
-
const keys = [...new Set(actions.map((action) => action.key))];
|
|
1027
|
-
return {
|
|
1028
|
-
title: "DecisionResult",
|
|
1029
|
-
type: "object",
|
|
1030
|
-
properties: {
|
|
1031
|
-
action: keys.length === 0 ? { type: "string" } : { type: "string", enum: keys },
|
|
1032
|
-
body: { type: ["string", "null"] }
|
|
1033
|
-
},
|
|
1034
|
-
required: ["action", "body"],
|
|
1035
|
-
additionalProperties: false
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
var REPLY_RESULT_SCHEMA2 = {
|
|
1039
|
-
title: "ReplyResult",
|
|
1040
|
-
type: "object",
|
|
1041
|
-
properties: {
|
|
1042
|
-
replied: { type: "boolean" },
|
|
1043
|
-
body: { type: ["string", "null"] },
|
|
1044
|
-
commentId: { type: ["string", "null"] }
|
|
1045
|
-
},
|
|
1046
|
-
required: ["replied", "body", "commentId"],
|
|
1047
|
-
additionalProperties: false
|
|
1048
|
-
};
|
|
1049
|
-
var CONVERSATION_RESULT_SCHEMA2 = {
|
|
1050
|
-
title: "ConversationResult",
|
|
1051
|
-
type: "object",
|
|
1052
|
-
properties: {
|
|
1053
|
-
conversationId: { type: "string" },
|
|
1054
|
-
summary: { type: "string" }
|
|
1055
|
-
},
|
|
1056
|
-
required: ["conversationId", "summary"],
|
|
1057
|
-
additionalProperties: false
|
|
1058
|
-
};
|
|
1059
|
-
var REPLY_INPUT_SCHEMA2 = {
|
|
1060
|
-
type: "array",
|
|
1061
|
-
items: { type: "string" }
|
|
1062
|
-
};
|
|
1063
|
-
var ERROR_SCHEMA2 = {
|
|
1064
|
-
title: "Error",
|
|
1065
|
-
type: "object",
|
|
1066
|
-
properties: {
|
|
1067
|
-
name: { type: "string" },
|
|
1068
|
-
message: { type: "string" },
|
|
1069
|
-
cause: {}
|
|
1070
|
-
},
|
|
1071
|
-
required: ["name", "message"]
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
|
-
export { ZodIssueCode, setErrorMap, getErrorMap, ZodFirstPartyTypeKind, fromJSONSchema, exports_coerce, exports_external, BUILT_IN_ERRORS2, WAIT_ERRORS2, decisionResultSchema2, REPLY_RESULT_SCHEMA2, CONVERSATION_RESULT_SCHEMA2, REPLY_INPUT_SCHEMA2, ERROR_SCHEMA2 };
|