@polka-codes/cli 0.9.67 → 0.9.68

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 (2) hide show
  1. package/dist/index.js +356 -222
  2. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -35579,7 +35579,7 @@ var {
35579
35579
  Help
35580
35580
  } = import__.default;
35581
35581
  // package.json
35582
- var version = "0.9.67";
35582
+ var version = "0.9.68";
35583
35583
 
35584
35584
  // src/commands/code.ts
35585
35585
  import { readFile as readFile4 } from "node:fs/promises";
@@ -73047,6 +73047,7 @@ __export(exports_external2, {
73047
73047
  string: () => string5,
73048
73048
  strictObject: () => strictObject2,
73049
73049
  startsWith: () => _startsWith2,
73050
+ slugify: () => _slugify,
73050
73051
  size: () => _size2,
73051
73052
  setErrorMap: () => setErrorMap2,
73052
73053
  set: () => set3,
@@ -73092,9 +73093,11 @@ __export(exports_external2, {
73092
73093
  minSize: () => _minSize2,
73093
73094
  minLength: () => _minLength2,
73094
73095
  mime: () => _mime2,
73096
+ meta: () => meta2,
73095
73097
  maxSize: () => _maxSize2,
73096
73098
  maxLength: () => _maxLength2,
73097
73099
  map: () => map2,
73100
+ mac: () => mac2,
73098
73101
  lte: () => _lte2,
73099
73102
  lt: () => _lt2,
73100
73103
  lowercase: () => _lowercase2,
@@ -73139,6 +73142,7 @@ __export(exports_external2, {
73139
73142
  email: () => email4,
73140
73143
  e164: () => e1644,
73141
73144
  discriminatedUnion: () => discriminatedUnion2,
73145
+ describe: () => describe2,
73142
73146
  decodeAsync: () => decodeAsync4,
73143
73147
  decode: () => decode4,
73144
73148
  date: () => date7,
@@ -73197,6 +73201,7 @@ __export(exports_external2, {
73197
73201
  ZodNanoID: () => ZodNanoID2,
73198
73202
  ZodNaN: () => ZodNaN3,
73199
73203
  ZodMap: () => ZodMap3,
73204
+ ZodMAC: () => ZodMAC,
73200
73205
  ZodLiteral: () => ZodLiteral3,
73201
73206
  ZodLazy: () => ZodLazy3,
73202
73207
  ZodKSUID: () => ZodKSUID2,
@@ -73262,6 +73267,7 @@ __export(exports_core4, {
73262
73267
  prettifyError: () => prettifyError2,
73263
73268
  parseAsync: () => parseAsync3,
73264
73269
  parse: () => parse5,
73270
+ meta: () => meta,
73265
73271
  locales: () => exports_locales2,
73266
73272
  isValidJWT: () => isValidJWT3,
73267
73273
  isValidBase64URL: () => isValidBase64URL2,
@@ -73272,6 +73278,7 @@ __export(exports_core4, {
73272
73278
  flattenError: () => flattenError2,
73273
73279
  encodeAsync: () => encodeAsync3,
73274
73280
  encode: () => encode3,
73281
+ describe: () => describe,
73275
73282
  decodeAsync: () => decodeAsync3,
73276
73283
  decode: () => decode3,
73277
73284
  config: () => config4,
@@ -73303,6 +73310,7 @@ __export(exports_core4, {
73303
73310
  _stringFormat: () => _stringFormat2,
73304
73311
  _string: () => _string2,
73305
73312
  _startsWith: () => _startsWith2,
73313
+ _slugify: () => _slugify,
73306
73314
  _size: () => _size2,
73307
73315
  _set: () => _set2,
73308
73316
  _safeParseAsync: () => _safeParseAsync2,
@@ -73344,6 +73352,7 @@ __export(exports_core4, {
73344
73352
  _maxLength: () => _maxLength2,
73345
73353
  _max: () => _lte2,
73346
73354
  _map: () => _map2,
73355
+ _mac: () => _mac,
73347
73356
  _lte: () => _lte2,
73348
73357
  _lt: () => _lt2,
73349
73358
  _lowercase: () => _lowercase2,
@@ -73444,6 +73453,7 @@ __export(exports_core4, {
73444
73453
  $ZodNanoID: () => $ZodNanoID2,
73445
73454
  $ZodNaN: () => $ZodNaN2,
73446
73455
  $ZodMap: () => $ZodMap2,
73456
+ $ZodMAC: () => $ZodMAC,
73447
73457
  $ZodLiteral: () => $ZodLiteral2,
73448
73458
  $ZodLazy: () => $ZodLazy2,
73449
73459
  $ZodKSUID: () => $ZodKSUID2,
@@ -73513,20 +73523,29 @@ var NEVER2 = Object.freeze({
73513
73523
  });
73514
73524
  function $constructor2(name18, initializer3, params) {
73515
73525
  function init(inst, def) {
73516
- var _a16;
73517
- Object.defineProperty(inst, "_zod", {
73518
- value: inst._zod ?? {},
73519
- enumerable: false
73520
- });
73521
- (_a16 = inst._zod).traits ?? (_a16.traits = new Set);
73526
+ if (!inst._zod) {
73527
+ Object.defineProperty(inst, "_zod", {
73528
+ value: {
73529
+ def,
73530
+ constr: _,
73531
+ traits: new Set
73532
+ },
73533
+ enumerable: false
73534
+ });
73535
+ }
73536
+ if (inst._zod.traits.has(name18)) {
73537
+ return;
73538
+ }
73522
73539
  inst._zod.traits.add(name18);
73523
73540
  initializer3(inst, def);
73524
- for (const k in _.prototype) {
73525
- if (!(k in inst))
73526
- Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
73541
+ const proto2 = _.prototype;
73542
+ const keys = Object.keys(proto2);
73543
+ for (let i = 0;i < keys.length; i++) {
73544
+ const k = keys[i];
73545
+ if (!(k in inst)) {
73546
+ inst[k] = proto2[k].bind(inst);
73547
+ }
73527
73548
  }
73528
- inst._zod.constr = _;
73529
- inst._zod.def = def;
73530
73549
  }
73531
73550
  const Parent = params?.Parent ?? Object;
73532
73551
 
@@ -73582,6 +73601,7 @@ __export(exports_util2, {
73582
73601
  uint8ArrayToBase64url: () => uint8ArrayToBase64url2,
73583
73602
  uint8ArrayToBase64: () => uint8ArrayToBase642,
73584
73603
  stringifyPrimitive: () => stringifyPrimitive2,
73604
+ slugify: () => slugify,
73585
73605
  shallowClone: () => shallowClone2,
73586
73606
  safeExtend: () => safeExtend2,
73587
73607
  required: () => required2,
@@ -73769,6 +73789,9 @@ function randomString2(length = 10) {
73769
73789
  function esc2(str) {
73770
73790
  return JSON.stringify(str);
73771
73791
  }
73792
+ function slugify(input) {
73793
+ return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
73794
+ }
73772
73795
  var captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
73773
73796
  function isObject3(data) {
73774
73797
  return typeof data === "object" && data !== null && !Array.isArray(data);
@@ -73791,6 +73814,8 @@ function isPlainObject4(o) {
73791
73814
  const ctor = o.constructor;
73792
73815
  if (ctor === undefined)
73793
73816
  return true;
73817
+ if (typeof ctor !== "function")
73818
+ return true;
73794
73819
  const prot = ctor.prototype;
73795
73820
  if (isObject3(prot) === false)
73796
73821
  return false;
@@ -74460,6 +74485,7 @@ __export(exports_regexes2, {
74460
74485
  md5_hex: () => md5_hex2,
74461
74486
  md5_base64url: () => md5_base64url2,
74462
74487
  md5_base64: () => md5_base642,
74488
+ mac: () => mac,
74463
74489
  lowercase: () => lowercase2,
74464
74490
  ksuid: () => ksuid3,
74465
74491
  ipv6: () => ipv63,
@@ -74517,6 +74543,10 @@ function emoji3() {
74517
74543
  }
74518
74544
  var ipv43 = /^(?:(?: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])$/;
74519
74545
  var ipv63 = /^(([0-9a-fA-F]{1,4}:){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}|:))$/;
74546
+ var mac = (delimiter) => {
74547
+ const escapedDelim = escapeRegex2(delimiter ?? ":");
74548
+ return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
74549
+ };
74520
74550
  var cidrv43 = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/;
74521
74551
  var cidrv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
74522
74552
  var base643 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
@@ -75162,7 +75192,7 @@ class Doc2 {
75162
75192
  var version3 = {
75163
75193
  major: 4,
75164
75194
  minor: 1,
75165
- patch: 12
75195
+ patch: 13
75166
75196
  };
75167
75197
 
75168
75198
  // ../../node_modules/zod/v4/core/schemas.js
@@ -75339,7 +75369,7 @@ var $ZodURL2 = /* @__PURE__ */ $constructor2("$ZodURL", (inst, def) => {
75339
75369
  code: "invalid_format",
75340
75370
  format: "url",
75341
75371
  note: "Invalid hostname",
75342
- pattern: hostname3.source,
75372
+ pattern: def.hostname.source,
75343
75373
  input: payload.value,
75344
75374
  inst,
75345
75375
  continue: !def.abort
@@ -75424,18 +75454,12 @@ var $ZodISODuration2 = /* @__PURE__ */ $constructor2("$ZodISODuration", (inst, d
75424
75454
  var $ZodIPv42 = /* @__PURE__ */ $constructor2("$ZodIPv4", (inst, def) => {
75425
75455
  def.pattern ?? (def.pattern = ipv43);
75426
75456
  $ZodStringFormat2.init(inst, def);
75427
- inst._zod.onattach.push((inst2) => {
75428
- const bag = inst2._zod.bag;
75429
- bag.format = `ipv4`;
75430
- });
75457
+ inst._zod.bag.format = `ipv4`;
75431
75458
  });
75432
75459
  var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => {
75433
75460
  def.pattern ?? (def.pattern = ipv63);
75434
75461
  $ZodStringFormat2.init(inst, def);
75435
- inst._zod.onattach.push((inst2) => {
75436
- const bag = inst2._zod.bag;
75437
- bag.format = `ipv6`;
75438
- });
75462
+ inst._zod.bag.format = `ipv6`;
75439
75463
  inst._zod.check = (payload) => {
75440
75464
  try {
75441
75465
  new URL(`http://[${payload.value}]`);
@@ -75450,6 +75474,11 @@ var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => {
75450
75474
  }
75451
75475
  };
75452
75476
  });
75477
+ var $ZodMAC = /* @__PURE__ */ $constructor2("$ZodMAC", (inst, def) => {
75478
+ def.pattern ?? (def.pattern = mac(def.delimiter));
75479
+ $ZodStringFormat2.init(inst, def);
75480
+ inst._zod.bag.format = `mac`;
75481
+ });
75453
75482
  var $ZodCIDRv42 = /* @__PURE__ */ $constructor2("$ZodCIDRv4", (inst, def) => {
75454
75483
  def.pattern ?? (def.pattern = cidrv43);
75455
75484
  $ZodStringFormat2.init(inst, def);
@@ -75497,9 +75526,7 @@ function isValidBase642(data) {
75497
75526
  var $ZodBase642 = /* @__PURE__ */ $constructor2("$ZodBase64", (inst, def) => {
75498
75527
  def.pattern ?? (def.pattern = base643);
75499
75528
  $ZodStringFormat2.init(inst, def);
75500
- inst._zod.onattach.push((inst2) => {
75501
- inst2._zod.bag.contentEncoding = "base64";
75502
- });
75529
+ inst._zod.bag.contentEncoding = "base64";
75503
75530
  inst._zod.check = (payload) => {
75504
75531
  if (isValidBase642(payload.value))
75505
75532
  return;
@@ -75522,9 +75549,7 @@ function isValidBase64URL2(data) {
75522
75549
  var $ZodBase64URL2 = /* @__PURE__ */ $constructor2("$ZodBase64URL", (inst, def) => {
75523
75550
  def.pattern ?? (def.pattern = base64url3);
75524
75551
  $ZodStringFormat2.init(inst, def);
75525
- inst._zod.onattach.push((inst2) => {
75526
- inst2._zod.bag.contentEncoding = "base64url";
75527
- });
75552
+ inst._zod.bag.contentEncoding = "base64url";
75528
75553
  inst._zod.check = (payload) => {
75529
75554
  if (isValidBase64URL2(payload.value))
75530
75555
  return;
@@ -75612,7 +75637,7 @@ var $ZodNumber2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => {
75612
75637
  return payload;
75613
75638
  };
75614
75639
  });
75615
- var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => {
75640
+ var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumberFormat", (inst, def) => {
75616
75641
  $ZodCheckNumberFormat2.init(inst, def);
75617
75642
  $ZodNumber2.init(inst, def);
75618
75643
  });
@@ -75655,7 +75680,7 @@ var $ZodBigInt2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => {
75655
75680
  return payload;
75656
75681
  };
75657
75682
  });
75658
- var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => {
75683
+ var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigIntFormat", (inst, def) => {
75659
75684
  $ZodCheckBigIntFormat2.init(inst, def);
75660
75685
  $ZodBigInt2.init(inst, def);
75661
75686
  });
@@ -75840,7 +75865,7 @@ function handleCatchall2(proms, input, payload, ctx, def, inst) {
75840
75865
  const keySet = def.keySet;
75841
75866
  const _catchall = def.catchall._zod;
75842
75867
  const t = _catchall.def.type;
75843
- for (const key of Object.keys(input)) {
75868
+ for (const key in input) {
75844
75869
  if (keySet.has(key))
75845
75870
  continue;
75846
75871
  if (t === "never") {
@@ -76215,7 +76240,6 @@ function handleIntersectionResults2(result, left, right) {
76215
76240
  var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => {
76216
76241
  $ZodType2.init(inst, def);
76217
76242
  const items = def.items;
76218
- const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
76219
76243
  inst._zod.parse = (payload, ctx) => {
76220
76244
  const input = payload.value;
76221
76245
  if (!Array.isArray(input)) {
@@ -76229,6 +76253,8 @@ var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => {
76229
76253
  }
76230
76254
  payload.value = [];
76231
76255
  const proms = [];
76256
+ const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
76257
+ const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
76232
76258
  if (!def.rest) {
76233
76259
  const tooBig = input.length > items.length;
76234
76260
  const tooSmall = input.length < optStart - 1;
@@ -76299,11 +76325,13 @@ var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => {
76299
76325
  return payload;
76300
76326
  }
76301
76327
  const proms = [];
76302
- if (def.keyType._zod.values) {
76303
- const values = def.keyType._zod.values;
76328
+ const values = def.keyType._zod.values;
76329
+ if (values) {
76304
76330
  payload.value = {};
76331
+ const recordKeys = new Set;
76305
76332
  for (const key of values) {
76306
76333
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
76334
+ recordKeys.add(typeof key === "number" ? key.toString() : key);
76307
76335
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
76308
76336
  if (result instanceof Promise) {
76309
76337
  proms.push(result.then((result2) => {
@@ -76322,7 +76350,7 @@ var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => {
76322
76350
  }
76323
76351
  let unrecognized;
76324
76352
  for (const key in input) {
76325
- if (!values.has(key)) {
76353
+ if (!recordKeys.has(key)) {
76326
76354
  unrecognized = unrecognized ?? [];
76327
76355
  unrecognized.push(key);
76328
76356
  }
@@ -76497,11 +76525,12 @@ var $ZodLiteral2 = /* @__PURE__ */ $constructor2("$ZodLiteral", (inst, def) => {
76497
76525
  if (def.values.length === 0) {
76498
76526
  throw new Error("Cannot create literal schema with no valid values");
76499
76527
  }
76500
- inst._zod.values = new Set(def.values);
76528
+ const values = new Set(def.values);
76529
+ inst._zod.values = values;
76501
76530
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`);
76502
76531
  inst._zod.parse = (payload, _ctx) => {
76503
76532
  const input = payload.value;
76504
- if (inst._zod.values.has(input)) {
76533
+ if (values.has(input)) {
76505
76534
  return payload;
76506
76535
  }
76507
76536
  payload.issues.push({
@@ -76814,8 +76843,8 @@ var $ZodReadonly2 = /* @__PURE__ */ $constructor2("$ZodReadonly", (inst, def) =>
76814
76843
  $ZodType2.init(inst, def);
76815
76844
  defineLazy2(inst._zod, "propValues", () => def.innerType._zod.propValues);
76816
76845
  defineLazy2(inst._zod, "values", () => def.innerType._zod.values);
76817
- defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin);
76818
- defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout);
76846
+ defineLazy2(inst._zod, "optin", () => def.innerType?._zod?.optin);
76847
+ defineLazy2(inst._zod, "optout", () => def.innerType?._zod?.optout);
76819
76848
  inst._zod.parse = (payload, ctx) => {
76820
76849
  if (ctx.direction === "backward") {
76821
76850
  return def.innerType._zod.run(payload, ctx);
@@ -76962,10 +76991,10 @@ var $ZodPromise2 = /* @__PURE__ */ $constructor2("$ZodPromise", (inst, def) => {
76962
76991
  var $ZodLazy2 = /* @__PURE__ */ $constructor2("$ZodLazy", (inst, def) => {
76963
76992
  $ZodType2.init(inst, def);
76964
76993
  defineLazy2(inst._zod, "innerType", () => def.getter());
76965
- defineLazy2(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
76966
- defineLazy2(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
76967
- defineLazy2(inst._zod, "optin", () => inst._zod.innerType._zod.optin ?? undefined);
76968
- defineLazy2(inst._zod, "optout", () => inst._zod.innerType._zod.optout ?? undefined);
76994
+ defineLazy2(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
76995
+ defineLazy2(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
76996
+ defineLazy2(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
76997
+ defineLazy2(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
76969
76998
  inst._zod.parse = (payload, ctx) => {
76970
76999
  const inner = inst._zod.innerType;
76971
77000
  return inner._zod.run(payload, ctx);
@@ -78127,6 +78156,7 @@ var error54 = () => {
78127
78156
  duration: "ISO duration",
78128
78157
  ipv4: "IPv4 address",
78129
78158
  ipv6: "IPv6 address",
78159
+ mac: "MAC address",
78130
78160
  cidrv4: "IPv4 range",
78131
78161
  cidrv6: "IPv6 range",
78132
78162
  base64: "base64-encoded string",
@@ -78935,110 +78965,200 @@ function fr_CA_default2() {
78935
78965
  }
78936
78966
  // ../../node_modules/zod/v4/locales/he.js
78937
78967
  var error61 = () => {
78938
- const Sizable = {
78939
- string: { unit: "אותיות", verb: "לכלול" },
78940
- file: { unit: "בייטים", verb: "לכלול" },
78941
- array: { unit: "פריטים", verb: "לכלול" },
78942
- set: { unit: "פריטים", verb: "לכלול" }
78968
+ const TypeNames = {
78969
+ string: { label: "מחרוזת", gender: "f" },
78970
+ number: { label: "מספר", gender: "m" },
78971
+ boolean: { label: "ערך בוליאני", gender: "m" },
78972
+ bigint: { label: "BigInt", gender: "m" },
78973
+ date: { label: "תאריך", gender: "m" },
78974
+ array: { label: "מערך", gender: "m" },
78975
+ object: { label: "אובייקט", gender: "m" },
78976
+ null: { label: "ערך ריק (null)", gender: "m" },
78977
+ undefined: { label: "ערך לא מוגדר (undefined)", gender: "m" },
78978
+ symbol: { label: "סימבול (Symbol)", gender: "m" },
78979
+ function: { label: "פונקציה", gender: "f" },
78980
+ map: { label: "מפה (Map)", gender: "f" },
78981
+ set: { label: "קבוצה (Set)", gender: "f" },
78982
+ file: { label: "קובץ", gender: "m" },
78983
+ promise: { label: "Promise", gender: "m" },
78984
+ NaN: { label: "NaN", gender: "m" },
78985
+ unknown: { label: "ערך לא ידוע", gender: "m" },
78986
+ value: { label: "ערך", gender: "m" }
78943
78987
  };
78944
- function getSizing(origin) {
78988
+ const Sizable = {
78989
+ string: { unit: "תווים", shortLabel: "קצר", longLabel: "ארוך" },
78990
+ file: { unit: "בייטים", shortLabel: "קטן", longLabel: "גדול" },
78991
+ array: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
78992
+ set: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
78993
+ number: { unit: "", shortLabel: "קטן", longLabel: "גדול" }
78994
+ };
78995
+ const typeEntry = (t) => t ? TypeNames[t] : undefined;
78996
+ const typeLabel = (t) => {
78997
+ const e = typeEntry(t);
78998
+ if (e)
78999
+ return e.label;
79000
+ return t ?? TypeNames.unknown.label;
79001
+ };
79002
+ const withDefinite = (t) => `ה${typeLabel(t)}`;
79003
+ const verbFor = (t) => {
79004
+ const e = typeEntry(t);
79005
+ const gender = e?.gender ?? "m";
79006
+ return gender === "f" ? "צריכה להיות" : "צריך להיות";
79007
+ };
79008
+ const getSizing = (origin) => {
79009
+ if (!origin)
79010
+ return null;
78945
79011
  return Sizable[origin] ?? null;
78946
- }
79012
+ };
78947
79013
  const parsedType11 = (data) => {
78948
79014
  const t = typeof data;
78949
79015
  switch (t) {
78950
- case "number": {
79016
+ case "number":
78951
79017
  return Number.isNaN(data) ? "NaN" : "number";
78952
- }
78953
79018
  case "object": {
78954
- if (Array.isArray(data)) {
79019
+ if (Array.isArray(data))
78955
79020
  return "array";
78956
- }
78957
- if (data === null) {
79021
+ if (data === null)
78958
79022
  return "null";
78959
- }
78960
79023
  if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
78961
79024
  return data.constructor.name;
78962
79025
  }
79026
+ return "object";
78963
79027
  }
79028
+ default:
79029
+ return t;
78964
79030
  }
78965
- return t;
78966
79031
  };
78967
79032
  const Nouns = {
78968
- regex: "קלט",
78969
- email: "כתובת אימייל",
78970
- url: "כתובת רשת",
78971
- emoji: "אימוג'י",
78972
- uuid: "UUID",
78973
- uuidv4: "UUIDv4",
78974
- uuidv6: "UUIDv6",
78975
- nanoid: "nanoid",
78976
- guid: "GUID",
78977
- cuid: "cuid",
78978
- cuid2: "cuid2",
78979
- ulid: "ULID",
78980
- xid: "XID",
78981
- ksuid: "KSUID",
78982
- datetime: "תאריך וזמן ISO",
78983
- date: "תאריך ISO",
78984
- time: "זמן ISO",
78985
- duration: "משך זמן ISO",
78986
- ipv4: "כתובת IPv4",
78987
- ipv6: "כתובת IPv6",
78988
- cidrv4: "טווח IPv4",
78989
- cidrv6: "טווח IPv6",
78990
- base64: "מחרוזת בבסיס 64",
78991
- base64url: "מחרוזת בבסיס 64 לכתובות רשת",
78992
- json_string: "מחרוזת JSON",
78993
- e164: "מספר E.164",
78994
- jwt: "JWT",
78995
- template_literal: "קלט"
79033
+ regex: { label: "קלט", gender: "m" },
79034
+ email: { label: "כתובת אימייל", gender: "f" },
79035
+ url: { label: "כתובת רשת", gender: "f" },
79036
+ emoji: { label: "אימוג'י", gender: "m" },
79037
+ uuid: { label: "UUID", gender: "m" },
79038
+ nanoid: { label: "nanoid", gender: "m" },
79039
+ guid: { label: "GUID", gender: "m" },
79040
+ cuid: { label: "cuid", gender: "m" },
79041
+ cuid2: { label: "cuid2", gender: "m" },
79042
+ ulid: { label: "ULID", gender: "m" },
79043
+ xid: { label: "XID", gender: "m" },
79044
+ ksuid: { label: "KSUID", gender: "m" },
79045
+ datetime: { label: "תאריך וזמן ISO", gender: "m" },
79046
+ date: { label: "תאריך ISO", gender: "m" },
79047
+ time: { label: "זמן ISO", gender: "m" },
79048
+ duration: { label: "משך זמן ISO", gender: "m" },
79049
+ ipv4: { label: "כתובת IPv4", gender: "f" },
79050
+ ipv6: { label: "כתובת IPv6", gender: "f" },
79051
+ cidrv4: { label: "טווח IPv4", gender: "m" },
79052
+ cidrv6: { label: "טווח IPv6", gender: "m" },
79053
+ base64: { label: "מחרוזת בבסיס 64", gender: "f" },
79054
+ base64url: { label: "מחרוזת בבסיס 64 לכתובות רשת", gender: "f" },
79055
+ json_string: { label: "מחרוזת JSON", gender: "f" },
79056
+ e164: { label: "מספר E.164", gender: "m" },
79057
+ jwt: { label: "JWT", gender: "m" },
79058
+ ends_with: { label: "קלט", gender: "m" },
79059
+ includes: { label: "קלט", gender: "m" },
79060
+ lowercase: { label: "קלט", gender: "m" },
79061
+ starts_with: { label: "קלט", gender: "m" },
79062
+ uppercase: { label: "קלט", gender: "m" }
78996
79063
  };
78997
79064
  return (issue3) => {
78998
79065
  switch (issue3.code) {
78999
- case "invalid_type":
79000
- return `קלט לא תקין: צריך ${issue3.expected}, התקבל ${parsedType11(issue3.input)}`;
79001
- case "invalid_value":
79002
- if (issue3.values.length === 1)
79003
- return `קלט לא תקין: צריך ${stringifyPrimitive2(issue3.values[0])}`;
79004
- return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues2(issue3.values, "|")}`;
79066
+ case "invalid_type": {
79067
+ const expectedKey = issue3.expected;
79068
+ const expected = typeLabel(expectedKey);
79069
+ const receivedKey = parsedType11(issue3.input);
79070
+ const received = TypeNames[receivedKey]?.label ?? receivedKey;
79071
+ return `קלט לא תקין: צריך להיות ${expected}, התקבל ${received}`;
79072
+ }
79073
+ case "invalid_value": {
79074
+ if (issue3.values.length === 1) {
79075
+ return `ערך לא תקין: הערך חייב להיות ${stringifyPrimitive2(issue3.values[0])}`;
79076
+ }
79077
+ const stringified = issue3.values.map((v) => stringifyPrimitive2(v));
79078
+ if (issue3.values.length === 2) {
79079
+ return `ערך לא תקין: האפשרויות המתאימות הן ${stringified[0]} או ${stringified[1]}`;
79080
+ }
79081
+ const lastValue = stringified[stringified.length - 1];
79082
+ const restValues = stringified.slice(0, -1).join(", ");
79083
+ return `ערך לא תקין: האפשרויות המתאימות הן ${restValues} או ${lastValue}`;
79084
+ }
79005
79085
  case "too_big": {
79006
- const adj = issue3.inclusive ? "<=" : "<";
79007
79086
  const sizing = getSizing(issue3.origin);
79008
- if (sizing)
79009
- return `גדול מדי: ${issue3.origin ?? "value"} צריך להיות ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`;
79010
- return `גדול מדי: ${issue3.origin ?? "value"} צריך להיות ${adj}${issue3.maximum.toString()}`;
79087
+ const subject = withDefinite(issue3.origin ?? "value");
79088
+ if (issue3.origin === "string") {
79089
+ return `${sizing?.longLabel ?? "ארוך"} מדי: ${subject} צריכה להכיל ${issue3.maximum.toString()} ${sizing?.unit ?? ""} ${issue3.inclusive ? "או פחות" : "לכל היותר"}`.trim();
79090
+ }
79091
+ if (issue3.origin === "number") {
79092
+ const comparison = issue3.inclusive ? `קטן או שווה ל-${issue3.maximum}` : `קטן מ-${issue3.maximum}`;
79093
+ return `גדול מדי: ${subject} צריך להיות ${comparison}`;
79094
+ }
79095
+ if (issue3.origin === "array" || issue3.origin === "set") {
79096
+ const verb = issue3.origin === "set" ? "צריכה" : "צריך";
79097
+ const comparison = issue3.inclusive ? `${issue3.maximum} ${sizing?.unit ?? ""} או פחות` : `פחות מ-${issue3.maximum} ${sizing?.unit ?? ""}`;
79098
+ return `גדול מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
79099
+ }
79100
+ const adj = issue3.inclusive ? "<=" : "<";
79101
+ const be = verbFor(issue3.origin ?? "value");
79102
+ if (sizing?.unit) {
79103
+ return `${sizing.longLabel} מדי: ${subject} ${be} ${adj}${issue3.maximum.toString()} ${sizing.unit}`;
79104
+ }
79105
+ return `${sizing?.longLabel ?? "גדול"} מדי: ${subject} ${be} ${adj}${issue3.maximum.toString()}`;
79011
79106
  }
79012
79107
  case "too_small": {
79013
- const adj = issue3.inclusive ? ">=" : ">";
79014
79108
  const sizing = getSizing(issue3.origin);
79015
- if (sizing) {
79016
- return `קטן מדי: ${issue3.origin} צריך להיות ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
79109
+ const subject = withDefinite(issue3.origin ?? "value");
79110
+ if (issue3.origin === "string") {
79111
+ return `${sizing?.shortLabel ?? "קצר"} מדי: ${subject} צריכה להכיל ${issue3.minimum.toString()} ${sizing?.unit ?? ""} ${issue3.inclusive ? "או יותר" : "לפחות"}`.trim();
79112
+ }
79113
+ if (issue3.origin === "number") {
79114
+ const comparison = issue3.inclusive ? `גדול או שווה ל-${issue3.minimum}` : `גדול מ-${issue3.minimum}`;
79115
+ return `קטן מדי: ${subject} צריך להיות ${comparison}`;
79017
79116
  }
79018
- return `קטן מדי: ${issue3.origin} צריך להיות ${adj}${issue3.minimum.toString()}`;
79117
+ if (issue3.origin === "array" || issue3.origin === "set") {
79118
+ const verb = issue3.origin === "set" ? "צריכה" : "צריך";
79119
+ if (issue3.minimum === 1 && issue3.inclusive) {
79120
+ const singularPhrase = issue3.origin === "set" ? "לפחות פריט אחד" : "לפחות פריט אחד";
79121
+ return `קטן מדי: ${subject} ${verb} להכיל ${singularPhrase}`;
79122
+ }
79123
+ const comparison = issue3.inclusive ? `${issue3.minimum} ${sizing?.unit ?? ""} או יותר` : `יותר מ-${issue3.minimum} ${sizing?.unit ?? ""}`;
79124
+ return `קטן מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
79125
+ }
79126
+ const adj = issue3.inclusive ? ">=" : ">";
79127
+ const be = verbFor(issue3.origin ?? "value");
79128
+ if (sizing?.unit) {
79129
+ return `${sizing.shortLabel} מדי: ${subject} ${be} ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
79130
+ }
79131
+ return `${sizing?.shortLabel ?? "קטן"} מדי: ${subject} ${be} ${adj}${issue3.minimum.toString()}`;
79019
79132
  }
79020
79133
  case "invalid_format": {
79021
79134
  const _issue = issue3;
79022
79135
  if (_issue.format === "starts_with")
79023
- return `מחרוזת לא תקינה: חייבת להתחיל ב"${_issue.prefix}"`;
79136
+ return `המחרוזת חייבת להתחיל ב "${_issue.prefix}"`;
79024
79137
  if (_issue.format === "ends_with")
79025
- return `מחרוזת לא תקינה: חייבת להסתיים ב "${_issue.suffix}"`;
79138
+ return `המחרוזת חייבת להסתיים ב "${_issue.suffix}"`;
79026
79139
  if (_issue.format === "includes")
79027
- return `מחרוזת לא תקינה: חייבת לכלול "${_issue.includes}"`;
79140
+ return `המחרוזת חייבת לכלול "${_issue.includes}"`;
79028
79141
  if (_issue.format === "regex")
79029
- return `מחרוזת לא תקינה: חייבת להתאים לתבנית ${_issue.pattern}`;
79030
- return `${Nouns[_issue.format] ?? issue3.format} לא תקין`;
79142
+ return `המחרוזת חייבת להתאים לתבנית ${_issue.pattern}`;
79143
+ const nounEntry = Nouns[_issue.format];
79144
+ const noun = nounEntry?.label ?? _issue.format;
79145
+ const gender = nounEntry?.gender ?? "m";
79146
+ const adjective = gender === "f" ? "תקינה" : "תקין";
79147
+ return `${noun} לא ${adjective}`;
79031
79148
  }
79032
79149
  case "not_multiple_of":
79033
79150
  return `מספר לא תקין: חייב להיות מכפלה של ${issue3.divisor}`;
79034
79151
  case "unrecognized_keys":
79035
79152
  return `מפתח${issue3.keys.length > 1 ? "ות" : ""} לא מזוה${issue3.keys.length > 1 ? "ים" : "ה"}: ${joinValues2(issue3.keys, ", ")}`;
79036
- case "invalid_key":
79037
- return `מפתח לא תקין ב${issue3.origin}`;
79153
+ case "invalid_key": {
79154
+ return `שדה לא תקין באובייקט`;
79155
+ }
79038
79156
  case "invalid_union":
79039
79157
  return "קלט לא תקין";
79040
- case "invalid_element":
79041
- return `ערך לא תקין ב${issue3.origin}`;
79158
+ case "invalid_element": {
79159
+ const place = withDefinite(issue3.origin ?? "array");
79160
+ return `ערך לא תקין ב${place}`;
79161
+ }
79042
79162
  default:
79043
79163
  return `קלט לא תקין`;
79044
79164
  }
@@ -80462,10 +80582,10 @@ function ms_default2() {
80462
80582
  // ../../node_modules/zod/v4/locales/nl.js
80463
80583
  var error73 = () => {
80464
80584
  const Sizable = {
80465
- string: { unit: "tekens" },
80466
- file: { unit: "bytes" },
80467
- array: { unit: "elementen" },
80468
- set: { unit: "elementen" }
80585
+ string: { unit: "tekens", verb: "te hebben" },
80586
+ file: { unit: "bytes", verb: "te hebben" },
80587
+ array: { unit: "elementen", verb: "te hebben" },
80588
+ set: { unit: "elementen", verb: "te hebben" }
80469
80589
  };
80470
80590
  function getSizing(origin) {
80471
80591
  return Sizable[origin] ?? null;
@@ -80532,16 +80652,16 @@ var error73 = () => {
80532
80652
  const adj = issue3.inclusive ? "<=" : "<";
80533
80653
  const sizing = getSizing(issue3.origin);
80534
80654
  if (sizing)
80535
- return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`;
80536
- return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`;
80655
+ return `Te groot: verwacht dat ${issue3.origin ?? "waarde"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"}`;
80656
+ return `Te groot: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`;
80537
80657
  }
80538
80658
  case "too_small": {
80539
80659
  const adj = issue3.inclusive ? ">=" : ">";
80540
80660
  const sizing = getSizing(issue3.origin);
80541
80661
  if (sizing) {
80542
- return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} bevat`;
80662
+ return `Te klein: verwacht dat ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
80543
80663
  }
80544
- return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`;
80664
+ return `Te klein: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`;
80545
80665
  }
80546
80666
  case "invalid_format": {
80547
80667
  const _issue = issue3;
@@ -82614,6 +82734,7 @@ function yo_default2() {
82614
82734
  };
82615
82735
  }
82616
82736
  // ../../node_modules/zod/v4/core/registries.js
82737
+ var _a19;
82617
82738
  var $output2 = Symbol("ZodOutput");
82618
82739
  var $input2 = Symbol("ZodInput");
82619
82740
 
@@ -82663,7 +82784,8 @@ class $ZodRegistry2 {
82663
82784
  function registry2() {
82664
82785
  return new $ZodRegistry2;
82665
82786
  }
82666
- var globalRegistry2 = /* @__PURE__ */ registry2();
82787
+ (_a19 = globalThis).__zod_globalRegistry ?? (_a19.__zod_globalRegistry = registry2());
82788
+ var globalRegistry2 = globalThis.__zod_globalRegistry;
82667
82789
  // ../../node_modules/zod/v4/core/api.js
82668
82790
  function _string2(Class3, params) {
82669
82791
  return new Class3({
@@ -82825,6 +82947,15 @@ function _ipv62(Class3, params) {
82825
82947
  ...normalizeParams2(params)
82826
82948
  });
82827
82949
  }
82950
+ function _mac(Class3, params) {
82951
+ return new Class3({
82952
+ type: "string",
82953
+ format: "mac",
82954
+ check: "string_format",
82955
+ abort: false,
82956
+ ...normalizeParams2(params)
82957
+ });
82958
+ }
82828
82959
  function _cidrv42(Class3, params) {
82829
82960
  return new Class3({
82830
82961
  type: "string",
@@ -83258,6 +83389,9 @@ function _toLowerCase2() {
83258
83389
  function _toUpperCase2() {
83259
83390
  return _overwrite2((input) => input.toUpperCase());
83260
83391
  }
83392
+ function _slugify() {
83393
+ return _overwrite2((input) => slugify(input));
83394
+ }
83261
83395
  function _array2(Class3, element, params) {
83262
83396
  return new Class3({
83263
83397
  type: "array",
@@ -83476,6 +83610,28 @@ function _check2(fn, params) {
83476
83610
  ch._zod.check = fn;
83477
83611
  return ch;
83478
83612
  }
83613
+ function describe(description) {
83614
+ const ch = new $ZodCheck2({ check: "describe" });
83615
+ ch._zod.onattach = [
83616
+ (inst) => {
83617
+ const existing = globalRegistry2.get(inst) ?? {};
83618
+ globalRegistry2.add(inst, { ...existing, description });
83619
+ }
83620
+ ];
83621
+ ch._zod.check = () => {};
83622
+ return ch;
83623
+ }
83624
+ function meta(metadata) {
83625
+ const ch = new $ZodCheck2({ check: "meta" });
83626
+ ch._zod.onattach = [
83627
+ (inst) => {
83628
+ const existing = globalRegistry2.get(inst) ?? {};
83629
+ globalRegistry2.add(inst, { ...existing, ...metadata });
83630
+ }
83631
+ ];
83632
+ ch._zod.check = () => {};
83633
+ return ch;
83634
+ }
83479
83635
  function _stringbool2(Classes, _params) {
83480
83636
  const params = normalizeParams2(_params);
83481
83637
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
@@ -83769,11 +83925,16 @@ class JSONSchemaGenerator2 {
83769
83925
  }
83770
83926
  case "union": {
83771
83927
  const json2 = _json;
83928
+ const isDiscriminated = def.discriminator !== undefined;
83772
83929
  const options = def.options.map((x, i) => this.process(x, {
83773
83930
  ...params,
83774
- path: [...params.path, "anyOf", i]
83931
+ path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i]
83775
83932
  }));
83776
- json2.anyOf = options;
83933
+ if (isDiscriminated) {
83934
+ json2.oneOf = options;
83935
+ } else {
83936
+ json2.anyOf = options;
83937
+ }
83777
83938
  break;
83778
83939
  }
83779
83940
  case "intersection": {
@@ -84049,9 +84210,9 @@ class JSONSchemaGenerator2 {
84049
84210
  }
84050
84211
  }
84051
84212
  }
84052
- const meta = this.metadataRegistry.get(schema);
84053
- if (meta)
84054
- Object.assign(result.schema, meta);
84213
+ const meta2 = this.metadataRegistry.get(schema);
84214
+ if (meta2)
84215
+ Object.assign(result.schema, meta2);
84055
84216
  if (this.io === "input" && isTransforming2(schema)) {
84056
84217
  delete result.schema.examples;
84057
84218
  delete result.schema.default;
@@ -84251,100 +84412,51 @@ function isTransforming2(_schema, _ctx) {
84251
84412
  if (ctx.seen.has(_schema))
84252
84413
  return false;
84253
84414
  ctx.seen.add(_schema);
84254
- const schema = _schema;
84255
- const def = schema._zod.def;
84256
- switch (def.type) {
84257
- case "string":
84258
- case "number":
84259
- case "bigint":
84260
- case "boolean":
84261
- case "date":
84262
- case "symbol":
84263
- case "undefined":
84264
- case "null":
84265
- case "any":
84266
- case "unknown":
84267
- case "never":
84268
- case "void":
84269
- case "literal":
84270
- case "enum":
84271
- case "nan":
84272
- case "file":
84273
- case "template_literal":
84274
- return false;
84275
- case "array": {
84276
- return isTransforming2(def.element, ctx);
84277
- }
84278
- case "object": {
84279
- for (const key in def.shape) {
84280
- if (isTransforming2(def.shape[key], ctx))
84281
- return true;
84282
- }
84283
- return false;
84284
- }
84285
- case "union": {
84286
- for (const option of def.options) {
84287
- if (isTransforming2(option, ctx))
84288
- return true;
84289
- }
84290
- return false;
84291
- }
84292
- case "intersection": {
84293
- return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
84294
- }
84295
- case "tuple": {
84296
- for (const item of def.items) {
84297
- if (isTransforming2(item, ctx))
84298
- return true;
84299
- }
84300
- if (def.rest && isTransforming2(def.rest, ctx))
84415
+ const def = _schema._zod.def;
84416
+ if (def.type === "transform")
84417
+ return true;
84418
+ if (def.type === "array")
84419
+ return isTransforming2(def.element, ctx);
84420
+ if (def.type === "set")
84421
+ return isTransforming2(def.valueType, ctx);
84422
+ if (def.type === "lazy")
84423
+ return isTransforming2(def.getter(), ctx);
84424
+ if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
84425
+ return isTransforming2(def.innerType, ctx);
84426
+ }
84427
+ if (def.type === "intersection") {
84428
+ return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
84429
+ }
84430
+ if (def.type === "record" || def.type === "map") {
84431
+ return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84432
+ }
84433
+ if (def.type === "pipe") {
84434
+ return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
84435
+ }
84436
+ if (def.type === "object") {
84437
+ for (const key in def.shape) {
84438
+ if (isTransforming2(def.shape[key], ctx))
84301
84439
  return true;
84302
- return false;
84303
- }
84304
- case "record": {
84305
- return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84306
- }
84307
- case "map": {
84308
- return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84309
- }
84310
- case "set": {
84311
- return isTransforming2(def.valueType, ctx);
84312
- }
84313
- case "promise":
84314
- case "optional":
84315
- case "nonoptional":
84316
- case "nullable":
84317
- case "readonly":
84318
- return isTransforming2(def.innerType, ctx);
84319
- case "lazy":
84320
- return isTransforming2(def.getter(), ctx);
84321
- case "default": {
84322
- return isTransforming2(def.innerType, ctx);
84323
84440
  }
84324
- case "prefault": {
84325
- return isTransforming2(def.innerType, ctx);
84441
+ return false;
84442
+ }
84443
+ if (def.type === "union") {
84444
+ for (const option of def.options) {
84445
+ if (isTransforming2(option, ctx))
84446
+ return true;
84326
84447
  }
84327
- case "custom": {
84328
- return false;
84448
+ return false;
84449
+ }
84450
+ if (def.type === "tuple") {
84451
+ for (const item of def.items) {
84452
+ if (isTransforming2(item, ctx))
84453
+ return true;
84329
84454
  }
84330
- case "transform": {
84455
+ if (def.rest && isTransforming2(def.rest, ctx))
84331
84456
  return true;
84332
- }
84333
- case "pipe": {
84334
- return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
84335
- }
84336
- case "success": {
84337
- return false;
84338
- }
84339
- case "catch": {
84340
- return false;
84341
- }
84342
- case "function": {
84343
- return false;
84344
- }
84345
- default:
84457
+ return false;
84346
84458
  }
84347
- throw new Error(`Unknown schema type: ${def.type}`);
84459
+ return false;
84348
84460
  }
84349
84461
  // ../../node_modules/zod/v4/core/json-schema.js
84350
84462
  var exports_json_schema2 = {};
@@ -84454,8 +84566,8 @@ var ZodType3 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
84454
84566
  };
84455
84567
  inst.clone = (def2, params) => clone2(inst, def2, params);
84456
84568
  inst.brand = () => inst;
84457
- inst.register = (reg, meta) => {
84458
- reg.add(inst, meta);
84569
+ inst.register = (reg, meta2) => {
84570
+ reg.add(inst, meta2);
84459
84571
  return inst;
84460
84572
  };
84461
84573
  inst.parse = (data, params) => parse7(inst, data, params, { callee: inst.parse });
@@ -84531,6 +84643,7 @@ var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => {
84531
84643
  inst.normalize = (...args) => inst.check(_normalize2(...args));
84532
84644
  inst.toLowerCase = () => inst.check(_toLowerCase2());
84533
84645
  inst.toUpperCase = () => inst.check(_toUpperCase2());
84646
+ inst.slugify = () => inst.check(_slugify());
84534
84647
  });
84535
84648
  var ZodString3 = /* @__PURE__ */ $constructor2("ZodString", (inst, def) => {
84536
84649
  $ZodString2.init(inst, def);
@@ -84670,6 +84783,13 @@ var ZodIPv42 = /* @__PURE__ */ $constructor2("ZodIPv4", (inst, def) => {
84670
84783
  function ipv44(params) {
84671
84784
  return _ipv42(ZodIPv42, params);
84672
84785
  }
84786
+ var ZodMAC = /* @__PURE__ */ $constructor2("ZodMAC", (inst, def) => {
84787
+ $ZodMAC.init(inst, def);
84788
+ ZodStringFormat2.init(inst, def);
84789
+ });
84790
+ function mac2(params) {
84791
+ return _mac(ZodMAC, params);
84792
+ }
84673
84793
  var ZodIPv62 = /* @__PURE__ */ $constructor2("ZodIPv6", (inst, def) => {
84674
84794
  $ZodIPv62.init(inst, def);
84675
84795
  ZodStringFormat2.init(inst, def);
@@ -85378,6 +85498,8 @@ function refine2(fn, _params = {}) {
85378
85498
  function superRefine2(fn) {
85379
85499
  return _superRefine2(fn);
85380
85500
  }
85501
+ var describe2 = describe;
85502
+ var meta2 = meta;
85381
85503
  function _instanceof2(cls, params = {
85382
85504
  error: `Input not instance of ${cls.name}`
85383
85505
  }) {
@@ -89371,7 +89493,7 @@ function withUserAgentSuffix3(headers, ...userAgentSuffixParts) {
89371
89493
  normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
89372
89494
  return Object.fromEntries(normalizedHeaders.entries());
89373
89495
  }
89374
- var VERSION8 = "3.0.17";
89496
+ var VERSION8 = "3.0.18";
89375
89497
  function loadApiKey3({
89376
89498
  apiKey,
89377
89499
  environmentVariableName,
@@ -90893,7 +91015,7 @@ function withoutTrailingSlash3(url3) {
90893
91015
  }
90894
91016
 
90895
91017
  // ../../node_modules/@ai-sdk/google/dist/index.mjs
90896
- var VERSION9 = "2.0.42";
91018
+ var VERSION9 = "2.0.44";
90897
91019
  var googleErrorDataSchema2 = lazySchema3(() => zodSchema3(exports_external2.object({
90898
91020
  error: exports_external2.object({
90899
91021
  code: exports_external2.number().nullable(),
@@ -91979,7 +92101,7 @@ function extractSources2({
91979
92101
  groundingMetadata,
91980
92102
  generateId: generateId32
91981
92103
  }) {
91982
- var _a16, _b8, _c;
92104
+ var _a16, _b8, _c, _d;
91983
92105
  if (!(groundingMetadata == null ? undefined : groundingMetadata.groundingChunks)) {
91984
92106
  return;
91985
92107
  }
@@ -91995,7 +92117,8 @@ function extractSources2({
91995
92117
  });
91996
92118
  } else if (chunk.retrievedContext != null) {
91997
92119
  const uri = chunk.retrievedContext.uri;
91998
- if (uri.startsWith("http://") || uri.startsWith("https://")) {
92120
+ const fileSearchStore = chunk.retrievedContext.fileSearchStore;
92121
+ if (uri && (uri.startsWith("http://") || uri.startsWith("https://"))) {
91999
92122
  sources.push({
92000
92123
  type: "source",
92001
92124
  sourceType: "url",
@@ -92003,7 +92126,7 @@ function extractSources2({
92003
92126
  url: uri,
92004
92127
  title: (_b8 = chunk.retrievedContext.title) != null ? _b8 : undefined
92005
92128
  });
92006
- } else {
92129
+ } else if (uri) {
92007
92130
  const title = (_c = chunk.retrievedContext.title) != null ? _c : "Unknown Document";
92008
92131
  let mediaType = "application/octet-stream";
92009
92132
  let filename = undefined;
@@ -92033,6 +92156,16 @@ function extractSources2({
92033
92156
  title,
92034
92157
  filename
92035
92158
  });
92159
+ } else if (fileSearchStore) {
92160
+ const title = (_d = chunk.retrievedContext.title) != null ? _d : "Unknown Document";
92161
+ sources.push({
92162
+ type: "source",
92163
+ sourceType: "document",
92164
+ id: generateId32(),
92165
+ mediaType: "application/octet-stream",
92166
+ title,
92167
+ filename: fileSearchStore.split("/").pop()
92168
+ });
92036
92169
  }
92037
92170
  }
92038
92171
  }
@@ -92045,9 +92178,10 @@ var getGroundingMetadataSchema2 = () => exports_external2.object({
92045
92178
  groundingChunks: exports_external2.array(exports_external2.object({
92046
92179
  web: exports_external2.object({ uri: exports_external2.string(), title: exports_external2.string().nullish() }).nullish(),
92047
92180
  retrievedContext: exports_external2.object({
92048
- uri: exports_external2.string(),
92181
+ uri: exports_external2.string().nullish(),
92049
92182
  title: exports_external2.string().nullish(),
92050
- text: exports_external2.string().nullish()
92183
+ text: exports_external2.string().nullish(),
92184
+ fileSearchStore: exports_external2.string().nullish()
92051
92185
  }).nullish()
92052
92186
  })).nullish(),
92053
92187
  groundingSupports: exports_external2.array(exports_external2.object({
@@ -96289,7 +96423,7 @@ var __spreadValues = (a, b) => {
96289
96423
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
96290
96424
  var marker19 = "vercel.ai.error";
96291
96425
  var symbol20 = Symbol.for(marker19);
96292
- var _a19;
96426
+ var _a20;
96293
96427
  var _AISDKError5 = class _AISDKError22 extends Error {
96294
96428
  constructor({
96295
96429
  name: name143,
@@ -96297,7 +96431,7 @@ var _AISDKError5 = class _AISDKError22 extends Error {
96297
96431
  cause
96298
96432
  }) {
96299
96433
  super(message);
96300
- this[_a19] = true;
96434
+ this[_a20] = true;
96301
96435
  this.name = name143;
96302
96436
  this.cause = cause;
96303
96437
  }
@@ -96309,7 +96443,7 @@ var _AISDKError5 = class _AISDKError22 extends Error {
96309
96443
  return error91 != null && typeof error91 === "object" && markerSymbol in error91 && typeof error91[markerSymbol] === "boolean" && error91[markerSymbol] === true;
96310
96444
  }
96311
96445
  };
96312
- _a19 = symbol20;
96446
+ _a20 = symbol20;
96313
96447
  var AISDKError3 = _AISDKError5;
96314
96448
  var name18 = "AI_APICallError";
96315
96449
  var marker25 = `vercel.ai.error.${name18}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli",
3
- "version": "0.9.67",
3
+ "version": "0.9.68",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",
@@ -17,27 +17,27 @@
17
17
  "build": "bun build src/index.ts --outdir dist --target node"
18
18
  },
19
19
  "dependencies": {
20
- "@ai-sdk/anthropic": "^2.0.40",
21
- "@ai-sdk/deepseek": "^1.0.28",
22
- "@ai-sdk/google": "^2.0.42",
23
- "@ai-sdk/google-vertex": "^3.0.71",
24
- "@ai-sdk/openai": "^2.0.69",
20
+ "@ai-sdk/anthropic": "^2.0.50",
21
+ "@ai-sdk/deepseek": "^1.0.30",
22
+ "@ai-sdk/google": "^2.0.44",
23
+ "@ai-sdk/google-vertex": "^3.0.81",
24
+ "@ai-sdk/openai": "^2.0.74",
25
25
  "@ai-sdk/provider": "^2.0.0",
26
- "@ai-sdk/provider-utils": "^3.0.15",
26
+ "@ai-sdk/provider-utils": "^3.0.18",
27
27
  "@inquirer/prompts": "^7.10.1",
28
- "@openrouter/ai-sdk-provider": "^1.2.3",
29
- "@polka-codes/cli-shared": "0.9.63",
30
- "@polka-codes/core": "0.9.63",
31
- "ai": "^5.0.97",
28
+ "@openrouter/ai-sdk-provider": "^1.2.8",
29
+ "@polka-codes/cli-shared": "0.9.67",
30
+ "@polka-codes/core": "0.9.67",
31
+ "ai": "^5.0.104",
32
32
  "chalk": "^5.6.2",
33
33
  "commander": "^14.0.2",
34
34
  "dotenv": "^17.2.3",
35
35
  "lodash-es": "^4.17.21",
36
- "mime-types": "^3.0.1",
36
+ "mime-types": "^3.0.2",
37
37
  "ollama-ai-provider-v2": "^1.5.5",
38
38
  "ora": "^9.0.0",
39
39
  "yaml": "^2.8.1",
40
- "zod": "^4.1.12"
40
+ "zod": "^4.1.13"
41
41
  },
42
42
  "files": [
43
43
  "dist",