unplugin-cloudflare-tunnel 0.0.1 → 0.0.2
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/{api.js → api.mjs} +28 -28
- package/dist/{esbuild.d.ts → esbuild.d.mts} +1 -1
- package/dist/{esbuild.js → esbuild.mjs} +6 -1
- package/dist/{farm.d.ts → farm.d.mts} +1 -1
- package/dist/{farm.js → farm.mjs} +6 -1
- package/dist/{index-BK_mUExr.d.ts → index.d.mts} +12 -2
- package/dist/{src-CVRdCQUT.js → index.mjs} +80 -49
- package/dist/{rolldown.d.ts → rolldown.d.mts} +1 -1
- package/dist/{rolldown.js → rolldown.mjs} +6 -1
- package/dist/{rollup.d.ts → rollup.d.mts} +1 -1
- package/dist/{rollup.js → rollup.mjs} +6 -1
- package/dist/{rspack.d.ts → rspack.d.mts} +1 -1
- package/dist/{rspack.js → rspack.mjs} +6 -1
- package/dist/schemas-CwcXCIyR.mjs +941 -0
- package/dist/{vite.d.ts → vite.d.mts} +1 -1
- package/dist/{vite.js → vite.mjs} +6 -1
- package/dist/{webpack.d.ts → webpack.d.mts} +1 -1
- package/dist/{webpack.js → webpack.mjs} +6 -1
- package/package.json +36 -32
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -3
- /package/dist/{api.d.ts → api.d.mts} +0 -0
- /package/dist/{astro.d.ts → astro.d.mts} +0 -0
- /package/dist/{astro.js → astro.mjs} +0 -0
- /package/dist/{virtual.d.ts → virtual.d.mts} +0 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
//#region node_modules/zod/v4/core/core.js
|
|
2
|
+
/** A special constant with type `never` */
|
|
3
|
+
const NEVER = Object.freeze({ status: "aborted" });
|
|
4
|
+
function $constructor(name, initializer$1, params) {
|
|
5
|
+
function init(inst, def) {
|
|
6
|
+
if (!inst._zod) Object.defineProperty(inst, "_zod", {
|
|
7
|
+
value: {
|
|
8
|
+
def,
|
|
9
|
+
constr: _,
|
|
10
|
+
traits: /* @__PURE__ */ new Set()
|
|
11
|
+
},
|
|
12
|
+
enumerable: false
|
|
13
|
+
});
|
|
14
|
+
if (inst._zod.traits.has(name)) return;
|
|
15
|
+
inst._zod.traits.add(name);
|
|
16
|
+
initializer$1(inst, def);
|
|
17
|
+
const proto = _.prototype;
|
|
18
|
+
const keys = Object.keys(proto);
|
|
19
|
+
for (let i = 0; i < keys.length; i++) {
|
|
20
|
+
const k = keys[i];
|
|
21
|
+
if (!(k in inst)) inst[k] = proto[k].bind(inst);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const Parent = params?.Parent ?? Object;
|
|
25
|
+
class Definition extends Parent {}
|
|
26
|
+
Object.defineProperty(Definition, "name", { value: name });
|
|
27
|
+
function _(def) {
|
|
28
|
+
var _a$1;
|
|
29
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
30
|
+
init(inst, def);
|
|
31
|
+
(_a$1 = inst._zod).deferred ?? (_a$1.deferred = []);
|
|
32
|
+
for (const fn of inst._zod.deferred) fn();
|
|
33
|
+
return inst;
|
|
34
|
+
}
|
|
35
|
+
Object.defineProperty(_, "init", { value: init });
|
|
36
|
+
Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => {
|
|
37
|
+
if (params?.Parent && inst instanceof params.Parent) return true;
|
|
38
|
+
return inst?._zod?.traits?.has(name);
|
|
39
|
+
} });
|
|
40
|
+
Object.defineProperty(_, "name", { value: name });
|
|
41
|
+
return _;
|
|
42
|
+
}
|
|
43
|
+
var $ZodAsyncError = class extends Error {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const globalConfig = {};
|
|
49
|
+
function config(newConfig) {
|
|
50
|
+
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
51
|
+
return globalConfig;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region node_modules/zod/v4/core/util.js
|
|
56
|
+
function jsonStringifyReplacer(_, value) {
|
|
57
|
+
if (typeof value === "bigint") return value.toString();
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
function cached(getter) {
|
|
61
|
+
return { get value() {
|
|
62
|
+
{
|
|
63
|
+
const value = getter();
|
|
64
|
+
Object.defineProperty(this, "value", { value });
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
throw new Error("cached value already set");
|
|
68
|
+
} };
|
|
69
|
+
}
|
|
70
|
+
function cleanRegex(source) {
|
|
71
|
+
const start = source.startsWith("^") ? 1 : 0;
|
|
72
|
+
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
73
|
+
return source.slice(start, end);
|
|
74
|
+
}
|
|
75
|
+
const EVALUATING = Symbol("evaluating");
|
|
76
|
+
function defineLazy(object$1, key, getter) {
|
|
77
|
+
let value = void 0;
|
|
78
|
+
Object.defineProperty(object$1, key, {
|
|
79
|
+
get() {
|
|
80
|
+
if (value === EVALUATING) return;
|
|
81
|
+
if (value === void 0) {
|
|
82
|
+
value = EVALUATING;
|
|
83
|
+
value = getter();
|
|
84
|
+
}
|
|
85
|
+
return value;
|
|
86
|
+
},
|
|
87
|
+
set(v) {
|
|
88
|
+
Object.defineProperty(object$1, key, { value: v });
|
|
89
|
+
},
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
94
|
+
function isObject(data) {
|
|
95
|
+
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
96
|
+
}
|
|
97
|
+
const allowsEval = cached(() => {
|
|
98
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
99
|
+
try {
|
|
100
|
+
new Function("");
|
|
101
|
+
return true;
|
|
102
|
+
} catch (_) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
function clone(inst, def, params) {
|
|
107
|
+
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
108
|
+
if (!def || params?.parent) cl._zod.parent = inst;
|
|
109
|
+
return cl;
|
|
110
|
+
}
|
|
111
|
+
function normalizeParams(_params) {
|
|
112
|
+
const params = _params;
|
|
113
|
+
if (!params) return {};
|
|
114
|
+
if (typeof params === "string") return { error: () => params };
|
|
115
|
+
if (params?.message !== void 0) {
|
|
116
|
+
if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
|
|
117
|
+
params.error = params.message;
|
|
118
|
+
}
|
|
119
|
+
delete params.message;
|
|
120
|
+
if (typeof params.error === "string") return {
|
|
121
|
+
...params,
|
|
122
|
+
error: () => params.error
|
|
123
|
+
};
|
|
124
|
+
return params;
|
|
125
|
+
}
|
|
126
|
+
function optionalKeys(shape) {
|
|
127
|
+
return Object.keys(shape).filter((k) => {
|
|
128
|
+
return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const NUMBER_FORMAT_RANGES = {
|
|
132
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
133
|
+
int32: [-2147483648, 2147483647],
|
|
134
|
+
uint32: [0, 4294967295],
|
|
135
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
136
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
137
|
+
};
|
|
138
|
+
function aborted(x, startIndex = 0) {
|
|
139
|
+
if (x.aborted === true) return true;
|
|
140
|
+
for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
function prefixIssues(path, issues) {
|
|
144
|
+
return issues.map((iss) => {
|
|
145
|
+
var _a$1;
|
|
146
|
+
(_a$1 = iss).path ?? (_a$1.path = []);
|
|
147
|
+
iss.path.unshift(path);
|
|
148
|
+
return iss;
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function unwrapMessage(message) {
|
|
152
|
+
return typeof message === "string" ? message : message?.message;
|
|
153
|
+
}
|
|
154
|
+
function finalizeIssue(iss, ctx, config$1) {
|
|
155
|
+
const full = {
|
|
156
|
+
...iss,
|
|
157
|
+
path: iss.path ?? []
|
|
158
|
+
};
|
|
159
|
+
if (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config$1.customError?.(iss)) ?? unwrapMessage(config$1.localeError?.(iss)) ?? "Invalid input";
|
|
160
|
+
delete full.inst;
|
|
161
|
+
delete full.continue;
|
|
162
|
+
if (!ctx?.reportInput) delete full.input;
|
|
163
|
+
return full;
|
|
164
|
+
}
|
|
165
|
+
function issue(...args) {
|
|
166
|
+
const [iss, input, inst] = args;
|
|
167
|
+
if (typeof iss === "string") return {
|
|
168
|
+
message: iss,
|
|
169
|
+
code: "custom",
|
|
170
|
+
input,
|
|
171
|
+
inst
|
|
172
|
+
};
|
|
173
|
+
return { ...iss };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region node_modules/zod/v4/core/errors.js
|
|
178
|
+
const initializer = (inst, def) => {
|
|
179
|
+
inst.name = "$ZodError";
|
|
180
|
+
Object.defineProperty(inst, "_zod", {
|
|
181
|
+
value: inst._zod,
|
|
182
|
+
enumerable: false
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(inst, "issues", {
|
|
185
|
+
value: def,
|
|
186
|
+
enumerable: false
|
|
187
|
+
});
|
|
188
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
189
|
+
Object.defineProperty(inst, "toString", {
|
|
190
|
+
value: () => inst.message,
|
|
191
|
+
enumerable: false
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
const $ZodError = $constructor("$ZodError", initializer);
|
|
195
|
+
const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region node_modules/zod/v4/core/parse.js
|
|
199
|
+
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
200
|
+
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
201
|
+
const result = schema._zod.run({
|
|
202
|
+
value,
|
|
203
|
+
issues: []
|
|
204
|
+
}, ctx);
|
|
205
|
+
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
206
|
+
if (result.issues.length) {
|
|
207
|
+
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
208
|
+
captureStackTrace(e, _params?.callee);
|
|
209
|
+
throw e;
|
|
210
|
+
}
|
|
211
|
+
return result.value;
|
|
212
|
+
};
|
|
213
|
+
const parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
214
|
+
const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
215
|
+
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
216
|
+
let result = schema._zod.run({
|
|
217
|
+
value,
|
|
218
|
+
issues: []
|
|
219
|
+
}, ctx);
|
|
220
|
+
if (result instanceof Promise) result = await result;
|
|
221
|
+
if (result.issues.length) {
|
|
222
|
+
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
223
|
+
captureStackTrace(e, params?.callee);
|
|
224
|
+
throw e;
|
|
225
|
+
}
|
|
226
|
+
return result.value;
|
|
227
|
+
};
|
|
228
|
+
const parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
229
|
+
const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
230
|
+
const ctx = _ctx ? {
|
|
231
|
+
..._ctx,
|
|
232
|
+
async: false
|
|
233
|
+
} : { async: false };
|
|
234
|
+
const result = schema._zod.run({
|
|
235
|
+
value,
|
|
236
|
+
issues: []
|
|
237
|
+
}, ctx);
|
|
238
|
+
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
239
|
+
return result.issues.length ? {
|
|
240
|
+
success: false,
|
|
241
|
+
error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
242
|
+
} : {
|
|
243
|
+
success: true,
|
|
244
|
+
data: result.value
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
const safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
248
|
+
const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
249
|
+
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
250
|
+
let result = schema._zod.run({
|
|
251
|
+
value,
|
|
252
|
+
issues: []
|
|
253
|
+
}, ctx);
|
|
254
|
+
if (result instanceof Promise) result = await result;
|
|
255
|
+
return result.issues.length ? {
|
|
256
|
+
success: false,
|
|
257
|
+
error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
258
|
+
} : {
|
|
259
|
+
success: true,
|
|
260
|
+
data: result.value
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
const safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
264
|
+
const _encode = (_Err) => (schema, value, _ctx) => {
|
|
265
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
266
|
+
return _parse(_Err)(schema, value, ctx);
|
|
267
|
+
};
|
|
268
|
+
const encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
269
|
+
const _decode = (_Err) => (schema, value, _ctx) => {
|
|
270
|
+
return _parse(_Err)(schema, value, _ctx);
|
|
271
|
+
};
|
|
272
|
+
const decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
273
|
+
const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
274
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
275
|
+
return _parseAsync(_Err)(schema, value, ctx);
|
|
276
|
+
};
|
|
277
|
+
const encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
278
|
+
const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
279
|
+
return _parseAsync(_Err)(schema, value, _ctx);
|
|
280
|
+
};
|
|
281
|
+
const decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
282
|
+
const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
283
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
284
|
+
return _safeParse(_Err)(schema, value, ctx);
|
|
285
|
+
};
|
|
286
|
+
const safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
287
|
+
const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
288
|
+
return _safeParse(_Err)(schema, value, _ctx);
|
|
289
|
+
};
|
|
290
|
+
const safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
291
|
+
const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
292
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
293
|
+
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
294
|
+
};
|
|
295
|
+
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
296
|
+
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
297
|
+
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
298
|
+
};
|
|
299
|
+
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
300
|
+
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region node_modules/zod/v4/core/regexes.js
|
|
303
|
+
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
304
|
+
const date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
305
|
+
const string$1 = (params) => {
|
|
306
|
+
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
307
|
+
return /* @__PURE__ */ new RegExp(`^${regex}$`);
|
|
308
|
+
};
|
|
309
|
+
const number$1 = /^-?\d+(?:\.\d+)?$/;
|
|
310
|
+
const boolean$1 = /^(?:true|false)$/i;
|
|
311
|
+
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region node_modules/zod/v4/core/checks.js
|
|
314
|
+
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
315
|
+
var _a$1;
|
|
316
|
+
inst._zod ?? (inst._zod = {});
|
|
317
|
+
inst._zod.def = def;
|
|
318
|
+
(_a$1 = inst._zod).onattach ?? (_a$1.onattach = []);
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region node_modules/zod/v4/core/versions.js
|
|
323
|
+
const version = {
|
|
324
|
+
major: 4,
|
|
325
|
+
minor: 3,
|
|
326
|
+
patch: 3
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region node_modules/zod/v4/core/schemas.js
|
|
331
|
+
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
332
|
+
var _a$1;
|
|
333
|
+
inst ?? (inst = {});
|
|
334
|
+
inst._zod.def = def;
|
|
335
|
+
inst._zod.bag = inst._zod.bag || {};
|
|
336
|
+
inst._zod.version = version;
|
|
337
|
+
const checks = [...inst._zod.def.checks ?? []];
|
|
338
|
+
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
339
|
+
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
340
|
+
if (checks.length === 0) {
|
|
341
|
+
(_a$1 = inst._zod).deferred ?? (_a$1.deferred = []);
|
|
342
|
+
inst._zod.deferred?.push(() => {
|
|
343
|
+
inst._zod.run = inst._zod.parse;
|
|
344
|
+
});
|
|
345
|
+
} else {
|
|
346
|
+
const runChecks = (payload, checks$1, ctx) => {
|
|
347
|
+
let isAborted = aborted(payload);
|
|
348
|
+
let asyncResult;
|
|
349
|
+
for (const ch of checks$1) {
|
|
350
|
+
if (ch._zod.def.when) {
|
|
351
|
+
if (!ch._zod.def.when(payload)) continue;
|
|
352
|
+
} else if (isAborted) continue;
|
|
353
|
+
const currLen = payload.issues.length;
|
|
354
|
+
const _ = ch._zod.check(payload);
|
|
355
|
+
if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
|
|
356
|
+
if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
357
|
+
await _;
|
|
358
|
+
if (payload.issues.length === currLen) return;
|
|
359
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
360
|
+
});
|
|
361
|
+
else {
|
|
362
|
+
if (payload.issues.length === currLen) continue;
|
|
363
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
if (asyncResult) return asyncResult.then(() => {
|
|
367
|
+
return payload;
|
|
368
|
+
});
|
|
369
|
+
return payload;
|
|
370
|
+
};
|
|
371
|
+
const handleCanaryResult = (canary, payload, ctx) => {
|
|
372
|
+
if (aborted(canary)) {
|
|
373
|
+
canary.aborted = true;
|
|
374
|
+
return canary;
|
|
375
|
+
}
|
|
376
|
+
const checkResult = runChecks(payload, checks, ctx);
|
|
377
|
+
if (checkResult instanceof Promise) {
|
|
378
|
+
if (ctx.async === false) throw new $ZodAsyncError();
|
|
379
|
+
return checkResult.then((checkResult$1) => inst._zod.parse(checkResult$1, ctx));
|
|
380
|
+
}
|
|
381
|
+
return inst._zod.parse(checkResult, ctx);
|
|
382
|
+
};
|
|
383
|
+
inst._zod.run = (payload, ctx) => {
|
|
384
|
+
if (ctx.skipChecks) return inst._zod.parse(payload, ctx);
|
|
385
|
+
if (ctx.direction === "backward") {
|
|
386
|
+
const canary = inst._zod.parse({
|
|
387
|
+
value: payload.value,
|
|
388
|
+
issues: []
|
|
389
|
+
}, {
|
|
390
|
+
...ctx,
|
|
391
|
+
skipChecks: true
|
|
392
|
+
});
|
|
393
|
+
if (canary instanceof Promise) return canary.then((canary$1) => {
|
|
394
|
+
return handleCanaryResult(canary$1, payload, ctx);
|
|
395
|
+
});
|
|
396
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
397
|
+
}
|
|
398
|
+
const result = inst._zod.parse(payload, ctx);
|
|
399
|
+
if (result instanceof Promise) {
|
|
400
|
+
if (ctx.async === false) throw new $ZodAsyncError();
|
|
401
|
+
return result.then((result$1) => runChecks(result$1, checks, ctx));
|
|
402
|
+
}
|
|
403
|
+
return runChecks(result, checks, ctx);
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
defineLazy(inst, "~standard", () => ({
|
|
407
|
+
validate: (value) => {
|
|
408
|
+
try {
|
|
409
|
+
const r = safeParse(inst, value);
|
|
410
|
+
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
411
|
+
} catch (_) {
|
|
412
|
+
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
vendor: "zod",
|
|
416
|
+
version: 1
|
|
417
|
+
}));
|
|
418
|
+
});
|
|
419
|
+
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
420
|
+
$ZodType.init(inst, def);
|
|
421
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
422
|
+
inst._zod.parse = (payload, _) => {
|
|
423
|
+
if (def.coerce) try {
|
|
424
|
+
payload.value = String(payload.value);
|
|
425
|
+
} catch (_$1) {}
|
|
426
|
+
if (typeof payload.value === "string") return payload;
|
|
427
|
+
payload.issues.push({
|
|
428
|
+
expected: "string",
|
|
429
|
+
code: "invalid_type",
|
|
430
|
+
input: payload.value,
|
|
431
|
+
inst
|
|
432
|
+
});
|
|
433
|
+
return payload;
|
|
434
|
+
};
|
|
435
|
+
});
|
|
436
|
+
const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
437
|
+
$ZodType.init(inst, def);
|
|
438
|
+
inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
|
|
439
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
440
|
+
if (def.coerce) try {
|
|
441
|
+
payload.value = Number(payload.value);
|
|
442
|
+
} catch (_) {}
|
|
443
|
+
const input = payload.value;
|
|
444
|
+
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
|
|
445
|
+
const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
|
|
446
|
+
payload.issues.push({
|
|
447
|
+
expected: "number",
|
|
448
|
+
code: "invalid_type",
|
|
449
|
+
input,
|
|
450
|
+
inst,
|
|
451
|
+
...received ? { received } : {}
|
|
452
|
+
});
|
|
453
|
+
return payload;
|
|
454
|
+
};
|
|
455
|
+
});
|
|
456
|
+
const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
457
|
+
$ZodType.init(inst, def);
|
|
458
|
+
inst._zod.pattern = boolean$1;
|
|
459
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
460
|
+
if (def.coerce) try {
|
|
461
|
+
payload.value = Boolean(payload.value);
|
|
462
|
+
} catch (_) {}
|
|
463
|
+
const input = payload.value;
|
|
464
|
+
if (typeof input === "boolean") return payload;
|
|
465
|
+
payload.issues.push({
|
|
466
|
+
expected: "boolean",
|
|
467
|
+
code: "invalid_type",
|
|
468
|
+
input,
|
|
469
|
+
inst
|
|
470
|
+
});
|
|
471
|
+
return payload;
|
|
472
|
+
};
|
|
473
|
+
});
|
|
474
|
+
const $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
|
|
475
|
+
$ZodType.init(inst, def);
|
|
476
|
+
inst._zod.parse = (payload) => payload;
|
|
477
|
+
});
|
|
478
|
+
const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
|
|
479
|
+
$ZodType.init(inst, def);
|
|
480
|
+
inst._zod.parse = (payload) => payload;
|
|
481
|
+
});
|
|
482
|
+
function handleArrayResult(result, final, index) {
|
|
483
|
+
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
484
|
+
final.value[index] = result.value;
|
|
485
|
+
}
|
|
486
|
+
const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
487
|
+
$ZodType.init(inst, def);
|
|
488
|
+
inst._zod.parse = (payload, ctx) => {
|
|
489
|
+
const input = payload.value;
|
|
490
|
+
if (!Array.isArray(input)) {
|
|
491
|
+
payload.issues.push({
|
|
492
|
+
expected: "array",
|
|
493
|
+
code: "invalid_type",
|
|
494
|
+
input,
|
|
495
|
+
inst
|
|
496
|
+
});
|
|
497
|
+
return payload;
|
|
498
|
+
}
|
|
499
|
+
payload.value = Array(input.length);
|
|
500
|
+
const proms = [];
|
|
501
|
+
for (let i = 0; i < input.length; i++) {
|
|
502
|
+
const item = input[i];
|
|
503
|
+
const result = def.element._zod.run({
|
|
504
|
+
value: item,
|
|
505
|
+
issues: []
|
|
506
|
+
}, ctx);
|
|
507
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
|
|
508
|
+
else handleArrayResult(result, payload, i);
|
|
509
|
+
}
|
|
510
|
+
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
511
|
+
return payload;
|
|
512
|
+
};
|
|
513
|
+
});
|
|
514
|
+
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
515
|
+
if (result.issues.length) {
|
|
516
|
+
if (isOptionalOut && !(key in input)) return;
|
|
517
|
+
final.issues.push(...prefixIssues(key, result.issues));
|
|
518
|
+
}
|
|
519
|
+
if (result.value === void 0) {
|
|
520
|
+
if (key in input) final.value[key] = void 0;
|
|
521
|
+
} else final.value[key] = result.value;
|
|
522
|
+
}
|
|
523
|
+
function normalizeDef(def) {
|
|
524
|
+
const keys = Object.keys(def.shape);
|
|
525
|
+
for (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
526
|
+
const okeys = optionalKeys(def.shape);
|
|
527
|
+
return {
|
|
528
|
+
...def,
|
|
529
|
+
keys,
|
|
530
|
+
keySet: new Set(keys),
|
|
531
|
+
numKeys: keys.length,
|
|
532
|
+
optionalKeys: new Set(okeys)
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
536
|
+
const unrecognized = [];
|
|
537
|
+
const keySet = def.keySet;
|
|
538
|
+
const _catchall = def.catchall._zod;
|
|
539
|
+
const t = _catchall.def.type;
|
|
540
|
+
const isOptionalOut = _catchall.optout === "optional";
|
|
541
|
+
for (const key in input) {
|
|
542
|
+
if (keySet.has(key)) continue;
|
|
543
|
+
if (t === "never") {
|
|
544
|
+
unrecognized.push(key);
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
547
|
+
const r = _catchall.run({
|
|
548
|
+
value: input[key],
|
|
549
|
+
issues: []
|
|
550
|
+
}, ctx);
|
|
551
|
+
if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, isOptionalOut)));
|
|
552
|
+
else handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
553
|
+
}
|
|
554
|
+
if (unrecognized.length) payload.issues.push({
|
|
555
|
+
code: "unrecognized_keys",
|
|
556
|
+
keys: unrecognized,
|
|
557
|
+
input,
|
|
558
|
+
inst
|
|
559
|
+
});
|
|
560
|
+
if (!proms.length) return payload;
|
|
561
|
+
return Promise.all(proms).then(() => {
|
|
562
|
+
return payload;
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
566
|
+
$ZodType.init(inst, def);
|
|
567
|
+
if (!Object.getOwnPropertyDescriptor(def, "shape")?.get) {
|
|
568
|
+
const sh = def.shape;
|
|
569
|
+
Object.defineProperty(def, "shape", { get: () => {
|
|
570
|
+
const newSh = { ...sh };
|
|
571
|
+
Object.defineProperty(def, "shape", { value: newSh });
|
|
572
|
+
return newSh;
|
|
573
|
+
} });
|
|
574
|
+
}
|
|
575
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
576
|
+
defineLazy(inst._zod, "propValues", () => {
|
|
577
|
+
const shape = def.shape;
|
|
578
|
+
const propValues = {};
|
|
579
|
+
for (const key in shape) {
|
|
580
|
+
const field = shape[key]._zod;
|
|
581
|
+
if (field.values) {
|
|
582
|
+
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
583
|
+
for (const v of field.values) propValues[key].add(v);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return propValues;
|
|
587
|
+
});
|
|
588
|
+
const isObject$1 = isObject;
|
|
589
|
+
const catchall = def.catchall;
|
|
590
|
+
let value;
|
|
591
|
+
inst._zod.parse = (payload, ctx) => {
|
|
592
|
+
value ?? (value = _normalized.value);
|
|
593
|
+
const input = payload.value;
|
|
594
|
+
if (!isObject$1(input)) {
|
|
595
|
+
payload.issues.push({
|
|
596
|
+
expected: "object",
|
|
597
|
+
code: "invalid_type",
|
|
598
|
+
input,
|
|
599
|
+
inst
|
|
600
|
+
});
|
|
601
|
+
return payload;
|
|
602
|
+
}
|
|
603
|
+
payload.value = {};
|
|
604
|
+
const proms = [];
|
|
605
|
+
const shape = value.shape;
|
|
606
|
+
for (const key of value.keys) {
|
|
607
|
+
const el = shape[key];
|
|
608
|
+
const isOptionalOut = el._zod.optout === "optional";
|
|
609
|
+
const r = el._zod.run({
|
|
610
|
+
value: input[key],
|
|
611
|
+
issues: []
|
|
612
|
+
}, ctx);
|
|
613
|
+
if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, isOptionalOut)));
|
|
614
|
+
else handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
615
|
+
}
|
|
616
|
+
if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
617
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
618
|
+
};
|
|
619
|
+
});
|
|
620
|
+
function handleOptionalResult(result, input) {
|
|
621
|
+
if (result.issues.length && input === void 0) return {
|
|
622
|
+
issues: [],
|
|
623
|
+
value: void 0
|
|
624
|
+
};
|
|
625
|
+
return result;
|
|
626
|
+
}
|
|
627
|
+
const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
628
|
+
$ZodType.init(inst, def);
|
|
629
|
+
inst._zod.optin = "optional";
|
|
630
|
+
inst._zod.optout = "optional";
|
|
631
|
+
defineLazy(inst._zod, "values", () => {
|
|
632
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
|
|
633
|
+
});
|
|
634
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
635
|
+
const pattern = def.innerType._zod.pattern;
|
|
636
|
+
return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
|
|
637
|
+
});
|
|
638
|
+
inst._zod.parse = (payload, ctx) => {
|
|
639
|
+
if (def.innerType._zod.optin === "optional") {
|
|
640
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
641
|
+
if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));
|
|
642
|
+
return handleOptionalResult(result, payload.value);
|
|
643
|
+
}
|
|
644
|
+
if (payload.value === void 0) return payload;
|
|
645
|
+
return def.innerType._zod.run(payload, ctx);
|
|
646
|
+
};
|
|
647
|
+
});
|
|
648
|
+
const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
|
|
649
|
+
$ZodType.init(inst, def);
|
|
650
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
651
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
652
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
653
|
+
const pattern = def.innerType._zod.pattern;
|
|
654
|
+
return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
|
|
655
|
+
});
|
|
656
|
+
defineLazy(inst._zod, "values", () => {
|
|
657
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
|
|
658
|
+
});
|
|
659
|
+
inst._zod.parse = (payload, ctx) => {
|
|
660
|
+
if (payload.value === null) return payload;
|
|
661
|
+
return def.innerType._zod.run(payload, ctx);
|
|
662
|
+
};
|
|
663
|
+
});
|
|
664
|
+
const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
665
|
+
$ZodCheck.init(inst, def);
|
|
666
|
+
$ZodType.init(inst, def);
|
|
667
|
+
inst._zod.parse = (payload, _) => {
|
|
668
|
+
return payload;
|
|
669
|
+
};
|
|
670
|
+
inst._zod.check = (payload) => {
|
|
671
|
+
const input = payload.value;
|
|
672
|
+
const r = def.fn(input);
|
|
673
|
+
if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
|
|
674
|
+
handleRefineResult(r, payload, input, inst);
|
|
675
|
+
};
|
|
676
|
+
});
|
|
677
|
+
function handleRefineResult(result, payload, input, inst) {
|
|
678
|
+
if (!result) {
|
|
679
|
+
const _iss = {
|
|
680
|
+
code: "custom",
|
|
681
|
+
input,
|
|
682
|
+
inst,
|
|
683
|
+
path: [...inst._zod.def.path ?? []],
|
|
684
|
+
continue: !inst._zod.def.abort
|
|
685
|
+
};
|
|
686
|
+
if (inst._zod.def.params) _iss.params = inst._zod.def.params;
|
|
687
|
+
payload.issues.push(issue(_iss));
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
//#endregion
|
|
692
|
+
//#region node_modules/zod/v4/core/registries.js
|
|
693
|
+
var _a;
|
|
694
|
+
var $ZodRegistry = class {
|
|
695
|
+
constructor() {
|
|
696
|
+
this._map = /* @__PURE__ */ new WeakMap();
|
|
697
|
+
this._idmap = /* @__PURE__ */ new Map();
|
|
698
|
+
}
|
|
699
|
+
add(schema, ..._meta) {
|
|
700
|
+
const meta$2 = _meta[0];
|
|
701
|
+
this._map.set(schema, meta$2);
|
|
702
|
+
if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) this._idmap.set(meta$2.id, schema);
|
|
703
|
+
return this;
|
|
704
|
+
}
|
|
705
|
+
clear() {
|
|
706
|
+
this._map = /* @__PURE__ */ new WeakMap();
|
|
707
|
+
this._idmap = /* @__PURE__ */ new Map();
|
|
708
|
+
return this;
|
|
709
|
+
}
|
|
710
|
+
remove(schema) {
|
|
711
|
+
const meta$2 = this._map.get(schema);
|
|
712
|
+
if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) this._idmap.delete(meta$2.id);
|
|
713
|
+
this._map.delete(schema);
|
|
714
|
+
return this;
|
|
715
|
+
}
|
|
716
|
+
get(schema) {
|
|
717
|
+
const p = schema._zod.parent;
|
|
718
|
+
if (p) {
|
|
719
|
+
const pm = { ...this.get(p) ?? {} };
|
|
720
|
+
delete pm.id;
|
|
721
|
+
const f = {
|
|
722
|
+
...pm,
|
|
723
|
+
...this._map.get(schema)
|
|
724
|
+
};
|
|
725
|
+
return Object.keys(f).length ? f : void 0;
|
|
726
|
+
}
|
|
727
|
+
return this._map.get(schema);
|
|
728
|
+
}
|
|
729
|
+
has(schema) {
|
|
730
|
+
return this._map.has(schema);
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
function registry() {
|
|
734
|
+
return new $ZodRegistry();
|
|
735
|
+
}
|
|
736
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
737
|
+
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
738
|
+
|
|
739
|
+
//#endregion
|
|
740
|
+
//#region node_modules/zod/v4/core/api.js
|
|
741
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
742
|
+
function _string(Class, params) {
|
|
743
|
+
return new Class({
|
|
744
|
+
type: "string",
|
|
745
|
+
...normalizeParams(params)
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
749
|
+
function _number(Class, params) {
|
|
750
|
+
return new Class({
|
|
751
|
+
type: "number",
|
|
752
|
+
checks: [],
|
|
753
|
+
...normalizeParams(params)
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
757
|
+
function _boolean(Class, params) {
|
|
758
|
+
return new Class({
|
|
759
|
+
type: "boolean",
|
|
760
|
+
...normalizeParams(params)
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
764
|
+
function _any(Class) {
|
|
765
|
+
return new Class({ type: "any" });
|
|
766
|
+
}
|
|
767
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
768
|
+
function _unknown(Class) {
|
|
769
|
+
return new Class({ type: "unknown" });
|
|
770
|
+
}
|
|
771
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
772
|
+
function _refine(Class, fn, _params) {
|
|
773
|
+
return new Class({
|
|
774
|
+
type: "custom",
|
|
775
|
+
check: "custom",
|
|
776
|
+
fn,
|
|
777
|
+
...normalizeParams(_params)
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
781
|
+
function describe$1(description) {
|
|
782
|
+
const ch = new $ZodCheck({ check: "describe" });
|
|
783
|
+
ch._zod.onattach = [(inst) => {
|
|
784
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
785
|
+
globalRegistry.add(inst, {
|
|
786
|
+
...existing,
|
|
787
|
+
description
|
|
788
|
+
});
|
|
789
|
+
}];
|
|
790
|
+
ch._zod.check = () => {};
|
|
791
|
+
return ch;
|
|
792
|
+
}
|
|
793
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
794
|
+
function meta$1(metadata) {
|
|
795
|
+
const ch = new $ZodCheck({ check: "meta" });
|
|
796
|
+
ch._zod.onattach = [(inst) => {
|
|
797
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
798
|
+
globalRegistry.add(inst, {
|
|
799
|
+
...existing,
|
|
800
|
+
...metadata
|
|
801
|
+
});
|
|
802
|
+
}];
|
|
803
|
+
ch._zod.check = () => {};
|
|
804
|
+
return ch;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region node_modules/zod/v4/mini/schemas.js
|
|
809
|
+
const ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
810
|
+
if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType.");
|
|
811
|
+
$ZodType.init(inst, def);
|
|
812
|
+
inst.def = def;
|
|
813
|
+
inst.type = def.type;
|
|
814
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
815
|
+
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
816
|
+
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
817
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
818
|
+
inst.check = (...checks) => {
|
|
819
|
+
return inst.clone({
|
|
820
|
+
...def,
|
|
821
|
+
checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: {
|
|
822
|
+
check: ch,
|
|
823
|
+
def: { check: "custom" },
|
|
824
|
+
onattach: []
|
|
825
|
+
} } : ch)]
|
|
826
|
+
}, { parent: true });
|
|
827
|
+
};
|
|
828
|
+
inst.with = inst.check;
|
|
829
|
+
inst.refine = (check, params) => inst.check(/* @__PURE__ */ refine(check, params));
|
|
830
|
+
inst.clone = (_def, params) => clone(inst, _def, params);
|
|
831
|
+
inst.brand = () => inst;
|
|
832
|
+
inst.register = ((reg, meta$2) => {
|
|
833
|
+
reg.add(inst, meta$2);
|
|
834
|
+
return inst;
|
|
835
|
+
});
|
|
836
|
+
inst.apply = (fn) => fn(inst);
|
|
837
|
+
});
|
|
838
|
+
const ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
|
|
839
|
+
$ZodString.init(inst, def);
|
|
840
|
+
ZodMiniType.init(inst, def);
|
|
841
|
+
});
|
|
842
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
843
|
+
function string(params) {
|
|
844
|
+
return _string(ZodMiniString, params);
|
|
845
|
+
}
|
|
846
|
+
const ZodMiniNumber = /* @__PURE__ */ $constructor("ZodMiniNumber", (inst, def) => {
|
|
847
|
+
$ZodNumber.init(inst, def);
|
|
848
|
+
ZodMiniType.init(inst, def);
|
|
849
|
+
});
|
|
850
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
851
|
+
function number(params) {
|
|
852
|
+
return _number(ZodMiniNumber, params);
|
|
853
|
+
}
|
|
854
|
+
const ZodMiniBoolean = /* @__PURE__ */ $constructor("ZodMiniBoolean", (inst, def) => {
|
|
855
|
+
$ZodBoolean.init(inst, def);
|
|
856
|
+
ZodMiniType.init(inst, def);
|
|
857
|
+
});
|
|
858
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
859
|
+
function boolean(params) {
|
|
860
|
+
return _boolean(ZodMiniBoolean, params);
|
|
861
|
+
}
|
|
862
|
+
const ZodMiniAny = /* @__PURE__ */ $constructor("ZodMiniAny", (inst, def) => {
|
|
863
|
+
$ZodAny.init(inst, def);
|
|
864
|
+
ZodMiniType.init(inst, def);
|
|
865
|
+
});
|
|
866
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
867
|
+
function any() {
|
|
868
|
+
return _any(ZodMiniAny);
|
|
869
|
+
}
|
|
870
|
+
const ZodMiniUnknown = /* @__PURE__ */ $constructor("ZodMiniUnknown", (inst, def) => {
|
|
871
|
+
$ZodUnknown.init(inst, def);
|
|
872
|
+
ZodMiniType.init(inst, def);
|
|
873
|
+
});
|
|
874
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
875
|
+
function unknown() {
|
|
876
|
+
return _unknown(ZodMiniUnknown);
|
|
877
|
+
}
|
|
878
|
+
const ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
|
|
879
|
+
$ZodArray.init(inst, def);
|
|
880
|
+
ZodMiniType.init(inst, def);
|
|
881
|
+
});
|
|
882
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
883
|
+
function array(element, params) {
|
|
884
|
+
return new ZodMiniArray({
|
|
885
|
+
type: "array",
|
|
886
|
+
element,
|
|
887
|
+
...normalizeParams(params)
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
const ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
|
|
891
|
+
$ZodObject.init(inst, def);
|
|
892
|
+
ZodMiniType.init(inst, def);
|
|
893
|
+
defineLazy(inst, "shape", () => def.shape);
|
|
894
|
+
});
|
|
895
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
896
|
+
function object(shape, params) {
|
|
897
|
+
return new ZodMiniObject({
|
|
898
|
+
type: "object",
|
|
899
|
+
shape: shape ?? {},
|
|
900
|
+
...normalizeParams(params)
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
const ZodMiniOptional = /* @__PURE__ */ $constructor("ZodMiniOptional", (inst, def) => {
|
|
904
|
+
$ZodOptional.init(inst, def);
|
|
905
|
+
ZodMiniType.init(inst, def);
|
|
906
|
+
});
|
|
907
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
908
|
+
function optional(innerType) {
|
|
909
|
+
return new ZodMiniOptional({
|
|
910
|
+
type: "optional",
|
|
911
|
+
innerType
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
const ZodMiniNullable = /* @__PURE__ */ $constructor("ZodMiniNullable", (inst, def) => {
|
|
915
|
+
$ZodNullable.init(inst, def);
|
|
916
|
+
ZodMiniType.init(inst, def);
|
|
917
|
+
});
|
|
918
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
919
|
+
function nullable(innerType) {
|
|
920
|
+
return new ZodMiniNullable({
|
|
921
|
+
type: "nullable",
|
|
922
|
+
innerType
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
926
|
+
function nullish(innerType) {
|
|
927
|
+
return /* @__PURE__ */ optional(/* @__PURE__ */ nullable(innerType));
|
|
928
|
+
}
|
|
929
|
+
const ZodMiniCustom = /* @__PURE__ */ $constructor("ZodMiniCustom", (inst, def) => {
|
|
930
|
+
$ZodCustom.init(inst, def);
|
|
931
|
+
ZodMiniType.init(inst, def);
|
|
932
|
+
});
|
|
933
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
934
|
+
function refine(fn, _params = {}) {
|
|
935
|
+
return _refine(ZodMiniCustom, fn, _params);
|
|
936
|
+
}
|
|
937
|
+
const describe = describe$1;
|
|
938
|
+
const meta = meta$1;
|
|
939
|
+
|
|
940
|
+
//#endregion
|
|
941
|
+
export { number as a, string as c, nullish as i, unknown as l, array as n, object as o, boolean as r, optional as s, any as t };
|