drizzle-kit 0.31.1-d1468f0 → 0.31.2-6baabce

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 (9) hide show
  1. package/api.d.mts +421 -421
  2. package/api.d.ts +421 -421
  3. package/api.js +598 -438
  4. package/api.mjs +598 -437
  5. package/bin.cjs +21467 -20122
  6. package/index.js +3 -3
  7. package/package.json +10 -11
  8. package/utils.js +266 -152
  9. package/utils.mjs +266 -152
package/api.js CHANGED
@@ -35,7 +35,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
36
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
37
37
 
38
- // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
38
+ // ../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
39
39
  function assembleStyles() {
40
40
  const codes = /* @__PURE__ */ new Map();
41
41
  for (const [groupName, group] of Object.entries(styles)) {
@@ -152,7 +152,7 @@ function assembleStyles() {
152
152
  }
153
153
  var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
154
154
  var init_ansi_styles = __esm({
155
- "../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
155
+ "../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
156
156
  "use strict";
157
157
  ANSI_BACKGROUND_OFFSET = 10;
158
158
  wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -227,7 +227,7 @@ var init_ansi_styles = __esm({
227
227
  }
228
228
  });
229
229
 
230
- // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
230
+ // ../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
231
231
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
232
232
  const prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
233
233
  const position = argv.indexOf(prefix2 + flag);
@@ -291,10 +291,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
291
291
  return 1;
292
292
  }
293
293
  if ("CI" in env) {
294
- if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
294
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
295
295
  return 3;
296
296
  }
297
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
297
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
298
298
  return 1;
299
299
  }
300
300
  return min2;
@@ -339,7 +339,7 @@ function createSupportsColor(stream, options = {}) {
339
339
  }
340
340
  var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
341
341
  var init_supports_color = __esm({
342
- "../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js"() {
342
+ "../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js"() {
343
343
  "use strict";
344
344
  import_node_process = __toESM(require("process"), 1);
345
345
  import_node_os = __toESM(require("os"), 1);
@@ -358,7 +358,7 @@ var init_supports_color = __esm({
358
358
  }
359
359
  });
360
360
 
361
- // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
361
+ // ../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
362
362
  function stringReplaceAll(string, substring, replacer) {
363
363
  let index6 = string.indexOf(substring);
364
364
  if (index6 === -1) {
@@ -388,18 +388,18 @@ function stringEncaseCRLFWithFirstIndex(string, prefix2, postfix, index6) {
388
388
  return returnValue;
389
389
  }
390
390
  var init_utilities = __esm({
391
- "../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js"() {
391
+ "../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js"() {
392
392
  "use strict";
393
393
  }
394
394
  });
395
395
 
396
- // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
396
+ // ../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
397
397
  function createChalk(options) {
398
398
  return chalkFactory(options);
399
399
  }
400
400
  var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default;
401
401
  var init_source = __esm({
402
- "../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js"() {
402
+ "../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js"() {
403
403
  "use strict";
404
404
  init_ansi_styles();
405
405
  init_supports_color();
@@ -1306,6 +1306,7 @@ var require_minimatch = __commonJS({
1306
1306
  continue;
1307
1307
  }
1308
1308
  switch (c) {
1309
+ /* istanbul ignore next */
1309
1310
  case "/": {
1310
1311
  return false;
1311
1312
  }
@@ -1317,6 +1318,8 @@ var require_minimatch = __commonJS({
1317
1318
  clearStateChar();
1318
1319
  escaping = true;
1319
1320
  continue;
1321
+ // the various stateChar values
1322
+ // for the "extglob" stuff.
1320
1323
  case "?":
1321
1324
  case "*":
1322
1325
  case "+":
@@ -1391,6 +1394,7 @@ var require_minimatch = __commonJS({
1391
1394
  }
1392
1395
  continue;
1393
1396
  }
1397
+ // these are mostly the same in regexp and glob
1394
1398
  case "[":
1395
1399
  clearStateChar();
1396
1400
  if (inClass) {
@@ -1899,6 +1903,7 @@ var require_sync = __commonJS({
1899
1903
  }
1900
1904
  var prefix2;
1901
1905
  switch (n) {
1906
+ // if not, then this is rather simple
1902
1907
  case pattern.length:
1903
1908
  this._processSimple(pattern.join("/"), index6);
1904
1909
  return;
@@ -2060,6 +2065,7 @@ var require_sync = __commonJS({
2060
2065
  GlobSync.prototype._readdirError = function(f, er) {
2061
2066
  switch (er.code) {
2062
2067
  case "ENOTSUP":
2068
+ // https://github.com/isaacs/node-glob/issues/205
2063
2069
  case "ENOTDIR":
2064
2070
  var abs = this._makeAbs(f);
2065
2071
  this.cache[abs] = "FILE";
@@ -2071,6 +2077,7 @@ var require_sync = __commonJS({
2071
2077
  }
2072
2078
  break;
2073
2079
  case "ENOENT":
2080
+ // not terribly unusual
2074
2081
  case "ELOOP":
2075
2082
  case "ENAMETOOLONG":
2076
2083
  case "UNKNOWN":
@@ -2522,6 +2529,7 @@ var require_glob = __commonJS({
2522
2529
  }
2523
2530
  var prefix2;
2524
2531
  switch (n) {
2532
+ // if not, then this is rather simple
2525
2533
  case pattern.length:
2526
2534
  this._processSimple(pattern.join("/"), index6, cb);
2527
2535
  return;
@@ -2711,6 +2719,7 @@ var require_glob = __commonJS({
2711
2719
  return;
2712
2720
  switch (er.code) {
2713
2721
  case "ENOTSUP":
2722
+ // https://github.com/isaacs/node-glob/issues/205
2714
2723
  case "ENOTDIR":
2715
2724
  var abs = this._makeAbs(f);
2716
2725
  this.cache[abs] = "FILE";
@@ -2723,6 +2732,7 @@ var require_glob = __commonJS({
2723
2732
  }
2724
2733
  break;
2725
2734
  case "ENOENT":
2735
+ // not terribly unusual
2726
2736
  case "ELOOP":
2727
2737
  case "ENAMETOOLONG":
2728
2738
  case "UNKNOWN":
@@ -3428,176 +3438,14 @@ var init_global = __esm({
3428
3438
  }
3429
3439
  });
3430
3440
 
3431
- // ../node_modules/.pnpm/zod@3.23.7/node_modules/zod/lib/index.mjs
3432
- function getErrorMap() {
3433
- return overrideErrorMap;
3434
- }
3435
- function addIssueToContext(ctx, issueData) {
3436
- const overrideMap = getErrorMap();
3437
- const issue = makeIssue({
3438
- issueData,
3439
- data: ctx.data,
3440
- path: ctx.path,
3441
- errorMaps: [
3442
- ctx.common.contextualErrorMap,
3443
- ctx.schemaErrorMap,
3444
- overrideMap,
3445
- overrideMap === errorMap ? void 0 : errorMap
3446
- // then global default map
3447
- ].filter((x) => !!x)
3448
- });
3449
- ctx.common.issues.push(issue);
3450
- }
3451
- function __classPrivateFieldGet(receiver, state, kind, f) {
3452
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3453
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
3454
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
3455
- }
3456
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
3457
- if (kind === "m") throw new TypeError("Private method is not writable");
3458
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
3459
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
3460
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
3461
- }
3462
- function processCreateParams(params) {
3463
- if (!params)
3464
- return {};
3465
- const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;
3466
- if (errorMap2 && (invalid_type_error || required_error)) {
3467
- throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
3468
- }
3469
- if (errorMap2)
3470
- return { errorMap: errorMap2, description };
3471
- const customMap = (iss, ctx) => {
3472
- var _a437, _b326;
3473
- const { message } = params;
3474
- if (iss.code === "invalid_enum_value") {
3475
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
3476
- }
3477
- if (typeof ctx.data === "undefined") {
3478
- return { message: (_a437 = message !== null && message !== void 0 ? message : required_error) !== null && _a437 !== void 0 ? _a437 : ctx.defaultError };
3479
- }
3480
- if (iss.code !== "invalid_type")
3481
- return { message: ctx.defaultError };
3482
- return { message: (_b326 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b326 !== void 0 ? _b326 : ctx.defaultError };
3483
- };
3484
- return { errorMap: customMap, description };
3485
- }
3486
- function timeRegexSource(args) {
3487
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
3488
- if (args.precision) {
3489
- regex = `${regex}\\.\\d{${args.precision}}`;
3490
- } else if (args.precision == null) {
3491
- regex = `${regex}(\\.\\d+)?`;
3492
- }
3493
- return regex;
3494
- }
3495
- function timeRegex(args) {
3496
- return new RegExp(`^${timeRegexSource(args)}$`);
3497
- }
3498
- function datetimeRegex(args) {
3499
- let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
3500
- const opts = [];
3501
- opts.push(args.local ? `Z?` : `Z`);
3502
- if (args.offset)
3503
- opts.push(`([+-]\\d{2}:?\\d{2})`);
3504
- regex = `${regex}(${opts.join("|")})`;
3505
- return new RegExp(`^${regex}$`);
3506
- }
3507
- function isValidIP(ip, version2) {
3508
- if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) {
3509
- return true;
3510
- }
3511
- if ((version2 === "v6" || !version2) && ipv6Regex.test(ip)) {
3512
- return true;
3513
- }
3514
- return false;
3515
- }
3516
- function floatSafeRemainder(val, step) {
3517
- const valDecCount = (val.toString().split(".")[1] || "").length;
3518
- const stepDecCount = (step.toString().split(".")[1] || "").length;
3519
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
3520
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
3521
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
3522
- return valInt % stepInt / Math.pow(10, decCount);
3523
- }
3524
- function deepPartialify(schema5) {
3525
- if (schema5 instanceof ZodObject) {
3526
- const newShape = {};
3527
- for (const key in schema5.shape) {
3528
- const fieldSchema = schema5.shape[key];
3529
- newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
3530
- }
3531
- return new ZodObject({
3532
- ...schema5._def,
3533
- shape: () => newShape
3534
- });
3535
- } else if (schema5 instanceof ZodArray) {
3536
- return new ZodArray({
3537
- ...schema5._def,
3538
- type: deepPartialify(schema5.element)
3539
- });
3540
- } else if (schema5 instanceof ZodOptional) {
3541
- return ZodOptional.create(deepPartialify(schema5.unwrap()));
3542
- } else if (schema5 instanceof ZodNullable) {
3543
- return ZodNullable.create(deepPartialify(schema5.unwrap()));
3544
- } else if (schema5 instanceof ZodTuple) {
3545
- return ZodTuple.create(schema5.items.map((item) => deepPartialify(item)));
3546
- } else {
3547
- return schema5;
3548
- }
3549
- }
3550
- function mergeValues(a, b) {
3551
- const aType = getParsedType(a);
3552
- const bType = getParsedType(b);
3553
- if (a === b) {
3554
- return { valid: true, data: a };
3555
- } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
3556
- const bKeys = util.objectKeys(b);
3557
- const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
3558
- const newObj = { ...a, ...b };
3559
- for (const key of sharedKeys) {
3560
- const sharedValue = mergeValues(a[key], b[key]);
3561
- if (!sharedValue.valid) {
3562
- return { valid: false };
3563
- }
3564
- newObj[key] = sharedValue.data;
3565
- }
3566
- return { valid: true, data: newObj };
3567
- } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
3568
- if (a.length !== b.length) {
3569
- return { valid: false };
3570
- }
3571
- const newArray = [];
3572
- for (let index6 = 0; index6 < a.length; index6++) {
3573
- const itemA = a[index6];
3574
- const itemB = b[index6];
3575
- const sharedValue = mergeValues(itemA, itemB);
3576
- if (!sharedValue.valid) {
3577
- return { valid: false };
3578
- }
3579
- newArray.push(sharedValue.data);
3580
- }
3581
- return { valid: true, data: newArray };
3582
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
3583
- return { valid: true, data: a };
3584
- } else {
3585
- return { valid: false };
3586
- }
3587
- }
3588
- function createZodEnum(values, params) {
3589
- return new ZodEnum({
3590
- values,
3591
- typeName: ZodFirstPartyTypeKind.ZodEnum,
3592
- ...processCreateParams(params)
3593
- });
3594
- }
3595
- var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
3596
- var init_lib = __esm({
3597
- "../node_modules/.pnpm/zod@3.23.7/node_modules/zod/lib/index.mjs"() {
3441
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/util.js
3442
+ var util, objectUtil, ZodParsedType, getParsedType;
3443
+ var init_util = __esm({
3444
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/util.js"() {
3598
3445
  "use strict";
3599
3446
  (function(util2) {
3600
- util2.assertEqual = (val) => val;
3447
+ util2.assertEqual = (_2) => {
3448
+ };
3601
3449
  function assertIs(_arg) {
3602
3450
  }
3603
3451
  util2.assertIs = assertIs;
@@ -3641,7 +3489,7 @@ var init_lib = __esm({
3641
3489
  }
3642
3490
  return void 0;
3643
3491
  };
3644
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
3492
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
3645
3493
  function joinValues(array2, separator = " | ") {
3646
3494
  return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
3647
3495
  }
@@ -3692,7 +3540,7 @@ var init_lib = __esm({
3692
3540
  case "string":
3693
3541
  return ZodParsedType.string;
3694
3542
  case "number":
3695
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
3543
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
3696
3544
  case "boolean":
3697
3545
  return ZodParsedType.boolean;
3698
3546
  case "function":
@@ -3725,6 +3573,15 @@ var init_lib = __esm({
3725
3573
  return ZodParsedType.unknown;
3726
3574
  }
3727
3575
  };
3576
+ }
3577
+ });
3578
+
3579
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/ZodError.js
3580
+ var ZodIssueCode, ZodError;
3581
+ var init_ZodError = __esm({
3582
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/ZodError.js"() {
3583
+ "use strict";
3584
+ init_util();
3728
3585
  ZodIssueCode = util.arrayToEnum([
3729
3586
  "invalid_type",
3730
3587
  "invalid_literal",
@@ -3744,6 +3601,9 @@ var init_lib = __esm({
3744
3601
  "not_finite"
3745
3602
  ]);
3746
3603
  ZodError = class _ZodError extends Error {
3604
+ get errors() {
3605
+ return this.issues;
3606
+ }
3747
3607
  constructor(issues) {
3748
3608
  super();
3749
3609
  this.issues = [];
@@ -3762,9 +3622,6 @@ var init_lib = __esm({
3762
3622
  this.name = "ZodError";
3763
3623
  this.issues = issues;
3764
3624
  }
3765
- get errors() {
3766
- return this.issues;
3767
- }
3768
3625
  format(_mapper) {
3769
3626
  const mapper = _mapper || function(issue) {
3770
3627
  return issue.message;
@@ -3836,6 +3693,16 @@ var init_lib = __esm({
3836
3693
  const error2 = new ZodError(issues);
3837
3694
  return error2;
3838
3695
  };
3696
+ }
3697
+ });
3698
+
3699
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/locales/en.js
3700
+ var errorMap, en_default;
3701
+ var init_en = __esm({
3702
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/locales/en.js"() {
3703
+ "use strict";
3704
+ init_ZodError();
3705
+ init_util();
3839
3706
  errorMap = (issue, _ctx) => {
3840
3707
  let message;
3841
3708
  switch (issue.code) {
@@ -3934,7 +3801,49 @@ var init_lib = __esm({
3934
3801
  }
3935
3802
  return { message };
3936
3803
  };
3937
- overrideErrorMap = errorMap;
3804
+ en_default = errorMap;
3805
+ }
3806
+ });
3807
+
3808
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/errors.js
3809
+ function getErrorMap() {
3810
+ return overrideErrorMap;
3811
+ }
3812
+ var overrideErrorMap;
3813
+ var init_errors = __esm({
3814
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/errors.js"() {
3815
+ "use strict";
3816
+ init_en();
3817
+ overrideErrorMap = en_default;
3818
+ }
3819
+ });
3820
+
3821
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
3822
+ function addIssueToContext(ctx, issueData) {
3823
+ const overrideMap = getErrorMap();
3824
+ const issue = makeIssue({
3825
+ issueData,
3826
+ data: ctx.data,
3827
+ path: ctx.path,
3828
+ errorMaps: [
3829
+ ctx.common.contextualErrorMap,
3830
+ // contextual error map is first priority
3831
+ ctx.schemaErrorMap,
3832
+ // then schema-bound map if available
3833
+ overrideMap,
3834
+ // then global override map
3835
+ overrideMap === en_default ? void 0 : en_default
3836
+ // then global default map
3837
+ ].filter((x) => !!x)
3838
+ });
3839
+ ctx.common.issues.push(issue);
3840
+ }
3841
+ var makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;
3842
+ var init_parseUtil = __esm({
3843
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/parseUtil.js"() {
3844
+ "use strict";
3845
+ init_errors();
3846
+ init_en();
3938
3847
  makeIssue = (params) => {
3939
3848
  const { data, path: path2, errorMaps, issueData } = params;
3940
3849
  const fullPath = [...path2, ...issueData.path || []];
@@ -4023,10 +3932,200 @@ var init_lib = __esm({
4023
3932
  isDirty = (x) => x.status === "dirty";
4024
3933
  isValid = (x) => x.status === "valid";
4025
3934
  isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
3935
+ }
3936
+ });
3937
+
3938
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/typeAliases.js
3939
+ var init_typeAliases = __esm({
3940
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/typeAliases.js"() {
3941
+ "use strict";
3942
+ }
3943
+ });
3944
+
3945
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
3946
+ var errorUtil;
3947
+ var init_errorUtil = __esm({
3948
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/helpers/errorUtil.js"() {
3949
+ "use strict";
4026
3950
  (function(errorUtil2) {
4027
3951
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
4028
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
3952
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
4029
3953
  })(errorUtil || (errorUtil = {}));
3954
+ }
3955
+ });
3956
+
3957
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/types.js
3958
+ function processCreateParams(params) {
3959
+ if (!params)
3960
+ return {};
3961
+ const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;
3962
+ if (errorMap2 && (invalid_type_error || required_error)) {
3963
+ throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
3964
+ }
3965
+ if (errorMap2)
3966
+ return { errorMap: errorMap2, description };
3967
+ const customMap = (iss, ctx) => {
3968
+ const { message } = params;
3969
+ if (iss.code === "invalid_enum_value") {
3970
+ return { message: message ?? ctx.defaultError };
3971
+ }
3972
+ if (typeof ctx.data === "undefined") {
3973
+ return { message: message ?? required_error ?? ctx.defaultError };
3974
+ }
3975
+ if (iss.code !== "invalid_type")
3976
+ return { message: ctx.defaultError };
3977
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
3978
+ };
3979
+ return { errorMap: customMap, description };
3980
+ }
3981
+ function timeRegexSource(args) {
3982
+ let secondsRegexSource = `[0-5]\\d`;
3983
+ if (args.precision) {
3984
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
3985
+ } else if (args.precision == null) {
3986
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
3987
+ }
3988
+ const secondsQuantifier = args.precision ? "+" : "?";
3989
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
3990
+ }
3991
+ function timeRegex(args) {
3992
+ return new RegExp(`^${timeRegexSource(args)}$`);
3993
+ }
3994
+ function datetimeRegex(args) {
3995
+ let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
3996
+ const opts = [];
3997
+ opts.push(args.local ? `Z?` : `Z`);
3998
+ if (args.offset)
3999
+ opts.push(`([+-]\\d{2}:?\\d{2})`);
4000
+ regex = `${regex}(${opts.join("|")})`;
4001
+ return new RegExp(`^${regex}$`);
4002
+ }
4003
+ function isValidIP(ip, version2) {
4004
+ if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) {
4005
+ return true;
4006
+ }
4007
+ if ((version2 === "v6" || !version2) && ipv6Regex.test(ip)) {
4008
+ return true;
4009
+ }
4010
+ return false;
4011
+ }
4012
+ function isValidJWT(jwt, alg) {
4013
+ if (!jwtRegex.test(jwt))
4014
+ return false;
4015
+ try {
4016
+ const [header] = jwt.split(".");
4017
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
4018
+ const decoded = JSON.parse(atob(base64));
4019
+ if (typeof decoded !== "object" || decoded === null)
4020
+ return false;
4021
+ if ("typ" in decoded && decoded?.typ !== "JWT")
4022
+ return false;
4023
+ if (!decoded.alg)
4024
+ return false;
4025
+ if (alg && decoded.alg !== alg)
4026
+ return false;
4027
+ return true;
4028
+ } catch {
4029
+ return false;
4030
+ }
4031
+ }
4032
+ function isValidCidr(ip, version2) {
4033
+ if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip)) {
4034
+ return true;
4035
+ }
4036
+ if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip)) {
4037
+ return true;
4038
+ }
4039
+ return false;
4040
+ }
4041
+ function floatSafeRemainder(val, step) {
4042
+ const valDecCount = (val.toString().split(".")[1] || "").length;
4043
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
4044
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
4045
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
4046
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
4047
+ return valInt % stepInt / 10 ** decCount;
4048
+ }
4049
+ function deepPartialify(schema5) {
4050
+ if (schema5 instanceof ZodObject) {
4051
+ const newShape = {};
4052
+ for (const key in schema5.shape) {
4053
+ const fieldSchema = schema5.shape[key];
4054
+ newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
4055
+ }
4056
+ return new ZodObject({
4057
+ ...schema5._def,
4058
+ shape: () => newShape
4059
+ });
4060
+ } else if (schema5 instanceof ZodArray) {
4061
+ return new ZodArray({
4062
+ ...schema5._def,
4063
+ type: deepPartialify(schema5.element)
4064
+ });
4065
+ } else if (schema5 instanceof ZodOptional) {
4066
+ return ZodOptional.create(deepPartialify(schema5.unwrap()));
4067
+ } else if (schema5 instanceof ZodNullable) {
4068
+ return ZodNullable.create(deepPartialify(schema5.unwrap()));
4069
+ } else if (schema5 instanceof ZodTuple) {
4070
+ return ZodTuple.create(schema5.items.map((item) => deepPartialify(item)));
4071
+ } else {
4072
+ return schema5;
4073
+ }
4074
+ }
4075
+ function mergeValues(a, b) {
4076
+ const aType = getParsedType(a);
4077
+ const bType = getParsedType(b);
4078
+ if (a === b) {
4079
+ return { valid: true, data: a };
4080
+ } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
4081
+ const bKeys = util.objectKeys(b);
4082
+ const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
4083
+ const newObj = { ...a, ...b };
4084
+ for (const key of sharedKeys) {
4085
+ const sharedValue = mergeValues(a[key], b[key]);
4086
+ if (!sharedValue.valid) {
4087
+ return { valid: false };
4088
+ }
4089
+ newObj[key] = sharedValue.data;
4090
+ }
4091
+ return { valid: true, data: newObj };
4092
+ } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
4093
+ if (a.length !== b.length) {
4094
+ return { valid: false };
4095
+ }
4096
+ const newArray = [];
4097
+ for (let index6 = 0; index6 < a.length; index6++) {
4098
+ const itemA = a[index6];
4099
+ const itemB = b[index6];
4100
+ const sharedValue = mergeValues(itemA, itemB);
4101
+ if (!sharedValue.valid) {
4102
+ return { valid: false };
4103
+ }
4104
+ newArray.push(sharedValue.data);
4105
+ }
4106
+ return { valid: true, data: newArray };
4107
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
4108
+ return { valid: true, data: a };
4109
+ } else {
4110
+ return { valid: false };
4111
+ }
4112
+ }
4113
+ function createZodEnum(values, params) {
4114
+ return new ZodEnum({
4115
+ values,
4116
+ typeName: ZodFirstPartyTypeKind.ZodEnum,
4117
+ ...processCreateParams(params)
4118
+ });
4119
+ }
4120
+ var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
4121
+ var init_types = __esm({
4122
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/types.js"() {
4123
+ "use strict";
4124
+ init_ZodError();
4125
+ init_errors();
4126
+ init_errorUtil();
4127
+ init_parseUtil();
4128
+ init_util();
4030
4129
  ParseInputLazyPath = class {
4031
4130
  constructor(parent, value, path2, key) {
4032
4131
  this._cachedPath = [];
@@ -4037,7 +4136,7 @@ var init_lib = __esm({
4037
4136
  }
4038
4137
  get path() {
4039
4138
  if (!this._cachedPath.length) {
4040
- if (this._key instanceof Array) {
4139
+ if (Array.isArray(this._key)) {
4041
4140
  this._cachedPath.push(...this._path, ...this._key);
4042
4141
  } else {
4043
4142
  this._cachedPath.push(...this._path, this._key);
@@ -4066,34 +4165,6 @@ var init_lib = __esm({
4066
4165
  }
4067
4166
  };
4068
4167
  ZodType = class {
4069
- constructor(def) {
4070
- this.spa = this.safeParseAsync;
4071
- this._def = def;
4072
- this.parse = this.parse.bind(this);
4073
- this.safeParse = this.safeParse.bind(this);
4074
- this.parseAsync = this.parseAsync.bind(this);
4075
- this.safeParseAsync = this.safeParseAsync.bind(this);
4076
- this.spa = this.spa.bind(this);
4077
- this.refine = this.refine.bind(this);
4078
- this.refinement = this.refinement.bind(this);
4079
- this.superRefine = this.superRefine.bind(this);
4080
- this.optional = this.optional.bind(this);
4081
- this.nullable = this.nullable.bind(this);
4082
- this.nullish = this.nullish.bind(this);
4083
- this.array = this.array.bind(this);
4084
- this.promise = this.promise.bind(this);
4085
- this.or = this.or.bind(this);
4086
- this.and = this.and.bind(this);
4087
- this.transform = this.transform.bind(this);
4088
- this.brand = this.brand.bind(this);
4089
- this.default = this.default.bind(this);
4090
- this.catch = this.catch.bind(this);
4091
- this.describe = this.describe.bind(this);
4092
- this.pipe = this.pipe.bind(this);
4093
- this.readonly = this.readonly.bind(this);
4094
- this.isNullable = this.isNullable.bind(this);
4095
- this.isOptional = this.isOptional.bind(this);
4096
- }
4097
4168
  get description() {
4098
4169
  return this._def.description;
4099
4170
  }
@@ -4141,14 +4212,13 @@ var init_lib = __esm({
4141
4212
  throw result.error;
4142
4213
  }
4143
4214
  safeParse(data, params) {
4144
- var _a437;
4145
4215
  const ctx = {
4146
4216
  common: {
4147
4217
  issues: [],
4148
- async: (_a437 = params === null || params === void 0 ? void 0 : params.async) !== null && _a437 !== void 0 ? _a437 : false,
4149
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
4218
+ async: params?.async ?? false,
4219
+ contextualErrorMap: params?.errorMap
4150
4220
  },
4151
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
4221
+ path: params?.path || [],
4152
4222
  schemaErrorMap: this._def.errorMap,
4153
4223
  parent: null,
4154
4224
  data,
@@ -4157,6 +4227,42 @@ var init_lib = __esm({
4157
4227
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
4158
4228
  return handleResult(ctx, result);
4159
4229
  }
4230
+ "~validate"(data) {
4231
+ const ctx = {
4232
+ common: {
4233
+ issues: [],
4234
+ async: !!this["~standard"].async
4235
+ },
4236
+ path: [],
4237
+ schemaErrorMap: this._def.errorMap,
4238
+ parent: null,
4239
+ data,
4240
+ parsedType: getParsedType(data)
4241
+ };
4242
+ if (!this["~standard"].async) {
4243
+ try {
4244
+ const result = this._parseSync({ data, path: [], parent: ctx });
4245
+ return isValid(result) ? {
4246
+ value: result.value
4247
+ } : {
4248
+ issues: ctx.common.issues
4249
+ };
4250
+ } catch (err) {
4251
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
4252
+ this["~standard"].async = true;
4253
+ }
4254
+ ctx.common = {
4255
+ issues: [],
4256
+ async: true
4257
+ };
4258
+ }
4259
+ }
4260
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
4261
+ value: result.value
4262
+ } : {
4263
+ issues: ctx.common.issues
4264
+ });
4265
+ }
4160
4266
  async parseAsync(data, params) {
4161
4267
  const result = await this.safeParseAsync(data, params);
4162
4268
  if (result.success)
@@ -4167,10 +4273,10 @@ var init_lib = __esm({
4167
4273
  const ctx = {
4168
4274
  common: {
4169
4275
  issues: [],
4170
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
4276
+ contextualErrorMap: params?.errorMap,
4171
4277
  async: true
4172
4278
  },
4173
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
4279
+ path: params?.path || [],
4174
4280
  schemaErrorMap: this._def.errorMap,
4175
4281
  parent: null,
4176
4282
  data,
@@ -4234,6 +4340,39 @@ var init_lib = __esm({
4234
4340
  superRefine(refinement) {
4235
4341
  return this._refinement(refinement);
4236
4342
  }
4343
+ constructor(def) {
4344
+ this.spa = this.safeParseAsync;
4345
+ this._def = def;
4346
+ this.parse = this.parse.bind(this);
4347
+ this.safeParse = this.safeParse.bind(this);
4348
+ this.parseAsync = this.parseAsync.bind(this);
4349
+ this.safeParseAsync = this.safeParseAsync.bind(this);
4350
+ this.spa = this.spa.bind(this);
4351
+ this.refine = this.refine.bind(this);
4352
+ this.refinement = this.refinement.bind(this);
4353
+ this.superRefine = this.superRefine.bind(this);
4354
+ this.optional = this.optional.bind(this);
4355
+ this.nullable = this.nullable.bind(this);
4356
+ this.nullish = this.nullish.bind(this);
4357
+ this.array = this.array.bind(this);
4358
+ this.promise = this.promise.bind(this);
4359
+ this.or = this.or.bind(this);
4360
+ this.and = this.and.bind(this);
4361
+ this.transform = this.transform.bind(this);
4362
+ this.brand = this.brand.bind(this);
4363
+ this.default = this.default.bind(this);
4364
+ this.catch = this.catch.bind(this);
4365
+ this.describe = this.describe.bind(this);
4366
+ this.pipe = this.pipe.bind(this);
4367
+ this.readonly = this.readonly.bind(this);
4368
+ this.isNullable = this.isNullable.bind(this);
4369
+ this.isOptional = this.isOptional.bind(this);
4370
+ this["~standard"] = {
4371
+ version: 1,
4372
+ vendor: "zod",
4373
+ validate: (data) => this["~validate"](data)
4374
+ };
4375
+ }
4237
4376
  optional() {
4238
4377
  return ZodOptional.create(this, this._def);
4239
4378
  }
@@ -4244,7 +4383,7 @@ var init_lib = __esm({
4244
4383
  return this.nullable().optional();
4245
4384
  }
4246
4385
  array() {
4247
- return ZodArray.create(this, this._def);
4386
+ return ZodArray.create(this);
4248
4387
  }
4249
4388
  promise() {
4250
4389
  return ZodPromise.create(this, this._def);
@@ -4310,15 +4449,19 @@ var init_lib = __esm({
4310
4449
  };
4311
4450
  cuidRegex = /^c[^\s-]{8,}$/i;
4312
4451
  cuid2Regex = /^[0-9a-z]+$/;
4313
- ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
4452
+ ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
4314
4453
  uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
4315
4454
  nanoidRegex = /^[a-z0-9_-]{21}$/i;
4455
+ jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
4316
4456
  durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
4317
4457
  emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
4318
4458
  _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
4319
4459
  ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
4320
- ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
4460
+ ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
4461
+ ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
4462
+ ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
4321
4463
  base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
4464
+ base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
4322
4465
  dateRegexSource = `((\\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])))`;
4323
4466
  dateRegex = new RegExp(`^${dateRegexSource}$`);
4324
4467
  ZodString = class _ZodString extends ZodType {
@@ -4467,7 +4610,7 @@ var init_lib = __esm({
4467
4610
  } else if (check.kind === "url") {
4468
4611
  try {
4469
4612
  new URL(input.data);
4470
- } catch (_a437) {
4613
+ } catch {
4471
4614
  ctx = this._getOrReturnCtx(input, ctx);
4472
4615
  addIssueToContext(ctx, {
4473
4616
  validation: "url",
@@ -4577,6 +4720,26 @@ var init_lib = __esm({
4577
4720
  });
4578
4721
  status.dirty();
4579
4722
  }
4723
+ } else if (check.kind === "jwt") {
4724
+ if (!isValidJWT(input.data, check.alg)) {
4725
+ ctx = this._getOrReturnCtx(input, ctx);
4726
+ addIssueToContext(ctx, {
4727
+ validation: "jwt",
4728
+ code: ZodIssueCode.invalid_string,
4729
+ message: check.message
4730
+ });
4731
+ status.dirty();
4732
+ }
4733
+ } else if (check.kind === "cidr") {
4734
+ if (!isValidCidr(input.data, check.version)) {
4735
+ ctx = this._getOrReturnCtx(input, ctx);
4736
+ addIssueToContext(ctx, {
4737
+ validation: "cidr",
4738
+ code: ZodIssueCode.invalid_string,
4739
+ message: check.message
4740
+ });
4741
+ status.dirty();
4742
+ }
4580
4743
  } else if (check.kind === "base64") {
4581
4744
  if (!base64Regex.test(input.data)) {
4582
4745
  ctx = this._getOrReturnCtx(input, ctx);
@@ -4587,6 +4750,16 @@ var init_lib = __esm({
4587
4750
  });
4588
4751
  status.dirty();
4589
4752
  }
4753
+ } else if (check.kind === "base64url") {
4754
+ if (!base64urlRegex.test(input.data)) {
4755
+ ctx = this._getOrReturnCtx(input, ctx);
4756
+ addIssueToContext(ctx, {
4757
+ validation: "base64url",
4758
+ code: ZodIssueCode.invalid_string,
4759
+ message: check.message
4760
+ });
4761
+ status.dirty();
4762
+ }
4590
4763
  } else {
4591
4764
  util.assertNever(check);
4592
4765
  }
@@ -4633,11 +4806,22 @@ var init_lib = __esm({
4633
4806
  base64(message) {
4634
4807
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
4635
4808
  }
4809
+ base64url(message) {
4810
+ return this._addCheck({
4811
+ kind: "base64url",
4812
+ ...errorUtil.errToObj(message)
4813
+ });
4814
+ }
4815
+ jwt(options) {
4816
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
4817
+ }
4636
4818
  ip(options) {
4637
4819
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
4638
4820
  }
4821
+ cidr(options) {
4822
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
4823
+ }
4639
4824
  datetime(options) {
4640
- var _a437, _b326;
4641
4825
  if (typeof options === "string") {
4642
4826
  return this._addCheck({
4643
4827
  kind: "datetime",
@@ -4649,10 +4833,10 @@ var init_lib = __esm({
4649
4833
  }
4650
4834
  return this._addCheck({
4651
4835
  kind: "datetime",
4652
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
4653
- offset: (_a437 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a437 !== void 0 ? _a437 : false,
4654
- local: (_b326 = options === null || options === void 0 ? void 0 : options.local) !== null && _b326 !== void 0 ? _b326 : false,
4655
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
4836
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
4837
+ offset: options?.offset ?? false,
4838
+ local: options?.local ?? false,
4839
+ ...errorUtil.errToObj(options?.message)
4656
4840
  });
4657
4841
  }
4658
4842
  date(message) {
@@ -4668,8 +4852,8 @@ var init_lib = __esm({
4668
4852
  }
4669
4853
  return this._addCheck({
4670
4854
  kind: "time",
4671
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
4672
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
4855
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
4856
+ ...errorUtil.errToObj(options?.message)
4673
4857
  });
4674
4858
  }
4675
4859
  duration(message) {
@@ -4686,8 +4870,8 @@ var init_lib = __esm({
4686
4870
  return this._addCheck({
4687
4871
  kind: "includes",
4688
4872
  value,
4689
- position: options === null || options === void 0 ? void 0 : options.position,
4690
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
4873
+ position: options?.position,
4874
+ ...errorUtil.errToObj(options?.message)
4691
4875
  });
4692
4876
  }
4693
4877
  startsWith(value, message) {
@@ -4726,8 +4910,7 @@ var init_lib = __esm({
4726
4910
  });
4727
4911
  }
4728
4912
  /**
4729
- * @deprecated Use z.string().min(1) instead.
4730
- * @see {@link ZodString.min}
4913
+ * Equivalent to `.min(1)`
4731
4914
  */
4732
4915
  nonempty(message) {
4733
4916
  return this.min(1, errorUtil.errToObj(message));
@@ -4789,9 +4972,15 @@ var init_lib = __esm({
4789
4972
  get isIP() {
4790
4973
  return !!this._def.checks.find((ch) => ch.kind === "ip");
4791
4974
  }
4975
+ get isCIDR() {
4976
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
4977
+ }
4792
4978
  get isBase64() {
4793
4979
  return !!this._def.checks.find((ch) => ch.kind === "base64");
4794
4980
  }
4981
+ get isBase64url() {
4982
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
4983
+ }
4795
4984
  get minLength() {
4796
4985
  let min2 = null;
4797
4986
  for (const ch of this._def.checks) {
@@ -4814,11 +5003,10 @@ var init_lib = __esm({
4814
5003
  }
4815
5004
  };
4816
5005
  ZodString.create = (params) => {
4817
- var _a437;
4818
5006
  return new ZodString({
4819
5007
  checks: [],
4820
5008
  typeName: ZodFirstPartyTypeKind.ZodString,
4821
- coerce: (_a437 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a437 !== void 0 ? _a437 : false,
5009
+ coerce: params?.coerce ?? false,
4822
5010
  ...processCreateParams(params)
4823
5011
  });
4824
5012
  };
@@ -5030,7 +5218,8 @@ var init_lib = __esm({
5030
5218
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
5031
5219
  }
5032
5220
  get isFinite() {
5033
- let max2 = null, min2 = null;
5221
+ let max2 = null;
5222
+ let min2 = null;
5034
5223
  for (const ch of this._def.checks) {
5035
5224
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
5036
5225
  return true;
@@ -5049,7 +5238,7 @@ var init_lib = __esm({
5049
5238
  return new ZodNumber({
5050
5239
  checks: [],
5051
5240
  typeName: ZodFirstPartyTypeKind.ZodNumber,
5052
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
5241
+ coerce: params?.coerce || false,
5053
5242
  ...processCreateParams(params)
5054
5243
  });
5055
5244
  };
@@ -5061,17 +5250,15 @@ var init_lib = __esm({
5061
5250
  }
5062
5251
  _parse(input) {
5063
5252
  if (this._def.coerce) {
5064
- input.data = BigInt(input.data);
5253
+ try {
5254
+ input.data = BigInt(input.data);
5255
+ } catch {
5256
+ return this._getInvalidInput(input);
5257
+ }
5065
5258
  }
5066
5259
  const parsedType = this._getType(input);
5067
5260
  if (parsedType !== ZodParsedType.bigint) {
5068
- const ctx2 = this._getOrReturnCtx(input);
5069
- addIssueToContext(ctx2, {
5070
- code: ZodIssueCode.invalid_type,
5071
- expected: ZodParsedType.bigint,
5072
- received: ctx2.parsedType
5073
- });
5074
- return INVALID;
5261
+ return this._getInvalidInput(input);
5075
5262
  }
5076
5263
  let ctx = void 0;
5077
5264
  const status = new ParseStatus();
@@ -5118,6 +5305,15 @@ var init_lib = __esm({
5118
5305
  }
5119
5306
  return { status: status.value, value: input.data };
5120
5307
  }
5308
+ _getInvalidInput(input) {
5309
+ const ctx = this._getOrReturnCtx(input);
5310
+ addIssueToContext(ctx, {
5311
+ code: ZodIssueCode.invalid_type,
5312
+ expected: ZodParsedType.bigint,
5313
+ received: ctx.parsedType
5314
+ });
5315
+ return INVALID;
5316
+ }
5121
5317
  gte(value, message) {
5122
5318
  return this.setLimit("min", value, true, errorUtil.toString(message));
5123
5319
  }
@@ -5211,11 +5407,10 @@ var init_lib = __esm({
5211
5407
  }
5212
5408
  };
5213
5409
  ZodBigInt.create = (params) => {
5214
- var _a437;
5215
5410
  return new ZodBigInt({
5216
5411
  checks: [],
5217
5412
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
5218
- coerce: (_a437 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a437 !== void 0 ? _a437 : false,
5413
+ coerce: params?.coerce ?? false,
5219
5414
  ...processCreateParams(params)
5220
5415
  });
5221
5416
  };
@@ -5240,7 +5435,7 @@ var init_lib = __esm({
5240
5435
  ZodBoolean.create = (params) => {
5241
5436
  return new ZodBoolean({
5242
5437
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
5243
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
5438
+ coerce: params?.coerce || false,
5244
5439
  ...processCreateParams(params)
5245
5440
  });
5246
5441
  };
@@ -5259,7 +5454,7 @@ var init_lib = __esm({
5259
5454
  });
5260
5455
  return INVALID;
5261
5456
  }
5262
- if (isNaN(input.data.getTime())) {
5457
+ if (Number.isNaN(input.data.getTime())) {
5263
5458
  const ctx2 = this._getOrReturnCtx(input);
5264
5459
  addIssueToContext(ctx2, {
5265
5460
  code: ZodIssueCode.invalid_date
@@ -5348,7 +5543,7 @@ var init_lib = __esm({
5348
5543
  ZodDate.create = (params) => {
5349
5544
  return new ZodDate({
5350
5545
  checks: [],
5351
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
5546
+ coerce: params?.coerce || false,
5352
5547
  typeName: ZodFirstPartyTypeKind.ZodDate,
5353
5548
  ...processCreateParams(params)
5354
5549
  });
@@ -5597,7 +5792,8 @@ var init_lib = __esm({
5597
5792
  return this._cached;
5598
5793
  const shape = this._def.shape();
5599
5794
  const keys = util.objectKeys(shape);
5600
- return this._cached = { shape, keys };
5795
+ this._cached = { shape, keys };
5796
+ return this._cached;
5601
5797
  }
5602
5798
  _parse(input) {
5603
5799
  const parsedType = this._getType(input);
@@ -5647,8 +5843,8 @@ var init_lib = __esm({
5647
5843
  });
5648
5844
  status.dirty();
5649
5845
  }
5650
- } else if (unknownKeys === "strip") ;
5651
- else {
5846
+ } else if (unknownKeys === "strip") {
5847
+ } else {
5652
5848
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
5653
5849
  }
5654
5850
  } else {
@@ -5695,11 +5891,10 @@ var init_lib = __esm({
5695
5891
  unknownKeys: "strict",
5696
5892
  ...message !== void 0 ? {
5697
5893
  errorMap: (issue, ctx) => {
5698
- var _a437, _b326, _c14, _d6;
5699
- const defaultError = (_c14 = (_b326 = (_a437 = this._def).errorMap) === null || _b326 === void 0 ? void 0 : _b326.call(_a437, issue, ctx).message) !== null && _c14 !== void 0 ? _c14 : ctx.defaultError;
5894
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
5700
5895
  if (issue.code === "unrecognized_keys")
5701
5896
  return {
5702
- message: (_d6 = errorUtil.errToObj(message).message) !== null && _d6 !== void 0 ? _d6 : defaultError
5897
+ message: errorUtil.errToObj(message).message ?? defaultError
5703
5898
  };
5704
5899
  return {
5705
5900
  message: defaultError
@@ -5830,11 +6025,11 @@ var init_lib = __esm({
5830
6025
  }
5831
6026
  pick(mask) {
5832
6027
  const shape = {};
5833
- util.objectKeys(mask).forEach((key) => {
6028
+ for (const key of util.objectKeys(mask)) {
5834
6029
  if (mask[key] && this.shape[key]) {
5835
6030
  shape[key] = this.shape[key];
5836
6031
  }
5837
- });
6032
+ }
5838
6033
  return new _ZodObject({
5839
6034
  ...this._def,
5840
6035
  shape: () => shape
@@ -5842,11 +6037,11 @@ var init_lib = __esm({
5842
6037
  }
5843
6038
  omit(mask) {
5844
6039
  const shape = {};
5845
- util.objectKeys(this.shape).forEach((key) => {
6040
+ for (const key of util.objectKeys(this.shape)) {
5846
6041
  if (!mask[key]) {
5847
6042
  shape[key] = this.shape[key];
5848
6043
  }
5849
- });
6044
+ }
5850
6045
  return new _ZodObject({
5851
6046
  ...this._def,
5852
6047
  shape: () => shape
@@ -5860,14 +6055,14 @@ var init_lib = __esm({
5860
6055
  }
5861
6056
  partial(mask) {
5862
6057
  const newShape = {};
5863
- util.objectKeys(this.shape).forEach((key) => {
6058
+ for (const key of util.objectKeys(this.shape)) {
5864
6059
  const fieldSchema = this.shape[key];
5865
6060
  if (mask && !mask[key]) {
5866
6061
  newShape[key] = fieldSchema;
5867
6062
  } else {
5868
6063
  newShape[key] = fieldSchema.optional();
5869
6064
  }
5870
- });
6065
+ }
5871
6066
  return new _ZodObject({
5872
6067
  ...this._def,
5873
6068
  shape: () => newShape
@@ -5875,7 +6070,7 @@ var init_lib = __esm({
5875
6070
  }
5876
6071
  required(mask) {
5877
6072
  const newShape = {};
5878
- util.objectKeys(this.shape).forEach((key) => {
6073
+ for (const key of util.objectKeys(this.shape)) {
5879
6074
  if (mask && !mask[key]) {
5880
6075
  newShape[key] = this.shape[key];
5881
6076
  } else {
@@ -5886,7 +6081,7 @@ var init_lib = __esm({
5886
6081
  }
5887
6082
  newShape[key] = newField;
5888
6083
  }
5889
- });
6084
+ }
5890
6085
  return new _ZodObject({
5891
6086
  ...this._def,
5892
6087
  shape: () => newShape
@@ -6464,12 +6659,7 @@ var init_lib = __esm({
6464
6659
  return makeIssue({
6465
6660
  data: args,
6466
6661
  path: ctx.path,
6467
- errorMaps: [
6468
- ctx.common.contextualErrorMap,
6469
- ctx.schemaErrorMap,
6470
- getErrorMap(),
6471
- errorMap
6472
- ].filter((x) => !!x),
6662
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
6473
6663
  issueData: {
6474
6664
  code: ZodIssueCode.invalid_arguments,
6475
6665
  argumentsError: error2
@@ -6480,12 +6670,7 @@ var init_lib = __esm({
6480
6670
  return makeIssue({
6481
6671
  data: returns,
6482
6672
  path: ctx.path,
6483
- errorMaps: [
6484
- ctx.common.contextualErrorMap,
6485
- ctx.schemaErrorMap,
6486
- getErrorMap(),
6487
- errorMap
6488
- ].filter((x) => !!x),
6673
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
6489
6674
  issueData: {
6490
6675
  code: ZodIssueCode.invalid_return_type,
6491
6676
  returnTypeError: error2
@@ -6602,10 +6787,6 @@ var init_lib = __esm({
6602
6787
  });
6603
6788
  };
6604
6789
  ZodEnum = class _ZodEnum extends ZodType {
6605
- constructor() {
6606
- super(...arguments);
6607
- _ZodEnum_cache.set(this, void 0);
6608
- }
6609
6790
  _parse(input) {
6610
6791
  if (typeof input.data !== "string") {
6611
6792
  const ctx = this._getOrReturnCtx(input);
@@ -6617,10 +6798,10 @@ var init_lib = __esm({
6617
6798
  });
6618
6799
  return INVALID;
6619
6800
  }
6620
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
6621
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
6801
+ if (!this._cache) {
6802
+ this._cache = new Set(this._def.values);
6622
6803
  }
6623
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
6804
+ if (!this._cache.has(input.data)) {
6624
6805
  const ctx = this._getOrReturnCtx(input);
6625
6806
  const expectedValues = this._def.values;
6626
6807
  addIssueToContext(ctx, {
@@ -6669,13 +6850,8 @@ var init_lib = __esm({
6669
6850
  });
6670
6851
  }
6671
6852
  };
6672
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
6673
6853
  ZodEnum.create = createZodEnum;
6674
6854
  ZodNativeEnum = class extends ZodType {
6675
- constructor() {
6676
- super(...arguments);
6677
- _ZodNativeEnum_cache.set(this, void 0);
6678
- }
6679
6855
  _parse(input) {
6680
6856
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
6681
6857
  const ctx = this._getOrReturnCtx(input);
@@ -6688,10 +6864,10 @@ var init_lib = __esm({
6688
6864
  });
6689
6865
  return INVALID;
6690
6866
  }
6691
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
6692
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
6867
+ if (!this._cache) {
6868
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
6693
6869
  }
6694
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
6870
+ if (!this._cache.has(input.data)) {
6695
6871
  const expectedValues = util.objectValues(nativeEnumValues);
6696
6872
  addIssueToContext(ctx, {
6697
6873
  received: ctx.data,
@@ -6706,7 +6882,6 @@ var init_lib = __esm({
6706
6882
  return this._def.values;
6707
6883
  }
6708
6884
  };
6709
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
6710
6885
  ZodNativeEnum.create = (values, params) => {
6711
6886
  return new ZodNativeEnum({
6712
6887
  values,
@@ -6847,7 +7022,7 @@ var init_lib = __esm({
6847
7022
  parent: ctx
6848
7023
  });
6849
7024
  if (!isValid(base))
6850
- return base;
7025
+ return INVALID;
6851
7026
  const result = effect.transform(base.value, checkCtx);
6852
7027
  if (result instanceof Promise) {
6853
7028
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -6856,8 +7031,11 @@ var init_lib = __esm({
6856
7031
  } else {
6857
7032
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
6858
7033
  if (!isValid(base))
6859
- return base;
6860
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
7034
+ return INVALID;
7035
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
7036
+ status: status.value,
7037
+ value: result
7038
+ }));
6861
7039
  });
6862
7040
  }
6863
7041
  }
@@ -7197,13 +7375,44 @@ var init_lib = __esm({
7197
7375
  }
7198
7376
  });
7199
7377
 
7378
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/external.js
7379
+ var init_external = __esm({
7380
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/external.js"() {
7381
+ "use strict";
7382
+ init_errors();
7383
+ init_parseUtil();
7384
+ init_typeAliases();
7385
+ init_util();
7386
+ init_types();
7387
+ init_ZodError();
7388
+ }
7389
+ });
7390
+
7391
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/index.js
7392
+ var init_v3 = __esm({
7393
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/v3/index.js"() {
7394
+ "use strict";
7395
+ init_external();
7396
+ init_external();
7397
+ }
7398
+ });
7399
+
7400
+ // ../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/index.js
7401
+ var init_esm = __esm({
7402
+ "../node_modules/.pnpm/zod@3.25.42/node_modules/zod/dist/esm/index.js"() {
7403
+ "use strict";
7404
+ init_v3();
7405
+ init_v3();
7406
+ }
7407
+ });
7408
+
7200
7409
  // src/serializer/gelSchema.ts
7201
7410
  var enumSchema, enumSchemaV1, indexColumn, index, fk, sequenceSchema, roleSchema, sequenceSquashed, column, checkConstraint, columnSquashed, compositePK, uniqueConstraint, policy, policySquashed, viewWithOption, matViewWithOption, mergedViewWithOption, view, table, schemaHash, kitInternals, gelSchemaExternal, gelSchemaInternal, tableSquashed, gelSchemaSquashed, gelSchema, dryGel;
7202
7411
  var init_gelSchema = __esm({
7203
7412
  "src/serializer/gelSchema.ts"() {
7204
7413
  "use strict";
7205
7414
  init_global();
7206
- init_lib();
7415
+ init_esm();
7207
7416
  enumSchema = objectType({
7208
7417
  name: stringType(),
7209
7418
  schema: stringType(),
@@ -7467,7 +7676,7 @@ var index2, fk2, column2, tableV3, compositePK2, uniqueConstraint2, checkConstra
7467
7676
  var init_mysqlSchema = __esm({
7468
7677
  "src/serializer/mysqlSchema.ts"() {
7469
7678
  "use strict";
7470
- init_lib();
7679
+ init_esm();
7471
7680
  init_global();
7472
7681
  index2 = objectType({
7473
7682
  name: stringType(),
@@ -7796,7 +8005,7 @@ var init_pgSchema = __esm({
7796
8005
  "src/serializer/pgSchema.ts"() {
7797
8006
  "use strict";
7798
8007
  init_global();
7799
- init_lib();
8008
+ init_esm();
7800
8009
  indexV2 = objectType({
7801
8010
  name: stringType(),
7802
8011
  columns: recordType(
@@ -8546,7 +8755,7 @@ var index4, column4, compositePK4, uniqueConstraint4, table4, viewMeta2, kitInte
8546
8755
  var init_singlestoreSchema = __esm({
8547
8756
  "src/serializer/singlestoreSchema.ts"() {
8548
8757
  "use strict";
8549
- init_lib();
8758
+ init_esm();
8550
8759
  init_global();
8551
8760
  index4 = objectType({
8552
8761
  name: stringType(),
@@ -8743,7 +8952,7 @@ var index5, fk4, compositePK5, column5, tableV33, uniqueConstraint5, checkConstr
8743
8952
  var init_sqliteSchema = __esm({
8744
8953
  "src/serializer/sqliteSchema.ts"() {
8745
8954
  "use strict";
8746
- init_lib();
8955
+ init_esm();
8747
8956
  init_global();
8748
8957
  index5 = objectType({
8749
8958
  name: stringType(),
@@ -17244,7 +17453,7 @@ var makeChanged, makeSelfOrChanged, makePatched, makeSelfOrPatched, columnSchema
17244
17453
  var init_snapshotsDiffer = __esm({
17245
17454
  "src/snapshotsDiffer.ts"() {
17246
17455
  "use strict";
17247
- init_lib();
17456
+ init_esm();
17248
17457
  init_jsonDiffer();
17249
17458
  init_sqlgenerator();
17250
17459
  init_jsonStatements();
@@ -20156,7 +20365,7 @@ var dialects, dialect4, commonSquashedSchema, commonSchema;
20156
20365
  var init_schemaValidator = __esm({
20157
20366
  "src/schemaValidator.ts"() {
20158
20367
  "use strict";
20159
- init_lib();
20368
+ init_esm();
20160
20369
  init_mysqlSchema();
20161
20370
  init_pgSchema();
20162
20371
  init_singlestoreSchema();
@@ -20178,7 +20387,7 @@ var sqliteDriversLiterals, postgresqlDriversLiterals, prefixes, prefix, casingTy
20178
20387
  var init_common = __esm({
20179
20388
  "src/cli/validations/common.ts"() {
20180
20389
  "use strict";
20181
- init_lib();
20390
+ init_esm();
20182
20391
  init_schemaValidator();
20183
20392
  init_outputs();
20184
20393
  sqliteDriversLiterals = [
@@ -21491,13 +21700,18 @@ var init_mjs = __esm({
21491
21700
  continue;
21492
21701
  }
21493
21702
  switch (c) {
21703
+ // Should already be path-split by now.
21704
+ /* c8 ignore start */
21494
21705
  case "/": {
21495
21706
  return false;
21496
21707
  }
21708
+ /* c8 ignore stop */
21497
21709
  case "\\":
21498
21710
  clearStateChar();
21499
21711
  escaping = true;
21500
21712
  continue;
21713
+ // the various stateChar values
21714
+ // for the "extglob" stuff.
21501
21715
  case "?":
21502
21716
  case "*":
21503
21717
  case "+":
@@ -21563,6 +21777,7 @@ var init_mjs = __esm({
21563
21777
  }
21564
21778
  continue;
21565
21779
  }
21780
+ // these are mostly the same in regexp and glob
21566
21781
  case "[":
21567
21782
  clearStateChar();
21568
21783
  const [src, needUflag, consumed, magic] = parseClass(pattern, i);
@@ -21950,8 +22165,7 @@ var init_column_builder = __esm({
21950
22165
  }
21951
22166
  /** @internal Sets the name of the column to the key within the table definition if a name was not given. */
21952
22167
  setName(name2) {
21953
- if (this.config.name !== "")
21954
- return;
22168
+ if (this.config.name !== "") return;
21955
22169
  this.config.name = name2;
21956
22170
  }
21957
22171
  };
@@ -22383,8 +22597,7 @@ var init_common2 = __esm({
22383
22597
  const a = value.map(
22384
22598
  (v) => v === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
22385
22599
  );
22386
- if (isNestedArray)
22387
- return a;
22600
+ if (isNestedArray) return a;
22388
22601
  return makePgArray(a);
22389
22602
  }
22390
22603
  };
@@ -22517,7 +22730,7 @@ var version;
22517
22730
  var init_version = __esm({
22518
22731
  "../drizzle-orm/dist/version.js"() {
22519
22732
  "use strict";
22520
- version = "0.43.1";
22733
+ version = "0.44.2";
22521
22734
  }
22522
22735
  });
22523
22736
 
@@ -23193,7 +23406,7 @@ var init_alias = __esm({
23193
23406
 
23194
23407
  // ../drizzle-orm/dist/errors.js
23195
23408
  var _a31, _b13, DrizzleError, _a32, _b14, TransactionRollbackError;
23196
- var init_errors = __esm({
23409
+ var init_errors2 = __esm({
23197
23410
  "../drizzle-orm/dist/errors.js"() {
23198
23411
  "use strict";
23199
23412
  init_entity();
@@ -23387,8 +23600,7 @@ function mapUpdateSet(table6, values) {
23387
23600
  function applyMixins(baseClass, extendedClasses) {
23388
23601
  for (const extendedClass of extendedClasses) {
23389
23602
  for (const name2 of Object.getOwnPropertyNames(extendedClass.prototype)) {
23390
- if (name2 === "constructor")
23391
- continue;
23603
+ if (name2 === "constructor") continue;
23392
23604
  Object.defineProperty(
23393
23605
  baseClass.prototype,
23394
23606
  name2,
@@ -23403,15 +23615,6 @@ function getTableColumns(table6) {
23403
23615
  function getViewSelectedFields(view5) {
23404
23616
  return view5[ViewBaseConfig].selectedFields;
23405
23617
  }
23406
- async function hashQuery(sql2, params) {
23407
- const dataToHash = `${sql2}-${JSON.stringify(params)}`;
23408
- const encoder = new TextEncoder();
23409
- const data = encoder.encode(dataToHash);
23410
- const hashBuffer = await crypto.subtle.digest("SHA-256", data);
23411
- const hashArray = [...new Uint8Array(hashBuffer)];
23412
- const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
23413
- return hashHex;
23414
- }
23415
23618
  function getTableLikeName(table6) {
23416
23619
  return is(table6, Subquery) ? table6._.alias : is(table6, View3) ? table6[ViewBaseConfig].name : is(table6, SQL) ? void 0 : table6[Table2.Symbol.IsAlias] ? table6[Table2.Symbol.Name] : table6[Table2.Symbol.BaseName];
23417
23620
  }
@@ -23422,54 +23625,43 @@ function getColumnNameAndConfig(a, b) {
23422
23625
  };
23423
23626
  }
23424
23627
  function isConfig(data) {
23425
- if (typeof data !== "object" || data === null)
23426
- return false;
23427
- if (data.constructor.name !== "Object")
23428
- return false;
23628
+ if (typeof data !== "object" || data === null) return false;
23629
+ if (data.constructor.name !== "Object") return false;
23429
23630
  if ("logger" in data) {
23430
23631
  const type = typeof data["logger"];
23431
- if (type !== "boolean" && (type !== "object" || typeof data["logger"]["logQuery"] !== "function") && type !== "undefined")
23432
- return false;
23632
+ if (type !== "boolean" && (type !== "object" || typeof data["logger"]["logQuery"] !== "function") && type !== "undefined") return false;
23433
23633
  return true;
23434
23634
  }
23435
23635
  if ("schema" in data) {
23436
23636
  const type = typeof data["schema"];
23437
- if (type !== "object" && type !== "undefined")
23438
- return false;
23637
+ if (type !== "object" && type !== "undefined") return false;
23439
23638
  return true;
23440
23639
  }
23441
23640
  if ("casing" in data) {
23442
23641
  const type = typeof data["casing"];
23443
- if (type !== "string" && type !== "undefined")
23444
- return false;
23642
+ if (type !== "string" && type !== "undefined") return false;
23445
23643
  return true;
23446
23644
  }
23447
23645
  if ("mode" in data) {
23448
- if (data["mode"] !== "default" || data["mode"] !== "planetscale" || data["mode"] !== void 0)
23449
- return false;
23646
+ if (data["mode"] !== "default" || data["mode"] !== "planetscale" || data["mode"] !== void 0) return false;
23450
23647
  return true;
23451
23648
  }
23452
23649
  if ("connection" in data) {
23453
23650
  const type = typeof data["connection"];
23454
- if (type !== "string" && type !== "object" && type !== "undefined")
23455
- return false;
23651
+ if (type !== "string" && type !== "object" && type !== "undefined") return false;
23456
23652
  return true;
23457
23653
  }
23458
23654
  if ("client" in data) {
23459
23655
  const type = typeof data["client"];
23460
- if (type !== "object" && type !== "function" && type !== "undefined")
23461
- return false;
23656
+ if (type !== "object" && type !== "function" && type !== "undefined") return false;
23462
23657
  return true;
23463
23658
  }
23464
- if (Object.keys(data).length === 0)
23465
- return true;
23659
+ if (Object.keys(data).length === 0) return true;
23466
23660
  return false;
23467
23661
  }
23468
- var crypto;
23469
23662
  var init_utils2 = __esm({
23470
23663
  "../drizzle-orm/dist/utils.js"() {
23471
23664
  "use strict";
23472
- crypto = __toESM(require("crypto"), 1);
23473
23665
  init_column();
23474
23666
  init_entity();
23475
23667
  init_sql();
@@ -24282,8 +24474,7 @@ var init_numeric = __esm({
24282
24474
  this.scale = config.scale;
24283
24475
  }
24284
24476
  mapFromDriverValue(value) {
24285
- if (typeof value === "string")
24286
- return value;
24477
+ if (typeof value === "string") return value;
24287
24478
  return String(value);
24288
24479
  }
24289
24480
  getSQLType() {
@@ -24322,8 +24513,7 @@ var init_numeric = __esm({
24322
24513
  this.scale = config.scale;
24323
24514
  }
24324
24515
  mapFromDriverValue(value) {
24325
- if (typeof value === "number")
24326
- return value;
24516
+ if (typeof value === "number") return value;
24327
24517
  return Number(value);
24328
24518
  }
24329
24519
  getSQLType() {
@@ -25937,7 +26127,6 @@ __export(dist_exports, {
25937
26127
  gte: () => gte,
25938
26128
  hammingDistance: () => hammingDistance,
25939
26129
  hasOwnEntityKind: () => hasOwnEntityKind,
25940
- hashQuery: () => hashQuery,
25941
26130
  haveSameKeys: () => haveSameKeys,
25942
26131
  ilike: () => ilike,
25943
26132
  inArray: () => inArray,
@@ -25991,7 +26180,7 @@ var init_dist = __esm({
25991
26180
  init_column_builder();
25992
26181
  init_column();
25993
26182
  init_entity();
25994
- init_errors();
26183
+ init_errors2();
25995
26184
  init_logger();
25996
26185
  init_operations();
25997
26186
  init_query_promise();
@@ -26360,8 +26549,7 @@ var init_casing = __esm({
26360
26549
  this.convert = casing2 === "snake_case" ? toSnakeCase : casing2 === "camelCase" ? toCamelCase : noopCase;
26361
26550
  }
26362
26551
  getColumnCasing(column6) {
26363
- if (!column6.keyAsName)
26364
- return column6.name;
26552
+ if (!column6.keyAsName) return column6.name;
26365
26553
  const schema5 = column6.table[Table2.Symbol.Schema] ?? "public";
26366
26554
  const tableName = column6.table[Table2.Symbol.OriginalName];
26367
26555
  const key = `${schema5}.${tableName}.${column6.name}`;
@@ -26413,7 +26601,7 @@ var init_dialect = __esm({
26413
26601
  init_casing();
26414
26602
  init_column();
26415
26603
  init_entity();
26416
- init_errors();
26604
+ init_errors2();
26417
26605
  init_columns();
26418
26606
  init_table2();
26419
26607
  init_relations();
@@ -26470,8 +26658,7 @@ var init_dialect = __esm({
26470
26658
  return `'${str.replace(/'/g, "''")}'`;
26471
26659
  }
26472
26660
  buildWithCTE(queries) {
26473
- if (!queries?.length)
26474
- return void 0;
26661
+ if (!queries?.length) return void 0;
26475
26662
  const withSqlChunks = [sql`with `];
26476
26663
  for (const [i, w] of queries.entries()) {
26477
26664
  withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);
@@ -28021,8 +28208,7 @@ var init_select2 = __esm({
28021
28208
  };
28022
28209
  this.tableName = getTableLikeName(table6);
28023
28210
  this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
28024
- for (const item of extractUsedTable(table6))
28025
- this.usedTables.add(item);
28211
+ for (const item of extractUsedTable(table6)) this.usedTables.add(item);
28026
28212
  }
28027
28213
  /** @internal */
28028
28214
  getUsedTables() {
@@ -28032,8 +28218,7 @@ var init_select2 = __esm({
28032
28218
  return (table6, on) => {
28033
28219
  const baseTableName = this.tableName;
28034
28220
  const tableName = getTableLikeName(table6);
28035
- for (const item of extractUsedTable(table6))
28036
- this.usedTables.add(item);
28221
+ for (const item of extractUsedTable(table6)) this.usedTables.add(item);
28037
28222
  if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) {
28038
28223
  throw new Error(`Alias "${tableName}" is already used in this query`);
28039
28224
  }
@@ -28294,8 +28479,7 @@ var init_select2 = __esm({
28294
28479
  const usedTables = [];
28295
28480
  usedTables.push(...extractUsedTable(this.config.table));
28296
28481
  if (this.config.joins) {
28297
- for (const it of this.config.joins)
28298
- usedTables.push(...extractUsedTable(it.table));
28482
+ for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table));
28299
28483
  }
28300
28484
  return new Proxy(
28301
28485
  new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),
@@ -30077,6 +30261,15 @@ var init_schema = __esm({
30077
30261
  });
30078
30262
 
30079
30263
  // ../drizzle-orm/dist/cache/core/cache.js
30264
+ async function hashQuery(sql2, params) {
30265
+ const dataToHash = `${sql2}-${JSON.stringify(params)}`;
30266
+ const encoder = new TextEncoder();
30267
+ const data = encoder.encode(dataToHash);
30268
+ const hashBuffer = await crypto.subtle.digest("SHA-256", data);
30269
+ const hashArray = [...new Uint8Array(hashBuffer)];
30270
+ const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
30271
+ return hashHex;
30272
+ }
30080
30273
  var _a165, Cache, _a166, _b119, NoopCache;
30081
30274
  var init_cache = __esm({
30082
30275
  "../drizzle-orm/dist/cache/core/cache.js"() {
@@ -30104,7 +30297,7 @@ var init_cache = __esm({
30104
30297
 
30105
30298
  // ../drizzle-orm/dist/errors/index.js
30106
30299
  var DrizzleQueryError;
30107
- var init_errors2 = __esm({
30300
+ var init_errors3 = __esm({
30108
30301
  "../drizzle-orm/dist/errors/index.js"() {
30109
30302
  "use strict";
30110
30303
  DrizzleQueryError = class _DrizzleQueryError extends Error {
@@ -30115,8 +30308,7 @@ params: ${params}`);
30115
30308
  this.params = params;
30116
30309
  this.cause = cause;
30117
30310
  Error.captureStackTrace(this, _DrizzleQueryError);
30118
- if (cause)
30119
- this.cause = cause;
30311
+ if (cause) this.cause = cause;
30120
30312
  }
30121
30313
  };
30122
30314
  }
@@ -30129,11 +30321,10 @@ var init_session = __esm({
30129
30321
  "use strict";
30130
30322
  init_cache();
30131
30323
  init_entity();
30132
- init_errors();
30133
30324
  init_errors2();
30325
+ init_errors3();
30134
30326
  init_sql2();
30135
30327
  init_tracing();
30136
- init_utils2();
30137
30328
  init_db();
30138
30329
  _a167 = entityKind;
30139
30330
  PgPreparedQuery = class {
@@ -32564,8 +32755,7 @@ var init_numeric2 = __esm({
32564
32755
  __publicField(SQLiteNumericBuilder, _a195, "SQLiteNumericBuilder");
32565
32756
  SQLiteNumeric = class extends (_b140 = SQLiteColumn, _a196 = entityKind, _b140) {
32566
32757
  mapFromDriverValue(value) {
32567
- if (typeof value === "string")
32568
- return value;
32758
+ if (typeof value === "string") return value;
32569
32759
  return String(value);
32570
32760
  }
32571
32761
  getSQLType() {
@@ -32592,8 +32782,7 @@ var init_numeric2 = __esm({
32592
32782
  __publicField(this, "mapToDriverValue", String);
32593
32783
  }
32594
32784
  mapFromDriverValue(value) {
32595
- if (typeof value === "number")
32596
- return value;
32785
+ if (typeof value === "number") return value;
32597
32786
  return Number(value);
32598
32787
  }
32599
32788
  getSQLType() {
@@ -33128,7 +33317,7 @@ var init_dialect2 = __esm({
33128
33317
  init_casing();
33129
33318
  init_column();
33130
33319
  init_entity();
33131
- init_errors();
33320
+ init_errors2();
33132
33321
  init_relations();
33133
33322
  init_sql2();
33134
33323
  init_sql();
@@ -33156,8 +33345,7 @@ var init_dialect2 = __esm({
33156
33345
  return `'${str.replace(/'/g, "''")}'`;
33157
33346
  }
33158
33347
  buildWithCTE(queries) {
33159
- if (!queries?.length)
33160
- return void 0;
33348
+ if (!queries?.length) return void 0;
33161
33349
  const withSqlChunks = [sql`with `];
33162
33350
  for (const [i, w] of queries.entries()) {
33163
33351
  withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);
@@ -34108,8 +34296,7 @@ var init_select3 = __esm({
34108
34296
  };
34109
34297
  this.tableName = getTableLikeName(table6);
34110
34298
  this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
34111
- for (const item of extractUsedTable2(table6))
34112
- this.usedTables.add(item);
34299
+ for (const item of extractUsedTable2(table6)) this.usedTables.add(item);
34113
34300
  }
34114
34301
  /** @internal */
34115
34302
  getUsedTables() {
@@ -34119,8 +34306,7 @@ var init_select3 = __esm({
34119
34306
  return (table6, on) => {
34120
34307
  const baseTableName = this.tableName;
34121
34308
  const tableName = getTableLikeName(table6);
34122
- for (const item of extractUsedTable2(table6))
34123
- this.usedTables.add(item);
34309
+ for (const item of extractUsedTable2(table6)) this.usedTables.add(item);
34124
34310
  if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) {
34125
34311
  throw new Error(`Alias "${tableName}" is already used in this query`);
34126
34312
  }
@@ -34367,8 +34553,7 @@ var init_select3 = __esm({
34367
34553
  const usedTables = [];
34368
34554
  usedTables.push(...extractUsedTable2(this.config.table));
34369
34555
  if (this.config.joins) {
34370
- for (const it of this.config.joins)
34371
- usedTables.push(...extractUsedTable2(it.table));
34556
+ for (const it of this.config.joins) usedTables.push(...extractUsedTable2(it.table));
34372
34557
  }
34373
34558
  return new Proxy(
34374
34559
  new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),
@@ -34626,8 +34811,7 @@ var init_insert2 = __esm({
34626
34811
  * ```
34627
34812
  */
34628
34813
  onConflictDoNothing(config = {}) {
34629
- if (!this.config.onConflict)
34630
- this.config.onConflict = [];
34814
+ if (!this.config.onConflict) this.config.onConflict = [];
34631
34815
  if (config.target === void 0) {
34632
34816
  this.config.onConflict.push(sql` on conflict do nothing`);
34633
34817
  } else {
@@ -34672,8 +34856,7 @@ var init_insert2 = __esm({
34672
34856
  'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.'
34673
34857
  );
34674
34858
  }
34675
- if (!this.config.onConflict)
34676
- this.config.onConflict = [];
34859
+ if (!this.config.onConflict) this.config.onConflict = [];
34677
34860
  const whereSql = config.where ? sql` where ${config.where}` : void 0;
34678
34861
  const targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : void 0;
34679
34862
  const setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : void 0;
@@ -35479,10 +35662,9 @@ var init_session2 = __esm({
35479
35662
  "use strict";
35480
35663
  init_cache();
35481
35664
  init_entity();
35482
- init_errors();
35483
35665
  init_errors2();
35666
+ init_errors3();
35484
35667
  init_query_promise();
35485
- init_utils2();
35486
35668
  init_db2();
35487
35669
  ExecuteResultSync = class extends (_b164 = QueryPromise, _a232 = entityKind, _b164) {
35488
35670
  constructor(resultCb) {
@@ -36851,10 +37033,8 @@ var init_binary = __esm({
36851
37033
  __publicField(this, "length", this.config.length);
36852
37034
  }
36853
37035
  mapFromDriverValue(value) {
36854
- if (typeof value === "string")
36855
- return value;
36856
- if (Buffer.isBuffer(value))
36857
- return value.toString();
37036
+ if (typeof value === "string") return value;
37037
+ if (Buffer.isBuffer(value)) return value.toString();
36858
37038
  const str = [];
36859
37039
  for (const v of value) {
36860
37040
  str.push(v === 49 ? "1" : "0");
@@ -37176,8 +37356,7 @@ var init_decimal = __esm({
37176
37356
  __publicField(this, "unsigned", this.config.unsigned);
37177
37357
  }
37178
37358
  mapFromDriverValue(value) {
37179
- if (typeof value === "string")
37180
- return value;
37359
+ if (typeof value === "string") return value;
37181
37360
  return String(value);
37182
37361
  }
37183
37362
  getSQLType() {
@@ -37219,8 +37398,7 @@ var init_decimal = __esm({
37219
37398
  __publicField(this, "mapToDriverValue", String);
37220
37399
  }
37221
37400
  mapFromDriverValue(value) {
37222
- if (typeof value === "number")
37223
- return value;
37401
+ if (typeof value === "number") return value;
37224
37402
  return Number(value);
37225
37403
  }
37226
37404
  getSQLType() {
@@ -37949,10 +38127,8 @@ var init_varbinary = __esm({
37949
38127
  __publicField(this, "length", this.config.length);
37950
38128
  }
37951
38129
  mapFromDriverValue(value) {
37952
- if (typeof value === "string")
37953
- return value;
37954
- if (Buffer.isBuffer(value))
37955
- return value.toString();
38130
+ if (typeof value === "string") return value;
38131
+ if (Buffer.isBuffer(value)) return value.toString();
37956
38132
  const str = [];
37957
38133
  for (const v of value) {
37958
38134
  str.push(v === 49 ? "1" : "0");
@@ -38561,7 +38737,7 @@ var init_dialect3 = __esm({
38561
38737
  init_casing();
38562
38738
  init_column();
38563
38739
  init_entity();
38564
- init_errors();
38740
+ init_errors2();
38565
38741
  init_relations();
38566
38742
  init_expressions();
38567
38743
  init_sql();
@@ -38616,8 +38792,7 @@ var init_dialect3 = __esm({
38616
38792
  return `'${str.replace(/'/g, "''")}'`;
38617
38793
  }
38618
38794
  buildWithCTE(queries) {
38619
- if (!queries?.length)
38620
- return void 0;
38795
+ if (!queries?.length) return void 0;
38621
38796
  const withSqlChunks = [sql`with `];
38622
38797
  for (const [i, w] of queries.entries()) {
38623
38798
  withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);
@@ -39897,8 +40072,7 @@ var init_select4 = __esm({
39897
40072
  };
39898
40073
  this.tableName = getTableLikeName(table6);
39899
40074
  this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
39900
- for (const item of extractUsedTable3(table6))
39901
- this.usedTables.add(item);
40075
+ for (const item of extractUsedTable3(table6)) this.usedTables.add(item);
39902
40076
  }
39903
40077
  /** @internal */
39904
40078
  getUsedTables() {
@@ -39911,8 +40085,7 @@ var init_select4 = __esm({
39911
40085
  const onIndex = isCrossJoin ? a : b;
39912
40086
  const baseTableName = this.tableName;
39913
40087
  const tableName = getTableLikeName(table6);
39914
- for (const item of extractUsedTable3(table6))
39915
- this.usedTables.add(item);
40088
+ for (const item of extractUsedTable3(table6)) this.usedTables.add(item);
39916
40089
  if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) {
39917
40090
  throw new Error(`Alias "${tableName}" is already used in this query`);
39918
40091
  }
@@ -40180,8 +40353,7 @@ var init_select4 = __esm({
40180
40353
  const usedTables = [];
40181
40354
  usedTables.push(...extractUsedTable3(this.config.table));
40182
40355
  if (this.config.joins) {
40183
- for (const it of this.config.joins)
40184
- usedTables.push(...extractUsedTable3(it.table));
40356
+ for (const it of this.config.joins) usedTables.push(...extractUsedTable3(it.table));
40185
40357
  }
40186
40358
  return new Proxy(
40187
40359
  new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),
@@ -41130,10 +41302,9 @@ var init_session3 = __esm({
41130
41302
  "use strict";
41131
41303
  init_cache();
41132
41304
  init_entity();
41133
- init_errors();
41134
41305
  init_errors2();
41306
+ init_errors3();
41135
41307
  init_sql();
41136
- init_utils2();
41137
41308
  init_db3();
41138
41309
  _a341 = entityKind;
41139
41310
  MySqlPreparedQuery = class {
@@ -42060,7 +42231,7 @@ var cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck;
42060
42231
  var init_cli = __esm({
42061
42232
  "src/cli/validations/cli.ts"() {
42062
42233
  "use strict";
42063
- init_lib();
42234
+ init_esm();
42064
42235
  init_schemaValidator();
42065
42236
  init_common();
42066
42237
  cliConfigGenerate = objectType({
@@ -42128,7 +42299,7 @@ var gelCredentials;
42128
42299
  var init_gel = __esm({
42129
42300
  "src/cli/validations/gel.ts"() {
42130
42301
  "use strict";
42131
- init_lib();
42302
+ init_esm();
42132
42303
  init_views();
42133
42304
  init_common();
42134
42305
  gelCredentials = unionType([
@@ -42176,7 +42347,7 @@ var libSQLCredentials;
42176
42347
  var init_libsql = __esm({
42177
42348
  "src/cli/validations/libsql.ts"() {
42178
42349
  "use strict";
42179
- init_lib();
42350
+ init_esm();
42180
42351
  init_views();
42181
42352
  init_common();
42182
42353
  libSQLCredentials = objectType({
@@ -42191,7 +42362,7 @@ var mysqlCredentials;
42191
42362
  var init_mysql = __esm({
42192
42363
  "src/cli/validations/mysql.ts"() {
42193
42364
  "use strict";
42194
- init_lib();
42365
+ init_esm();
42195
42366
  init_views();
42196
42367
  init_common();
42197
42368
  init_outputs();
@@ -42228,7 +42399,7 @@ var postgresCredentials;
42228
42399
  var init_postgres = __esm({
42229
42400
  "src/cli/validations/postgres.ts"() {
42230
42401
  "use strict";
42231
- init_lib();
42402
+ init_esm();
42232
42403
  init_views();
42233
42404
  init_common();
42234
42405
  postgresCredentials = unionType([
@@ -42277,7 +42448,7 @@ var singlestoreCredentials;
42277
42448
  var init_singlestore = __esm({
42278
42449
  "src/cli/validations/singlestore.ts"() {
42279
42450
  "use strict";
42280
- init_lib();
42451
+ init_esm();
42281
42452
  init_views();
42282
42453
  init_common();
42283
42454
  init_outputs();
@@ -42315,7 +42486,7 @@ var init_sqlite = __esm({
42315
42486
  "src/cli/validations/sqlite.ts"() {
42316
42487
  "use strict";
42317
42488
  init_global();
42318
- init_lib();
42489
+ init_esm();
42319
42490
  init_views();
42320
42491
  init_common();
42321
42492
  sqliteCredentials = unionType([
@@ -42346,7 +42517,7 @@ var credentials, studioCliParams, studioConfig;
42346
42517
  var init_studio = __esm({
42347
42518
  "src/cli/validations/studio.ts"() {
42348
42519
  "use strict";
42349
- init_lib();
42520
+ init_esm();
42350
42521
  init_schemaValidator();
42351
42522
  init_mysql();
42352
42523
  init_postgres();
@@ -42388,7 +42559,7 @@ var init_utils9 = __esm({
42388
42559
  "src/cli/commands/utils.ts"() {
42389
42560
  "use strict";
42390
42561
  import_hanji7 = __toESM(require_hanji());
42391
- init_lib();
42562
+ init_esm();
42392
42563
  init_getTablesFilterByExtensions();
42393
42564
  init_global();
42394
42565
  init_schemaValidator();
@@ -42719,10 +42890,8 @@ var init_binary2 = __esm({
42719
42890
  __publicField(this, "length", this.config.length);
42720
42891
  }
42721
42892
  mapFromDriverValue(value) {
42722
- if (typeof value === "string")
42723
- return value;
42724
- if (Buffer.isBuffer(value))
42725
- return value.toString();
42893
+ if (typeof value === "string") return value;
42894
+ if (Buffer.isBuffer(value)) return value.toString();
42726
42895
  const str = [];
42727
42896
  for (const v of value) {
42728
42897
  str.push(v === 49 ? "1" : "0");
@@ -43049,8 +43218,7 @@ var init_decimal2 = __esm({
43049
43218
  __publicField(this, "unsigned", this.config.unsigned);
43050
43219
  }
43051
43220
  mapFromDriverValue(value) {
43052
- if (typeof value === "string")
43053
- return value;
43221
+ if (typeof value === "string") return value;
43054
43222
  return String(value);
43055
43223
  }
43056
43224
  getSQLType() {
@@ -43092,8 +43260,7 @@ var init_decimal2 = __esm({
43092
43260
  __publicField(this, "mapToDriverValue", String);
43093
43261
  }
43094
43262
  mapFromDriverValue(value) {
43095
- if (typeof value === "number")
43096
- return value;
43263
+ if (typeof value === "number") return value;
43097
43264
  return Number(value);
43098
43265
  }
43099
43266
  getSQLType() {
@@ -43802,10 +43969,8 @@ var init_varbinary2 = __esm({
43802
43969
  __publicField(this, "length", this.config.length);
43803
43970
  }
43804
43971
  mapFromDriverValue(value) {
43805
- if (typeof value === "string")
43806
- return value;
43807
- if (Buffer.isBuffer(value))
43808
- return value.toString();
43972
+ if (typeof value === "string") return value;
43973
+ if (Buffer.isBuffer(value)) return value.toString();
43809
43974
  const str = [];
43810
43975
  for (const v of value) {
43811
43976
  str.push(v === 49 ? "1" : "0");
@@ -44544,7 +44709,7 @@ var init_dialect4 = __esm({
44544
44709
  init_casing();
44545
44710
  init_column();
44546
44711
  init_entity();
44547
- init_errors();
44712
+ init_errors2();
44548
44713
  init_relations();
44549
44714
  init_expressions();
44550
44715
  init_sql();
@@ -44598,8 +44763,7 @@ var init_dialect4 = __esm({
44598
44763
  return `'${str.replace(/'/g, "''")}'`;
44599
44764
  }
44600
44765
  buildWithCTE(queries) {
44601
- if (!queries?.length)
44602
- return void 0;
44766
+ if (!queries?.length) return void 0;
44603
44767
  const withSqlChunks = [sql`with `];
44604
44768
  for (const [i, w] of queries.entries()) {
44605
44769
  withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);
@@ -45533,8 +45697,7 @@ var init_select5 = __esm({
45533
45697
  };
45534
45698
  this.tableName = getTableLikeName(table6);
45535
45699
  this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
45536
- for (const item of extractUsedTable4(table6))
45537
- this.usedTables.add(item);
45700
+ for (const item of extractUsedTable4(table6)) this.usedTables.add(item);
45538
45701
  }
45539
45702
  /** @internal */
45540
45703
  getUsedTables() {
@@ -45544,8 +45707,7 @@ var init_select5 = __esm({
45544
45707
  return (table6, on) => {
45545
45708
  const baseTableName = this.tableName;
45546
45709
  const tableName = getTableLikeName(table6);
45547
- for (const item of extractUsedTable4(table6))
45548
- this.usedTables.add(item);
45710
+ for (const item of extractUsedTable4(table6)) this.usedTables.add(item);
45549
45711
  if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) {
45550
45712
  throw new Error(`Alias "${tableName}" is already used in this query`);
45551
45713
  }
@@ -45804,8 +45966,7 @@ var init_select5 = __esm({
45804
45966
  const usedTables = [];
45805
45967
  usedTables.push(...extractUsedTable4(this.config.table));
45806
45968
  if (this.config.joins) {
45807
- for (const it of this.config.joins)
45808
- usedTables.push(...extractUsedTable4(it.table));
45969
+ for (const it of this.config.joins) usedTables.push(...extractUsedTable4(it.table));
45809
45970
  }
45810
45971
  return new Proxy(
45811
45972
  new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),
@@ -46363,10 +46524,9 @@ var init_session4 = __esm({
46363
46524
  "use strict";
46364
46525
  init_cache();
46365
46526
  init_entity();
46366
- init_errors();
46367
46527
  init_errors2();
46528
+ init_errors3();
46368
46529
  init_sql();
46369
- init_utils2();
46370
46530
  init_db4();
46371
46531
  _a434 = entityKind;
46372
46532
  SingleStorePreparedQuery = class {