@myxtra/microservice 0.2.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +717 -517
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -24,6 +24,65 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
+ // ../../node_modules/zod-to-json-schema/dist/cjs/errorMessages.js
28
+ var require_errorMessages = __commonJS({
29
+ "../../node_modules/zod-to-json-schema/dist/cjs/errorMessages.js"(exports) {
30
+ "use strict";
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.setResponseValueAndErrors = exports.addErrorMessage = void 0;
33
+ function addErrorMessage(res, key, errorMessage, refs) {
34
+ if (!refs?.errorMessages)
35
+ return;
36
+ if (errorMessage) {
37
+ res.errorMessage = {
38
+ ...res.errorMessage,
39
+ [key]: errorMessage
40
+ };
41
+ }
42
+ }
43
+ exports.addErrorMessage = addErrorMessage;
44
+ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
45
+ res[key] = value;
46
+ addErrorMessage(res, key, errorMessage, refs);
47
+ }
48
+ exports.setResponseValueAndErrors = setResponseValueAndErrors;
49
+ }
50
+ });
51
+
52
+ // ../../node_modules/zod-to-json-schema/dist/cjs/Options.js
53
+ var require_Options = __commonJS({
54
+ "../../node_modules/zod-to-json-schema/dist/cjs/Options.js"(exports) {
55
+ "use strict";
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.getDefaultOptions = exports.defaultOptions = void 0;
58
+ exports.defaultOptions = {
59
+ name: void 0,
60
+ $refStrategy: "root",
61
+ basePath: ["#"],
62
+ effectStrategy: "input",
63
+ pipeStrategy: "all",
64
+ dateStrategy: "string",
65
+ mapStrategy: "entries",
66
+ definitionPath: "definitions",
67
+ target: "jsonSchema7",
68
+ strictUnions: false,
69
+ definitions: {},
70
+ errorMessages: false,
71
+ markdownDescription: false,
72
+ patternStrategy: "escape",
73
+ emailStrategy: "format:email"
74
+ };
75
+ var getDefaultOptions = (options) => typeof options === "string" ? {
76
+ ...exports.defaultOptions,
77
+ name: options
78
+ } : {
79
+ ...exports.defaultOptions,
80
+ ...options
81
+ };
82
+ exports.getDefaultOptions = getDefaultOptions;
83
+ }
84
+ });
85
+
27
86
  // ../../node_modules/zod/lib/helpers/util.js
28
87
  var require_util = __commonJS({
29
88
  "../../node_modules/zod/lib/helpers/util.js"(exports) {
@@ -3899,9 +3958,9 @@ var require_lib = __commonJS({
3899
3958
  }
3900
3959
  });
3901
3960
 
3902
- // ../../node_modules/zod-to-json-schema/src/parsers/any.js
3961
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/any.js
3903
3962
  var require_any = __commonJS({
3904
- "../../node_modules/zod-to-json-schema/src/parsers/any.js"(exports) {
3963
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/any.js"(exports) {
3905
3964
  "use strict";
3906
3965
  Object.defineProperty(exports, "__esModule", { value: true });
3907
3966
  exports.parseAnyDef = void 0;
@@ -3912,54 +3971,34 @@ var require_any = __commonJS({
3912
3971
  }
3913
3972
  });
3914
3973
 
3915
- // ../../node_modules/zod-to-json-schema/src/errorMessages.js
3916
- var require_errorMessages = __commonJS({
3917
- "../../node_modules/zod-to-json-schema/src/errorMessages.js"(exports) {
3918
- "use strict";
3919
- Object.defineProperty(exports, "__esModule", { value: true });
3920
- exports.setResponseValueAndErrors = exports.addErrorMessage = void 0;
3921
- function addErrorMessage(res, key, errorMessage, refs) {
3922
- if (!(refs === null || refs === void 0 ? void 0 : refs.errorMessages))
3923
- return;
3924
- if (errorMessage) {
3925
- res.errorMessage = Object.assign(Object.assign({}, res.errorMessage), { [key]: errorMessage });
3926
- }
3927
- }
3928
- exports.addErrorMessage = addErrorMessage;
3929
- function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
3930
- res[key] = value;
3931
- addErrorMessage(res, key, errorMessage, refs);
3932
- }
3933
- exports.setResponseValueAndErrors = setResponseValueAndErrors;
3934
- }
3935
- });
3936
-
3937
- // ../../node_modules/zod-to-json-schema/src/parsers/array.js
3974
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/array.js
3938
3975
  var require_array = __commonJS({
3939
- "../../node_modules/zod-to-json-schema/src/parsers/array.js"(exports) {
3976
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/array.js"(exports) {
3940
3977
  "use strict";
3941
3978
  Object.defineProperty(exports, "__esModule", { value: true });
3942
3979
  exports.parseArrayDef = void 0;
3943
3980
  var zod_1 = require_lib();
3944
- var errorMessages_1 = require_errorMessages();
3945
- var parseDef_1 = require_parseDef();
3981
+ var errorMessages_js_1 = require_errorMessages();
3982
+ var parseDef_js_1 = require_parseDef();
3946
3983
  function parseArrayDef(def, refs) {
3947
- var _a, _b;
3948
3984
  const res = {
3949
3985
  type: "array"
3950
3986
  };
3951
- if (((_b = (_a = def.type) === null || _a === void 0 ? void 0 : _a._def) === null || _b === void 0 ? void 0 : _b.typeName) !== zod_1.ZodFirstPartyTypeKind.ZodAny) {
3952
- res.items = (0, parseDef_1.parseDef)(def.type._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items"] }));
3987
+ if (def.type?._def?.typeName !== zod_1.ZodFirstPartyTypeKind.ZodAny) {
3988
+ res.items = (0, parseDef_js_1.parseDef)(def.type._def, {
3989
+ ...refs,
3990
+ currentPath: [...refs.currentPath, "items"]
3991
+ });
3953
3992
  }
3954
3993
  if (def.minLength) {
3955
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minItems", def.minLength.value, def.minLength.message, refs);
3994
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minItems", def.minLength.value, def.minLength.message, refs);
3956
3995
  }
3957
3996
  if (def.maxLength) {
3958
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
3997
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
3959
3998
  }
3960
3999
  if (def.exactLength) {
3961
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
3962
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
4000
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
4001
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
3963
4002
  }
3964
4003
  return res;
3965
4004
  }
@@ -3967,13 +4006,13 @@ var require_array = __commonJS({
3967
4006
  }
3968
4007
  });
3969
4008
 
3970
- // ../../node_modules/zod-to-json-schema/src/parsers/bigint.js
4009
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/bigint.js
3971
4010
  var require_bigint = __commonJS({
3972
- "../../node_modules/zod-to-json-schema/src/parsers/bigint.js"(exports) {
4011
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/bigint.js"(exports) {
3973
4012
  "use strict";
3974
4013
  Object.defineProperty(exports, "__esModule", { value: true });
3975
4014
  exports.parseBigintDef = void 0;
3976
- var errorMessages_1 = require_errorMessages();
4015
+ var errorMessages_js_1 = require_errorMessages();
3977
4016
  function parseBigintDef(def, refs) {
3978
4017
  const res = {
3979
4018
  type: "integer",
@@ -3986,33 +4025,33 @@ var require_bigint = __commonJS({
3986
4025
  case "min":
3987
4026
  if (refs.target === "jsonSchema7") {
3988
4027
  if (check.inclusive) {
3989
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4028
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
3990
4029
  } else {
3991
- (0, errorMessages_1.setResponseValueAndErrors)(res, "exclusiveMinimum", check.value, check.message, refs);
4030
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "exclusiveMinimum", check.value, check.message, refs);
3992
4031
  }
3993
4032
  } else {
3994
4033
  if (!check.inclusive) {
3995
4034
  res.exclusiveMinimum = true;
3996
4035
  }
3997
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4036
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
3998
4037
  }
3999
4038
  break;
4000
4039
  case "max":
4001
4040
  if (refs.target === "jsonSchema7") {
4002
4041
  if (check.inclusive) {
4003
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4042
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4004
4043
  } else {
4005
- (0, errorMessages_1.setResponseValueAndErrors)(res, "exclusiveMaximum", check.value, check.message, refs);
4044
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "exclusiveMaximum", check.value, check.message, refs);
4006
4045
  }
4007
4046
  } else {
4008
4047
  if (!check.inclusive) {
4009
4048
  res.exclusiveMaximum = true;
4010
4049
  }
4011
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4050
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4012
4051
  }
4013
4052
  break;
4014
4053
  case "multipleOf":
4015
- (0, errorMessages_1.setResponseValueAndErrors)(res, "multipleOf", check.value, check.message, refs);
4054
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "multipleOf", check.value, check.message, refs);
4016
4055
  break;
4017
4056
  }
4018
4057
  }
@@ -4022,9 +4061,9 @@ var require_bigint = __commonJS({
4022
4061
  }
4023
4062
  });
4024
4063
 
4025
- // ../../node_modules/zod-to-json-schema/src/parsers/boolean.js
4064
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/boolean.js
4026
4065
  var require_boolean = __commonJS({
4027
- "../../node_modules/zod-to-json-schema/src/parsers/boolean.js"(exports) {
4066
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/boolean.js"(exports) {
4028
4067
  "use strict";
4029
4068
  Object.defineProperty(exports, "__esModule", { value: true });
4030
4069
  exports.parseBooleanDef = void 0;
@@ -4037,41 +4076,41 @@ var require_boolean = __commonJS({
4037
4076
  }
4038
4077
  });
4039
4078
 
4040
- // ../../node_modules/zod-to-json-schema/src/parsers/branded.js
4079
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/branded.js
4041
4080
  var require_branded = __commonJS({
4042
- "../../node_modules/zod-to-json-schema/src/parsers/branded.js"(exports) {
4081
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/branded.js"(exports) {
4043
4082
  "use strict";
4044
4083
  Object.defineProperty(exports, "__esModule", { value: true });
4045
4084
  exports.parseBrandedDef = void 0;
4046
- var parseDef_1 = require_parseDef();
4085
+ var parseDef_js_1 = require_parseDef();
4047
4086
  function parseBrandedDef(_def, refs) {
4048
- return (0, parseDef_1.parseDef)(_def.type._def, refs);
4087
+ return (0, parseDef_js_1.parseDef)(_def.type._def, refs);
4049
4088
  }
4050
4089
  exports.parseBrandedDef = parseBrandedDef;
4051
4090
  }
4052
4091
  });
4053
4092
 
4054
- // ../../node_modules/zod-to-json-schema/src/parsers/catch.js
4093
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/catch.js
4055
4094
  var require_catch = __commonJS({
4056
- "../../node_modules/zod-to-json-schema/src/parsers/catch.js"(exports) {
4095
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/catch.js"(exports) {
4057
4096
  "use strict";
4058
4097
  Object.defineProperty(exports, "__esModule", { value: true });
4059
4098
  exports.parseCatchDef = void 0;
4060
- var parseDef_1 = require_parseDef();
4099
+ var parseDef_js_1 = require_parseDef();
4061
4100
  var parseCatchDef = (def, refs) => {
4062
- return (0, parseDef_1.parseDef)(def.innerType._def, refs);
4101
+ return (0, parseDef_js_1.parseDef)(def.innerType._def, refs);
4063
4102
  };
4064
4103
  exports.parseCatchDef = parseCatchDef;
4065
4104
  }
4066
4105
  });
4067
4106
 
4068
- // ../../node_modules/zod-to-json-schema/src/parsers/date.js
4107
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/date.js
4069
4108
  var require_date = __commonJS({
4070
- "../../node_modules/zod-to-json-schema/src/parsers/date.js"(exports) {
4109
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/date.js"(exports) {
4071
4110
  "use strict";
4072
4111
  Object.defineProperty(exports, "__esModule", { value: true });
4073
4112
  exports.parseDateDef = void 0;
4074
- var errorMessages_1 = require_errorMessages();
4113
+ var errorMessages_js_1 = require_errorMessages();
4075
4114
  function parseDateDef(def, refs) {
4076
4115
  if (refs.dateStrategy == "integer") {
4077
4116
  return integerDateParser(def, refs);
@@ -4092,7 +4131,7 @@ var require_date = __commonJS({
4092
4131
  switch (check.kind) {
4093
4132
  case "min":
4094
4133
  if (refs.target === "jsonSchema7") {
4095
- (0, errorMessages_1.setResponseValueAndErrors)(
4134
+ (0, errorMessages_js_1.setResponseValueAndErrors)(
4096
4135
  res,
4097
4136
  "minimum",
4098
4137
  check.value,
@@ -4104,7 +4143,7 @@ var require_date = __commonJS({
4104
4143
  break;
4105
4144
  case "max":
4106
4145
  if (refs.target === "jsonSchema7") {
4107
- (0, errorMessages_1.setResponseValueAndErrors)(
4146
+ (0, errorMessages_js_1.setResponseValueAndErrors)(
4108
4147
  res,
4109
4148
  "maximum",
4110
4149
  check.value,
@@ -4121,37 +4160,40 @@ var require_date = __commonJS({
4121
4160
  }
4122
4161
  });
4123
4162
 
4124
- // ../../node_modules/zod-to-json-schema/src/parsers/default.js
4163
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/default.js
4125
4164
  var require_default = __commonJS({
4126
- "../../node_modules/zod-to-json-schema/src/parsers/default.js"(exports) {
4165
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/default.js"(exports) {
4127
4166
  "use strict";
4128
4167
  Object.defineProperty(exports, "__esModule", { value: true });
4129
4168
  exports.parseDefaultDef = void 0;
4130
- var parseDef_1 = require_parseDef();
4169
+ var parseDef_js_1 = require_parseDef();
4131
4170
  function parseDefaultDef(_def, refs) {
4132
- return Object.assign(Object.assign({}, (0, parseDef_1.parseDef)(_def.innerType._def, refs)), { default: _def.defaultValue() });
4171
+ return {
4172
+ ...(0, parseDef_js_1.parseDef)(_def.innerType._def, refs),
4173
+ default: _def.defaultValue()
4174
+ };
4133
4175
  }
4134
4176
  exports.parseDefaultDef = parseDefaultDef;
4135
4177
  }
4136
4178
  });
4137
4179
 
4138
- // ../../node_modules/zod-to-json-schema/src/parsers/effects.js
4180
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/effects.js
4139
4181
  var require_effects = __commonJS({
4140
- "../../node_modules/zod-to-json-schema/src/parsers/effects.js"(exports) {
4182
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/effects.js"(exports) {
4141
4183
  "use strict";
4142
4184
  Object.defineProperty(exports, "__esModule", { value: true });
4143
4185
  exports.parseEffectsDef = void 0;
4144
- var parseDef_1 = require_parseDef();
4186
+ var parseDef_js_1 = require_parseDef();
4145
4187
  function parseEffectsDef(_def, refs) {
4146
- return refs.effectStrategy === "input" ? (0, parseDef_1.parseDef)(_def.schema._def, refs) : {};
4188
+ return refs.effectStrategy === "input" ? (0, parseDef_js_1.parseDef)(_def.schema._def, refs) : {};
4147
4189
  }
4148
4190
  exports.parseEffectsDef = parseEffectsDef;
4149
4191
  }
4150
4192
  });
4151
4193
 
4152
- // ../../node_modules/zod-to-json-schema/src/parsers/enum.js
4194
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/enum.js
4153
4195
  var require_enum = __commonJS({
4154
- "../../node_modules/zod-to-json-schema/src/parsers/enum.js"(exports) {
4196
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/enum.js"(exports) {
4155
4197
  "use strict";
4156
4198
  Object.defineProperty(exports, "__esModule", { value: true });
4157
4199
  exports.parseEnumDef = void 0;
@@ -4165,25 +4207,13 @@ var require_enum = __commonJS({
4165
4207
  }
4166
4208
  });
4167
4209
 
4168
- // ../../node_modules/zod-to-json-schema/src/parsers/intersection.js
4210
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/intersection.js
4169
4211
  var require_intersection = __commonJS({
4170
- "../../node_modules/zod-to-json-schema/src/parsers/intersection.js"(exports) {
4212
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/intersection.js"(exports) {
4171
4213
  "use strict";
4172
- var __rest = exports && exports.__rest || function(s, e) {
4173
- var t = {};
4174
- for (var p in s)
4175
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4176
- t[p] = s[p];
4177
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
4178
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
4179
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
4180
- t[p[i]] = s[p[i]];
4181
- }
4182
- return t;
4183
- };
4184
4214
  Object.defineProperty(exports, "__esModule", { value: true });
4185
4215
  exports.parseIntersectionDef = void 0;
4186
- var parseDef_1 = require_parseDef();
4216
+ var parseDef_js_1 = require_parseDef();
4187
4217
  var isJsonSchema7AllOfType = (type) => {
4188
4218
  if ("type" in type && type.type === "string")
4189
4219
  return false;
@@ -4191,8 +4221,14 @@ var require_intersection = __commonJS({
4191
4221
  };
4192
4222
  function parseIntersectionDef(def, refs) {
4193
4223
  const allOf = [
4194
- (0, parseDef_1.parseDef)(def.left._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "allOf", "0"] })),
4195
- (0, parseDef_1.parseDef)(def.right._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "allOf", "1"] }))
4224
+ (0, parseDef_js_1.parseDef)(def.left._def, {
4225
+ ...refs,
4226
+ currentPath: [...refs.currentPath, "allOf", "0"]
4227
+ }),
4228
+ (0, parseDef_js_1.parseDef)(def.right._def, {
4229
+ ...refs,
4230
+ currentPath: [...refs.currentPath, "allOf", "1"]
4231
+ })
4196
4232
  ].filter((x) => !!x);
4197
4233
  let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
4198
4234
  const mergedAllOf = [];
@@ -4205,7 +4241,7 @@ var require_intersection = __commonJS({
4205
4241
  } else {
4206
4242
  let nestedSchema = schema;
4207
4243
  if ("additionalProperties" in schema && schema.additionalProperties === false) {
4208
- const { additionalProperties } = schema, rest = __rest(schema, ["additionalProperties"]);
4244
+ const { additionalProperties, ...rest } = schema;
4209
4245
  nestedSchema = rest;
4210
4246
  } else {
4211
4247
  unevaluatedProperties = void 0;
@@ -4213,15 +4249,18 @@ var require_intersection = __commonJS({
4213
4249
  mergedAllOf.push(nestedSchema);
4214
4250
  }
4215
4251
  });
4216
- return mergedAllOf.length ? Object.assign({ allOf: mergedAllOf }, unevaluatedProperties) : void 0;
4252
+ return mergedAllOf.length ? {
4253
+ allOf: mergedAllOf,
4254
+ ...unevaluatedProperties
4255
+ } : void 0;
4217
4256
  }
4218
4257
  exports.parseIntersectionDef = parseIntersectionDef;
4219
4258
  }
4220
4259
  });
4221
4260
 
4222
- // ../../node_modules/zod-to-json-schema/src/parsers/literal.js
4261
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/literal.js
4223
4262
  var require_literal = __commonJS({
4224
- "../../node_modules/zod-to-json-schema/src/parsers/literal.js"(exports) {
4263
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/literal.js"(exports) {
4225
4264
  "use strict";
4226
4265
  Object.defineProperty(exports, "__esModule", { value: true });
4227
4266
  exports.parseLiteralDef = void 0;
@@ -4247,16 +4286,262 @@ var require_literal = __commonJS({
4247
4286
  }
4248
4287
  });
4249
4288
 
4250
- // ../../node_modules/zod-to-json-schema/src/parsers/map.js
4289
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/string.js
4290
+ var require_string = __commonJS({
4291
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/string.js"(exports) {
4292
+ "use strict";
4293
+ Object.defineProperty(exports, "__esModule", { value: true });
4294
+ exports.parseStringDef = exports.zodPatterns = void 0;
4295
+ var errorMessages_js_1 = require_errorMessages();
4296
+ exports.zodPatterns = {
4297
+ /**
4298
+ * `c` was changed to `[cC]` to replicate /i flag
4299
+ */
4300
+ cuid: "^[cC][^\\s-]{8,}$",
4301
+ cuid2: "^[a-z][a-z0-9]*$",
4302
+ ulid: "^[0-9A-HJKMNP-TV-Z]{26}$",
4303
+ /**
4304
+ * `a-z` was added to replicate /i flag
4305
+ */
4306
+ email: "^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_+-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$",
4307
+ emoji: "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
4308
+ /**
4309
+ * Unused
4310
+ */
4311
+ uuid: "^[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}$",
4312
+ /**
4313
+ * Unused
4314
+ */
4315
+ ipv4: "^(((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}))$",
4316
+ /**
4317
+ * Unused
4318
+ */
4319
+ ipv6: "^(([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})))$"
4320
+ };
4321
+ function parseStringDef(def, refs) {
4322
+ const res = {
4323
+ type: "string"
4324
+ };
4325
+ function processPattern(value) {
4326
+ return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(value) : value;
4327
+ }
4328
+ if (def.checks) {
4329
+ for (const check of def.checks) {
4330
+ switch (check.kind) {
4331
+ case "min":
4332
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
4333
+ break;
4334
+ case "max":
4335
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
4336
+ break;
4337
+ case "email":
4338
+ switch (refs.emailStrategy) {
4339
+ case "format:email":
4340
+ addFormat(res, "email", check.message, refs);
4341
+ break;
4342
+ case "format:idn-email":
4343
+ addFormat(res, "idn-email", check.message, refs);
4344
+ break;
4345
+ case "pattern:zod":
4346
+ addPattern(res, exports.zodPatterns.email, check.message, refs);
4347
+ break;
4348
+ }
4349
+ break;
4350
+ case "url":
4351
+ addFormat(res, "uri", check.message, refs);
4352
+ break;
4353
+ case "uuid":
4354
+ addFormat(res, "uuid", check.message, refs);
4355
+ break;
4356
+ case "regex":
4357
+ addPattern(res, check.regex.source, check.message, refs);
4358
+ break;
4359
+ case "cuid":
4360
+ addPattern(res, exports.zodPatterns.cuid, check.message, refs);
4361
+ break;
4362
+ case "cuid2":
4363
+ addPattern(res, exports.zodPatterns.cuid2, check.message, refs);
4364
+ break;
4365
+ case "startsWith":
4366
+ addPattern(res, "^" + processPattern(check.value), check.message, refs);
4367
+ break;
4368
+ case "endsWith":
4369
+ addPattern(res, processPattern(check.value) + "$", check.message, refs);
4370
+ break;
4371
+ case "datetime":
4372
+ addFormat(res, "date-time", check.message, refs);
4373
+ break;
4374
+ case "length":
4375
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
4376
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
4377
+ break;
4378
+ case "includes": {
4379
+ addPattern(res, processPattern(check.value), check.message, refs);
4380
+ break;
4381
+ }
4382
+ case "ip": {
4383
+ if (check.version !== "v6") {
4384
+ addFormat(res, "ipv4", check.message, refs);
4385
+ }
4386
+ if (check.version !== "v4") {
4387
+ addFormat(res, "ipv6", check.message, refs);
4388
+ }
4389
+ break;
4390
+ }
4391
+ case "emoji":
4392
+ addPattern(res, exports.zodPatterns.emoji, check.message, refs);
4393
+ break;
4394
+ case "ulid": {
4395
+ addPattern(res, exports.zodPatterns.ulid, check.message, refs);
4396
+ break;
4397
+ }
4398
+ case "toLowerCase":
4399
+ case "toUpperCase":
4400
+ case "trim":
4401
+ break;
4402
+ default:
4403
+ /* @__PURE__ */ ((_) => {
4404
+ })(check);
4405
+ }
4406
+ }
4407
+ }
4408
+ return res;
4409
+ }
4410
+ exports.parseStringDef = parseStringDef;
4411
+ var escapeNonAlphaNumeric = (value) => Array.from(value).map((c) => /[a-zA-Z0-9]/.test(c) ? c : `\\${c}`).join("");
4412
+ var addFormat = (schema, value, message, refs) => {
4413
+ if (schema.format || schema.anyOf?.some((x) => x.format)) {
4414
+ if (!schema.anyOf) {
4415
+ schema.anyOf = [];
4416
+ }
4417
+ if (schema.format) {
4418
+ schema.anyOf.push({
4419
+ format: schema.format,
4420
+ ...schema.errorMessage && refs.errorMessages && {
4421
+ errorMessage: { format: schema.errorMessage.format }
4422
+ }
4423
+ });
4424
+ delete schema.format;
4425
+ if (schema.errorMessage) {
4426
+ delete schema.errorMessage.format;
4427
+ if (Object.keys(schema.errorMessage).length === 0) {
4428
+ delete schema.errorMessage;
4429
+ }
4430
+ }
4431
+ }
4432
+ schema.anyOf.push({
4433
+ format: value,
4434
+ ...message && refs.errorMessages && { errorMessage: { format: message } }
4435
+ });
4436
+ } else {
4437
+ (0, errorMessages_js_1.setResponseValueAndErrors)(schema, "format", value, message, refs);
4438
+ }
4439
+ };
4440
+ var addPattern = (schema, value, message, refs) => {
4441
+ if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
4442
+ if (!schema.allOf) {
4443
+ schema.allOf = [];
4444
+ }
4445
+ if (schema.pattern) {
4446
+ schema.allOf.push({
4447
+ pattern: schema.pattern,
4448
+ ...schema.errorMessage && refs.errorMessages && {
4449
+ errorMessage: { pattern: schema.errorMessage.pattern }
4450
+ }
4451
+ });
4452
+ delete schema.pattern;
4453
+ if (schema.errorMessage) {
4454
+ delete schema.errorMessage.pattern;
4455
+ if (Object.keys(schema.errorMessage).length === 0) {
4456
+ delete schema.errorMessage;
4457
+ }
4458
+ }
4459
+ }
4460
+ schema.allOf.push({
4461
+ pattern: value,
4462
+ ...message && refs.errorMessages && { errorMessage: { pattern: message } }
4463
+ });
4464
+ } else {
4465
+ (0, errorMessages_js_1.setResponseValueAndErrors)(schema, "pattern", value, message, refs);
4466
+ }
4467
+ };
4468
+ }
4469
+ });
4470
+
4471
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/record.js
4472
+ var require_record = __commonJS({
4473
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/record.js"(exports) {
4474
+ "use strict";
4475
+ Object.defineProperty(exports, "__esModule", { value: true });
4476
+ exports.parseRecordDef = void 0;
4477
+ var zod_1 = require_lib();
4478
+ var parseDef_js_1 = require_parseDef();
4479
+ var string_js_1 = require_string();
4480
+ function parseRecordDef(def, refs) {
4481
+ if (refs.target === "openApi3" && def.keyType?._def.typeName === zod_1.ZodFirstPartyTypeKind.ZodEnum) {
4482
+ return {
4483
+ type: "object",
4484
+ required: def.keyType._def.values,
4485
+ properties: def.keyType._def.values.reduce((acc, key) => ({
4486
+ ...acc,
4487
+ [key]: (0, parseDef_js_1.parseDef)(def.valueType._def, {
4488
+ ...refs,
4489
+ currentPath: [...refs.currentPath, "properties", key]
4490
+ }) ?? {}
4491
+ }), {}),
4492
+ additionalProperties: false
4493
+ };
4494
+ }
4495
+ const schema = {
4496
+ type: "object",
4497
+ additionalProperties: (0, parseDef_js_1.parseDef)(def.valueType._def, {
4498
+ ...refs,
4499
+ currentPath: [...refs.currentPath, "additionalProperties"]
4500
+ }) ?? {}
4501
+ };
4502
+ if (refs.target === "openApi3") {
4503
+ return schema;
4504
+ }
4505
+ if (def.keyType?._def.typeName === zod_1.ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
4506
+ const keyType = Object.entries((0, string_js_1.parseStringDef)(def.keyType._def, refs)).reduce((acc, [key, value]) => key === "type" ? acc : { ...acc, [key]: value }, {});
4507
+ return {
4508
+ ...schema,
4509
+ propertyNames: keyType
4510
+ };
4511
+ } else if (def.keyType?._def.typeName === zod_1.ZodFirstPartyTypeKind.ZodEnum) {
4512
+ return {
4513
+ ...schema,
4514
+ propertyNames: {
4515
+ enum: def.keyType._def.values
4516
+ }
4517
+ };
4518
+ }
4519
+ return schema;
4520
+ }
4521
+ exports.parseRecordDef = parseRecordDef;
4522
+ }
4523
+ });
4524
+
4525
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/map.js
4251
4526
  var require_map = __commonJS({
4252
- "../../node_modules/zod-to-json-schema/src/parsers/map.js"(exports) {
4527
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/map.js"(exports) {
4253
4528
  "use strict";
4254
4529
  Object.defineProperty(exports, "__esModule", { value: true });
4255
4530
  exports.parseMapDef = void 0;
4256
- var parseDef_1 = require_parseDef();
4531
+ var parseDef_js_1 = require_parseDef();
4532
+ var record_js_1 = require_record();
4257
4533
  function parseMapDef(def, refs) {
4258
- const keys = (0, parseDef_1.parseDef)(def.keyType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items", "items", "0"] })) || {};
4259
- const values = (0, parseDef_1.parseDef)(def.valueType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items", "items", "1"] })) || {};
4534
+ if (refs.mapStrategy === "record") {
4535
+ return (0, record_js_1.parseRecordDef)(def, refs);
4536
+ }
4537
+ const keys = (0, parseDef_js_1.parseDef)(def.keyType._def, {
4538
+ ...refs,
4539
+ currentPath: [...refs.currentPath, "items", "items", "0"]
4540
+ }) || {};
4541
+ const values = (0, parseDef_js_1.parseDef)(def.valueType._def, {
4542
+ ...refs,
4543
+ currentPath: [...refs.currentPath, "items", "items", "1"]
4544
+ }) || {};
4260
4545
  return {
4261
4546
  type: "array",
4262
4547
  maxItems: 125,
@@ -4272,9 +4557,9 @@ var require_map = __commonJS({
4272
4557
  }
4273
4558
  });
4274
4559
 
4275
- // ../../node_modules/zod-to-json-schema/src/parsers/nativeEnum.js
4560
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/nativeEnum.js
4276
4561
  var require_nativeEnum = __commonJS({
4277
- "../../node_modules/zod-to-json-schema/src/parsers/nativeEnum.js"(exports) {
4562
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/nativeEnum.js"(exports) {
4278
4563
  "use strict";
4279
4564
  Object.defineProperty(exports, "__esModule", { value: true });
4280
4565
  exports.parseNativeEnumDef = void 0;
@@ -4294,9 +4579,9 @@ var require_nativeEnum = __commonJS({
4294
4579
  }
4295
4580
  });
4296
4581
 
4297
- // ../../node_modules/zod-to-json-schema/src/parsers/never.js
4582
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/never.js
4298
4583
  var require_never = __commonJS({
4299
- "../../node_modules/zod-to-json-schema/src/parsers/never.js"(exports) {
4584
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/never.js"(exports) {
4300
4585
  "use strict";
4301
4586
  Object.defineProperty(exports, "__esModule", { value: true });
4302
4587
  exports.parseNeverDef = void 0;
@@ -4309,9 +4594,9 @@ var require_never = __commonJS({
4309
4594
  }
4310
4595
  });
4311
4596
 
4312
- // ../../node_modules/zod-to-json-schema/src/parsers/null.js
4597
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/null.js
4313
4598
  var require_null = __commonJS({
4314
- "../../node_modules/zod-to-json-schema/src/parsers/null.js"(exports) {
4599
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/null.js"(exports) {
4315
4600
  "use strict";
4316
4601
  Object.defineProperty(exports, "__esModule", { value: true });
4317
4602
  exports.parseNullDef = void 0;
@@ -4327,13 +4612,13 @@ var require_null = __commonJS({
4327
4612
  }
4328
4613
  });
4329
4614
 
4330
- // ../../node_modules/zod-to-json-schema/src/parsers/union.js
4615
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/union.js
4331
4616
  var require_union = __commonJS({
4332
- "../../node_modules/zod-to-json-schema/src/parsers/union.js"(exports) {
4617
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/union.js"(exports) {
4333
4618
  "use strict";
4334
4619
  Object.defineProperty(exports, "__esModule", { value: true });
4335
4620
  exports.parseUnionDef = exports.primitiveMappings = void 0;
4336
- var parseDef_1 = require_parseDef();
4621
+ var parseDef_js_1 = require_parseDef();
4337
4622
  exports.primitiveMappings = {
4338
4623
  ZodString: "string",
4339
4624
  ZodNumber: "number",
@@ -4395,53 +4680,62 @@ var require_union = __commonJS({
4395
4680
  }
4396
4681
  exports.parseUnionDef = parseUnionDef;
4397
4682
  var asAnyOf = (def, refs) => {
4398
- const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => (0, parseDef_1.parseDef)(x._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "anyOf", `${i}`] }))).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
4683
+ const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => (0, parseDef_js_1.parseDef)(x._def, {
4684
+ ...refs,
4685
+ currentPath: [...refs.currentPath, "anyOf", `${i}`]
4686
+ })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
4399
4687
  return anyOf.length ? { anyOf } : void 0;
4400
4688
  };
4401
4689
  }
4402
4690
  });
4403
4691
 
4404
- // ../../node_modules/zod-to-json-schema/src/parsers/nullable.js
4692
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/nullable.js
4405
4693
  var require_nullable = __commonJS({
4406
- "../../node_modules/zod-to-json-schema/src/parsers/nullable.js"(exports) {
4694
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/nullable.js"(exports) {
4407
4695
  "use strict";
4408
4696
  Object.defineProperty(exports, "__esModule", { value: true });
4409
4697
  exports.parseNullableDef = void 0;
4410
- var parseDef_1 = require_parseDef();
4411
- var union_1 = require_union();
4698
+ var parseDef_js_1 = require_parseDef();
4699
+ var union_js_1 = require_union();
4412
4700
  function parseNullableDef(def, refs) {
4413
4701
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
4414
4702
  if (refs.target === "openApi3") {
4415
4703
  return {
4416
- type: union_1.primitiveMappings[def.innerType._def.typeName],
4704
+ type: union_js_1.primitiveMappings[def.innerType._def.typeName],
4417
4705
  nullable: true
4418
4706
  };
4419
4707
  }
4420
4708
  return {
4421
4709
  type: [
4422
- union_1.primitiveMappings[def.innerType._def.typeName],
4710
+ union_js_1.primitiveMappings[def.innerType._def.typeName],
4423
4711
  "null"
4424
4712
  ]
4425
4713
  };
4426
4714
  }
4427
4715
  if (refs.target === "openApi3") {
4428
- const base2 = (0, parseDef_1.parseDef)(def.innerType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath] }));
4429
- return base2 && Object.assign(Object.assign({}, base2), { nullable: true });
4716
+ const base2 = (0, parseDef_js_1.parseDef)(def.innerType._def, {
4717
+ ...refs,
4718
+ currentPath: [...refs.currentPath]
4719
+ });
4720
+ return base2 && { ...base2, nullable: true };
4430
4721
  }
4431
- const base = (0, parseDef_1.parseDef)(def.innerType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "anyOf", "0"] }));
4722
+ const base = (0, parseDef_js_1.parseDef)(def.innerType._def, {
4723
+ ...refs,
4724
+ currentPath: [...refs.currentPath, "anyOf", "0"]
4725
+ });
4432
4726
  return base && { anyOf: [base, { type: "null" }] };
4433
4727
  }
4434
4728
  exports.parseNullableDef = parseNullableDef;
4435
4729
  }
4436
4730
  });
4437
4731
 
4438
- // ../../node_modules/zod-to-json-schema/src/parsers/number.js
4732
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/number.js
4439
4733
  var require_number = __commonJS({
4440
- "../../node_modules/zod-to-json-schema/src/parsers/number.js"(exports) {
4734
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/number.js"(exports) {
4441
4735
  "use strict";
4442
4736
  Object.defineProperty(exports, "__esModule", { value: true });
4443
4737
  exports.parseNumberDef = void 0;
4444
- var errorMessages_1 = require_errorMessages();
4738
+ var errorMessages_js_1 = require_errorMessages();
4445
4739
  function parseNumberDef(def, refs) {
4446
4740
  const res = {
4447
4741
  type: "number"
@@ -4452,38 +4746,38 @@ var require_number = __commonJS({
4452
4746
  switch (check.kind) {
4453
4747
  case "int":
4454
4748
  res.type = "integer";
4455
- (0, errorMessages_1.addErrorMessage)(res, "type", check.message, refs);
4749
+ (0, errorMessages_js_1.addErrorMessage)(res, "type", check.message, refs);
4456
4750
  break;
4457
4751
  case "min":
4458
4752
  if (refs.target === "jsonSchema7") {
4459
4753
  if (check.inclusive) {
4460
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4754
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4461
4755
  } else {
4462
- (0, errorMessages_1.setResponseValueAndErrors)(res, "exclusiveMinimum", check.value, check.message, refs);
4756
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "exclusiveMinimum", check.value, check.message, refs);
4463
4757
  }
4464
4758
  } else {
4465
4759
  if (!check.inclusive) {
4466
4760
  res.exclusiveMinimum = true;
4467
4761
  }
4468
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4762
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "minimum", check.value, check.message, refs);
4469
4763
  }
4470
4764
  break;
4471
4765
  case "max":
4472
4766
  if (refs.target === "jsonSchema7") {
4473
4767
  if (check.inclusive) {
4474
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4768
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4475
4769
  } else {
4476
- (0, errorMessages_1.setResponseValueAndErrors)(res, "exclusiveMaximum", check.value, check.message, refs);
4770
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "exclusiveMaximum", check.value, check.message, refs);
4477
4771
  }
4478
4772
  } else {
4479
4773
  if (!check.inclusive) {
4480
4774
  res.exclusiveMaximum = true;
4481
4775
  }
4482
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4776
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "maximum", check.value, check.message, refs);
4483
4777
  }
4484
4778
  break;
4485
4779
  case "multipleOf":
4486
- (0, errorMessages_1.setResponseValueAndErrors)(res, "multipleOf", check.value, check.message, refs);
4780
+ (0, errorMessages_js_1.setResponseValueAndErrors)(res, "multipleOf", check.value, check.message, refs);
4487
4781
  break;
4488
4782
  }
4489
4783
  }
@@ -4493,22 +4787,25 @@ var require_number = __commonJS({
4493
4787
  }
4494
4788
  });
4495
4789
 
4496
- // ../../node_modules/zod-to-json-schema/src/parsers/object.js
4790
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/object.js
4497
4791
  var require_object = __commonJS({
4498
- "../../node_modules/zod-to-json-schema/src/parsers/object.js"(exports) {
4792
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/object.js"(exports) {
4499
4793
  "use strict";
4500
4794
  Object.defineProperty(exports, "__esModule", { value: true });
4501
4795
  exports.parseObjectDef = exports.parseObjectDefX = void 0;
4502
- var parseDef_1 = require_parseDef();
4796
+ var parseDef_js_1 = require_parseDef();
4503
4797
  function parseObjectDefX(def, refs) {
4504
- var _a, _b;
4505
4798
  Object.keys(def.shape()).reduce((schema, key) => {
4506
4799
  let prop = def.shape()[key];
4507
4800
  const isOptional = prop.isOptional();
4508
4801
  if (!isOptional) {
4509
- prop = Object.assign({}, prop._def.innerSchema);
4802
+ prop = { ...prop._def.innerSchema };
4510
4803
  }
4511
- const propSchema = (0, parseDef_1.parseDef)(prop._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "properties", key], propertyPath: [...refs.currentPath, "properties", key] }));
4804
+ const propSchema = (0, parseDef_js_1.parseDef)(prop._def, {
4805
+ ...refs,
4806
+ currentPath: [...refs.currentPath, "properties", key],
4807
+ propertyPath: [...refs.currentPath, "properties", key]
4808
+ });
4512
4809
  if (propSchema !== void 0) {
4513
4810
  schema.properties[key] = propSchema;
4514
4811
  if (!isOptional) {
@@ -4522,37 +4819,61 @@ var require_object = __commonJS({
4522
4819
  }, {
4523
4820
  type: "object",
4524
4821
  properties: {},
4525
- additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (_a = (0, parseDef_1.parseDef)(def.catchall._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "additionalProperties"] }))) !== null && _a !== void 0 ? _a : true
4822
+ additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (0, parseDef_js_1.parseDef)(def.catchall._def, {
4823
+ ...refs,
4824
+ currentPath: [...refs.currentPath, "additionalProperties"]
4825
+ }) ?? true
4526
4826
  });
4527
- const result = Object.assign(Object.assign({ type: "object" }, Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
4528
- if (propDef === void 0 || propDef._def === void 0)
4529
- return acc;
4530
- const parsedDef = (0, parseDef_1.parseDef)(propDef._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "properties", propName], propertyPath: [...refs.currentPath, "properties", propName] }));
4531
- if (parsedDef === void 0)
4532
- return acc;
4533
- return {
4534
- properties: Object.assign(Object.assign({}, acc.properties), { [propName]: parsedDef }),
4535
- required: propDef.isOptional() ? acc.required : [...acc.required, propName]
4536
- };
4537
- }, { properties: {}, required: [] })), { additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (_b = (0, parseDef_1.parseDef)(def.catchall._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "additionalProperties"] }))) !== null && _b !== void 0 ? _b : true });
4827
+ const result = {
4828
+ type: "object",
4829
+ ...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
4830
+ if (propDef === void 0 || propDef._def === void 0)
4831
+ return acc;
4832
+ const parsedDef = (0, parseDef_js_1.parseDef)(propDef._def, {
4833
+ ...refs,
4834
+ currentPath: [...refs.currentPath, "properties", propName],
4835
+ propertyPath: [...refs.currentPath, "properties", propName]
4836
+ });
4837
+ if (parsedDef === void 0)
4838
+ return acc;
4839
+ return {
4840
+ properties: { ...acc.properties, [propName]: parsedDef },
4841
+ required: propDef.isOptional() ? acc.required : [...acc.required, propName]
4842
+ };
4843
+ }, { properties: {}, required: [] }),
4844
+ additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (0, parseDef_js_1.parseDef)(def.catchall._def, {
4845
+ ...refs,
4846
+ currentPath: [...refs.currentPath, "additionalProperties"]
4847
+ }) ?? true
4848
+ };
4538
4849
  if (!result.required.length)
4539
4850
  delete result.required;
4540
4851
  return result;
4541
4852
  }
4542
4853
  exports.parseObjectDefX = parseObjectDefX;
4543
4854
  function parseObjectDef(def, refs) {
4544
- var _a;
4545
- const result = Object.assign(Object.assign({ type: "object" }, Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
4546
- if (propDef === void 0 || propDef._def === void 0)
4547
- return acc;
4548
- const parsedDef = (0, parseDef_1.parseDef)(propDef._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "properties", propName], propertyPath: [...refs.currentPath, "properties", propName] }));
4549
- if (parsedDef === void 0)
4550
- return acc;
4551
- return {
4552
- properties: Object.assign(Object.assign({}, acc.properties), { [propName]: parsedDef }),
4553
- required: propDef.isOptional() ? acc.required : [...acc.required, propName]
4554
- };
4555
- }, { properties: {}, required: [] })), { additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (_a = (0, parseDef_1.parseDef)(def.catchall._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "additionalProperties"] }))) !== null && _a !== void 0 ? _a : true });
4855
+ const result = {
4856
+ type: "object",
4857
+ ...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
4858
+ if (propDef === void 0 || propDef._def === void 0)
4859
+ return acc;
4860
+ const parsedDef = (0, parseDef_js_1.parseDef)(propDef._def, {
4861
+ ...refs,
4862
+ currentPath: [...refs.currentPath, "properties", propName],
4863
+ propertyPath: [...refs.currentPath, "properties", propName]
4864
+ });
4865
+ if (parsedDef === void 0)
4866
+ return acc;
4867
+ return {
4868
+ properties: { ...acc.properties, [propName]: parsedDef },
4869
+ required: propDef.isOptional() ? acc.required : [...acc.required, propName]
4870
+ };
4871
+ }, { properties: {}, required: [] }),
4872
+ additionalProperties: def.catchall._def.typeName === "ZodNever" ? def.unknownKeys === "passthrough" : (0, parseDef_js_1.parseDef)(def.catchall._def, {
4873
+ ...refs,
4874
+ currentPath: [...refs.currentPath, "additionalProperties"]
4875
+ }) ?? true
4876
+ };
4556
4877
  if (!result.required.length)
4557
4878
  delete result.required;
4558
4879
  return result;
@@ -4561,19 +4882,21 @@ var require_object = __commonJS({
4561
4882
  }
4562
4883
  });
4563
4884
 
4564
- // ../../node_modules/zod-to-json-schema/src/parsers/optional.js
4885
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/optional.js
4565
4886
  var require_optional = __commonJS({
4566
- "../../node_modules/zod-to-json-schema/src/parsers/optional.js"(exports) {
4887
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/optional.js"(exports) {
4567
4888
  "use strict";
4568
4889
  Object.defineProperty(exports, "__esModule", { value: true });
4569
4890
  exports.parseOptionalDef = void 0;
4570
- var parseDef_1 = require_parseDef();
4891
+ var parseDef_js_1 = require_parseDef();
4571
4892
  var parseOptionalDef = (def, refs) => {
4572
- var _a;
4573
- if (refs.currentPath.toString() === ((_a = refs.propertyPath) === null || _a === void 0 ? void 0 : _a.toString())) {
4574
- return (0, parseDef_1.parseDef)(def.innerType._def, refs);
4893
+ if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
4894
+ return (0, parseDef_js_1.parseDef)(def.innerType._def, refs);
4575
4895
  }
4576
- const innerSchema = (0, parseDef_1.parseDef)(def.innerType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "anyOf", "1"] }));
4896
+ const innerSchema = (0, parseDef_js_1.parseDef)(def.innerType._def, {
4897
+ ...refs,
4898
+ currentPath: [...refs.currentPath, "anyOf", "1"]
4899
+ });
4577
4900
  return innerSchema ? {
4578
4901
  anyOf: [
4579
4902
  {
@@ -4587,19 +4910,27 @@ var require_optional = __commonJS({
4587
4910
  }
4588
4911
  });
4589
4912
 
4590
- // ../../node_modules/zod-to-json-schema/src/parsers/pipeline.js
4913
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/pipeline.js
4591
4914
  var require_pipeline = __commonJS({
4592
- "../../node_modules/zod-to-json-schema/src/parsers/pipeline.js"(exports) {
4915
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/pipeline.js"(exports) {
4593
4916
  "use strict";
4594
4917
  Object.defineProperty(exports, "__esModule", { value: true });
4595
4918
  exports.parsePipelineDef = void 0;
4596
- var parseDef_1 = require_parseDef();
4919
+ var parseDef_js_1 = require_parseDef();
4597
4920
  var parsePipelineDef = (def, refs) => {
4598
4921
  if (refs.pipeStrategy === "input") {
4599
- return (0, parseDef_1.parseDef)(def.in._def, refs);
4922
+ return (0, parseDef_js_1.parseDef)(def.in._def, refs);
4923
+ } else if (refs.pipeStrategy === "output") {
4924
+ return (0, parseDef_js_1.parseDef)(def.out._def, refs);
4600
4925
  }
4601
- const a = (0, parseDef_1.parseDef)(def.in._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "allOf", "0"] }));
4602
- const b = (0, parseDef_1.parseDef)(def.out._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"] }));
4926
+ const a = (0, parseDef_js_1.parseDef)(def.in._def, {
4927
+ ...refs,
4928
+ currentPath: [...refs.currentPath, "allOf", "0"]
4929
+ });
4930
+ const b = (0, parseDef_js_1.parseDef)(def.out._def, {
4931
+ ...refs,
4932
+ currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
4933
+ });
4603
4934
  return {
4604
4935
  allOf: [a, b].filter((x) => x !== void 0)
4605
4936
  };
@@ -4608,232 +4939,43 @@ var require_pipeline = __commonJS({
4608
4939
  }
4609
4940
  });
4610
4941
 
4611
- // ../../node_modules/zod-to-json-schema/src/parsers/promise.js
4942
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/promise.js
4612
4943
  var require_promise = __commonJS({
4613
- "../../node_modules/zod-to-json-schema/src/parsers/promise.js"(exports) {
4944
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/promise.js"(exports) {
4614
4945
  "use strict";
4615
4946
  Object.defineProperty(exports, "__esModule", { value: true });
4616
4947
  exports.parsePromiseDef = void 0;
4617
- var parseDef_1 = require_parseDef();
4948
+ var parseDef_js_1 = require_parseDef();
4618
4949
  function parsePromiseDef(def, refs) {
4619
- return (0, parseDef_1.parseDef)(def.type._def, refs);
4950
+ return (0, parseDef_js_1.parseDef)(def.type._def, refs);
4620
4951
  }
4621
4952
  exports.parsePromiseDef = parsePromiseDef;
4622
4953
  }
4623
4954
  });
4624
4955
 
4625
- // ../../node_modules/zod-to-json-schema/src/parsers/string.js
4626
- var require_string = __commonJS({
4627
- "../../node_modules/zod-to-json-schema/src/parsers/string.js"(exports) {
4628
- "use strict";
4629
- Object.defineProperty(exports, "__esModule", { value: true });
4630
- exports.parseStringDef = exports.emojiPattern = exports.ulidPattern = exports.cuid2Pattern = exports.cuidPattern = exports.emailPattern = void 0;
4631
- var errorMessages_1 = require_errorMessages();
4632
- exports.emailPattern = '^(([^<>()[\\]\\\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[(((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}))\\])|(\\[IPv6:(([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})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$';
4633
- exports.cuidPattern = "^c[^\\s-]{8,}$";
4634
- exports.cuid2Pattern = "^[a-z][a-z0-9]*$";
4635
- exports.ulidPattern = "/[0-9A-HJKMNP-TV-Z]{26}/";
4636
- exports.emojiPattern = "/^(p{Extended_Pictographic}|p{Emoji_Component})+$/u";
4637
- function parseStringDef(def, refs) {
4638
- const res = {
4639
- type: "string"
4640
- };
4641
- if (def.checks) {
4642
- for (const check of def.checks) {
4643
- switch (check.kind) {
4644
- case "min":
4645
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
4646
- break;
4647
- case "max":
4648
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
4649
- break;
4650
- case "email":
4651
- switch (refs.emailStrategy) {
4652
- case "format:email":
4653
- addFormat(res, "email", check.message, refs);
4654
- break;
4655
- case "format:idn-email":
4656
- addFormat(res, "idn-email", check.message, refs);
4657
- break;
4658
- case "pattern:zod":
4659
- addPattern(res, exports.emailPattern, check.message, refs);
4660
- break;
4661
- }
4662
- break;
4663
- case "url":
4664
- addFormat(res, "uri", check.message, refs);
4665
- break;
4666
- case "uuid":
4667
- addFormat(res, "uuid", check.message, refs);
4668
- break;
4669
- case "regex":
4670
- addPattern(res, check.regex.source, check.message, refs);
4671
- break;
4672
- case "cuid":
4673
- addPattern(res, exports.cuidPattern, check.message, refs);
4674
- break;
4675
- case "cuid2":
4676
- addPattern(res, exports.cuid2Pattern, check.message, refs);
4677
- break;
4678
- case "startsWith":
4679
- addPattern(res, "^" + escapeNonAlphaNumeric(check.value), check.message, refs);
4680
- break;
4681
- case "endsWith":
4682
- addPattern(res, escapeNonAlphaNumeric(check.value) + "$", check.message, refs);
4683
- break;
4684
- case "datetime":
4685
- addFormat(res, "date-time", check.message, refs);
4686
- break;
4687
- case "length":
4688
- (0, errorMessages_1.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
4689
- (0, errorMessages_1.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
4690
- break;
4691
- case "includes": {
4692
- addPattern(res, escapeNonAlphaNumeric(check.value), check.message, refs);
4693
- break;
4694
- }
4695
- case "ip": {
4696
- if (check.version !== "v6") {
4697
- addFormat(res, "ipv4", check.message, refs);
4698
- }
4699
- if (check.version !== "v4") {
4700
- addFormat(res, "ipv6", check.message, refs);
4701
- }
4702
- break;
4703
- }
4704
- case "emoji":
4705
- addPattern(res, exports.emojiPattern, check.message, refs);
4706
- break;
4707
- case "ulid": {
4708
- addPattern(res, exports.ulidPattern, check.message, refs);
4709
- break;
4710
- }
4711
- case "toLowerCase":
4712
- case "toUpperCase":
4713
- case "trim":
4714
- break;
4715
- default:
4716
- /* @__PURE__ */ ((_) => {
4717
- })(check);
4718
- }
4719
- }
4720
- }
4721
- return res;
4722
- }
4723
- exports.parseStringDef = parseStringDef;
4724
- var escapeNonAlphaNumeric = (value) => Array.from(value).map((c) => /[a-zA-Z0-9]/.test(c) ? c : `\\${c}`).join("");
4725
- var addFormat = (schema, value, message, refs) => {
4726
- var _a;
4727
- if (schema.format || ((_a = schema.anyOf) === null || _a === void 0 ? void 0 : _a.some((x) => x.format))) {
4728
- if (!schema.anyOf) {
4729
- schema.anyOf = [];
4730
- }
4731
- if (schema.format) {
4732
- schema.anyOf.push(Object.assign({ format: schema.format }, schema.errorMessage && refs.errorMessages && {
4733
- errorMessage: { format: schema.errorMessage.format }
4734
- }));
4735
- delete schema.format;
4736
- if (schema.errorMessage) {
4737
- delete schema.errorMessage.format;
4738
- if (Object.keys(schema.errorMessage).length === 0) {
4739
- delete schema.errorMessage;
4740
- }
4741
- }
4742
- }
4743
- schema.anyOf.push(Object.assign({ format: value }, message && refs.errorMessages && { errorMessage: { format: message } }));
4744
- } else {
4745
- (0, errorMessages_1.setResponseValueAndErrors)(schema, "format", value, message, refs);
4746
- }
4747
- };
4748
- var addPattern = (schema, value, message, refs) => {
4749
- var _a;
4750
- if (schema.pattern || ((_a = schema.allOf) === null || _a === void 0 ? void 0 : _a.some((x) => x.pattern))) {
4751
- if (!schema.allOf) {
4752
- schema.allOf = [];
4753
- }
4754
- if (schema.pattern) {
4755
- schema.allOf.push(Object.assign({ pattern: schema.pattern }, schema.errorMessage && refs.errorMessages && {
4756
- errorMessage: { pattern: schema.errorMessage.pattern }
4757
- }));
4758
- delete schema.pattern;
4759
- if (schema.errorMessage) {
4760
- delete schema.errorMessage.pattern;
4761
- if (Object.keys(schema.errorMessage).length === 0) {
4762
- delete schema.errorMessage;
4763
- }
4764
- }
4765
- }
4766
- schema.allOf.push(Object.assign({ pattern: value }, message && refs.errorMessages && { errorMessage: { pattern: message } }));
4767
- } else {
4768
- (0, errorMessages_1.setResponseValueAndErrors)(schema, "pattern", value, message, refs);
4769
- }
4770
- };
4771
- }
4772
- });
4773
-
4774
- // ../../node_modules/zod-to-json-schema/src/parsers/record.js
4775
- var require_record = __commonJS({
4776
- "../../node_modules/zod-to-json-schema/src/parsers/record.js"(exports) {
4777
- "use strict";
4778
- Object.defineProperty(exports, "__esModule", { value: true });
4779
- exports.parseRecordDef = void 0;
4780
- var zod_1 = require_lib();
4781
- var parseDef_1 = require_parseDef();
4782
- var string_1 = require_string();
4783
- function parseRecordDef(def, refs) {
4784
- var _a, _b, _c, _d, _e;
4785
- if (refs.target === "openApi3" && ((_a = def.keyType) === null || _a === void 0 ? void 0 : _a._def.typeName) === zod_1.ZodFirstPartyTypeKind.ZodEnum) {
4786
- return {
4787
- type: "object",
4788
- required: def.keyType._def.values,
4789
- properties: def.keyType._def.values.reduce((acc, key) => {
4790
- var _a2;
4791
- return Object.assign(Object.assign({}, acc), { [key]: (_a2 = (0, parseDef_1.parseDef)(def.valueType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "properties", key] }))) !== null && _a2 !== void 0 ? _a2 : {} });
4792
- }, {}),
4793
- additionalProperties: false
4794
- };
4795
- }
4796
- const schema = {
4797
- type: "object",
4798
- additionalProperties: (_b = (0, parseDef_1.parseDef)(def.valueType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "additionalProperties"] }))) !== null && _b !== void 0 ? _b : {}
4799
- };
4800
- if (refs.target === "openApi3") {
4801
- return schema;
4802
- }
4803
- if (((_c = def.keyType) === null || _c === void 0 ? void 0 : _c._def.typeName) === zod_1.ZodFirstPartyTypeKind.ZodString && ((_d = def.keyType._def.checks) === null || _d === void 0 ? void 0 : _d.length)) {
4804
- const keyType = Object.entries((0, string_1.parseStringDef)(def.keyType._def, refs)).reduce((acc, [key, value]) => key === "type" ? acc : Object.assign(Object.assign({}, acc), { [key]: value }), {});
4805
- return Object.assign(Object.assign({}, schema), { propertyNames: keyType });
4806
- } else if (((_e = def.keyType) === null || _e === void 0 ? void 0 : _e._def.typeName) === zod_1.ZodFirstPartyTypeKind.ZodEnum) {
4807
- return Object.assign(Object.assign({}, schema), { propertyNames: {
4808
- enum: def.keyType._def.values
4809
- } });
4810
- }
4811
- return schema;
4812
- }
4813
- exports.parseRecordDef = parseRecordDef;
4814
- }
4815
- });
4816
-
4817
- // ../../node_modules/zod-to-json-schema/src/parsers/set.js
4956
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/set.js
4818
4957
  var require_set = __commonJS({
4819
- "../../node_modules/zod-to-json-schema/src/parsers/set.js"(exports) {
4958
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/set.js"(exports) {
4820
4959
  "use strict";
4821
4960
  Object.defineProperty(exports, "__esModule", { value: true });
4822
4961
  exports.parseSetDef = void 0;
4823
- var errorMessages_1 = require_errorMessages();
4824
- var parseDef_1 = require_parseDef();
4962
+ var errorMessages_js_1 = require_errorMessages();
4963
+ var parseDef_js_1 = require_parseDef();
4825
4964
  function parseSetDef(def, refs) {
4826
- const items = (0, parseDef_1.parseDef)(def.valueType._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items"] }));
4965
+ const items = (0, parseDef_js_1.parseDef)(def.valueType._def, {
4966
+ ...refs,
4967
+ currentPath: [...refs.currentPath, "items"]
4968
+ });
4827
4969
  const schema = {
4828
4970
  type: "array",
4829
4971
  uniqueItems: true,
4830
4972
  items
4831
4973
  };
4832
4974
  if (def.minSize) {
4833
- (0, errorMessages_1.setResponseValueAndErrors)(schema, "minItems", def.minSize.value, def.minSize.message, refs);
4975
+ (0, errorMessages_js_1.setResponseValueAndErrors)(schema, "minItems", def.minSize.value, def.minSize.message, refs);
4834
4976
  }
4835
4977
  if (def.maxSize) {
4836
- (0, errorMessages_1.setResponseValueAndErrors)(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
4978
+ (0, errorMessages_js_1.setResponseValueAndErrors)(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
4837
4979
  }
4838
4980
  return schema;
4839
4981
  }
@@ -4841,27 +4983,36 @@ var require_set = __commonJS({
4841
4983
  }
4842
4984
  });
4843
4985
 
4844
- // ../../node_modules/zod-to-json-schema/src/parsers/tuple.js
4986
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/tuple.js
4845
4987
  var require_tuple = __commonJS({
4846
- "../../node_modules/zod-to-json-schema/src/parsers/tuple.js"(exports) {
4988
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/tuple.js"(exports) {
4847
4989
  "use strict";
4848
4990
  Object.defineProperty(exports, "__esModule", { value: true });
4849
4991
  exports.parseTupleDef = void 0;
4850
- var parseDef_1 = require_parseDef();
4992
+ var parseDef_js_1 = require_parseDef();
4851
4993
  function parseTupleDef(def, refs) {
4852
4994
  if (def.rest) {
4853
4995
  return {
4854
4996
  type: "array",
4855
4997
  minItems: def.items.length,
4856
- items: def.items.map((x, i) => (0, parseDef_1.parseDef)(x._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items", `${i}`] }))).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
4857
- additionalItems: (0, parseDef_1.parseDef)(def.rest._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "additionalItems"] }))
4998
+ items: def.items.map((x, i) => (0, parseDef_js_1.parseDef)(x._def, {
4999
+ ...refs,
5000
+ currentPath: [...refs.currentPath, "items", `${i}`]
5001
+ })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
5002
+ additionalItems: (0, parseDef_js_1.parseDef)(def.rest._def, {
5003
+ ...refs,
5004
+ currentPath: [...refs.currentPath, "additionalItems"]
5005
+ })
4858
5006
  };
4859
5007
  } else {
4860
5008
  return {
4861
5009
  type: "array",
4862
5010
  minItems: def.items.length,
4863
5011
  maxItems: def.items.length,
4864
- items: def.items.map((x, i) => (0, parseDef_1.parseDef)(x._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.currentPath, "items", `${i}`] }))).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
5012
+ items: def.items.map((x, i) => (0, parseDef_js_1.parseDef)(x._def, {
5013
+ ...refs,
5014
+ currentPath: [...refs.currentPath, "items", `${i}`]
5015
+ })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
4865
5016
  };
4866
5017
  }
4867
5018
  }
@@ -4869,9 +5020,9 @@ var require_tuple = __commonJS({
4869
5020
  }
4870
5021
  });
4871
5022
 
4872
- // ../../node_modules/zod-to-json-schema/src/parsers/undefined.js
5023
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/undefined.js
4873
5024
  var require_undefined = __commonJS({
4874
- "../../node_modules/zod-to-json-schema/src/parsers/undefined.js"(exports) {
5025
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/undefined.js"(exports) {
4875
5026
  "use strict";
4876
5027
  Object.defineProperty(exports, "__esModule", { value: true });
4877
5028
  exports.parseUndefinedDef = void 0;
@@ -4884,9 +5035,9 @@ var require_undefined = __commonJS({
4884
5035
  }
4885
5036
  });
4886
5037
 
4887
- // ../../node_modules/zod-to-json-schema/src/parsers/unknown.js
5038
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/unknown.js
4888
5039
  var require_unknown = __commonJS({
4889
- "../../node_modules/zod-to-json-schema/src/parsers/unknown.js"(exports) {
5040
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/unknown.js"(exports) {
4890
5041
  "use strict";
4891
5042
  Object.defineProperty(exports, "__esModule", { value: true });
4892
5043
  exports.parseUnknownDef = void 0;
@@ -4897,42 +5048,57 @@ var require_unknown = __commonJS({
4897
5048
  }
4898
5049
  });
4899
5050
 
4900
- // ../../node_modules/zod-to-json-schema/src/parseDef.js
5051
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parsers/readonly.js
5052
+ var require_readonly = __commonJS({
5053
+ "../../node_modules/zod-to-json-schema/dist/cjs/parsers/readonly.js"(exports) {
5054
+ "use strict";
5055
+ Object.defineProperty(exports, "__esModule", { value: true });
5056
+ exports.parseReadonlyDef = void 0;
5057
+ var parseDef_js_1 = require_parseDef();
5058
+ var parseReadonlyDef = (def, refs) => {
5059
+ return (0, parseDef_js_1.parseDef)(def.innerType._def, refs);
5060
+ };
5061
+ exports.parseReadonlyDef = parseReadonlyDef;
5062
+ }
5063
+ });
5064
+
5065
+ // ../../node_modules/zod-to-json-schema/dist/cjs/parseDef.js
4901
5066
  var require_parseDef = __commonJS({
4902
- "../../node_modules/zod-to-json-schema/src/parseDef.js"(exports) {
5067
+ "../../node_modules/zod-to-json-schema/dist/cjs/parseDef.js"(exports) {
4903
5068
  "use strict";
4904
5069
  Object.defineProperty(exports, "__esModule", { value: true });
4905
5070
  exports.parseDef = void 0;
4906
5071
  var zod_1 = require_lib();
4907
- var any_1 = require_any();
4908
- var array_1 = require_array();
4909
- var bigint_1 = require_bigint();
4910
- var boolean_1 = require_boolean();
4911
- var branded_1 = require_branded();
4912
- var catch_1 = require_catch();
4913
- var date_1 = require_date();
4914
- var default_1 = require_default();
4915
- var effects_1 = require_effects();
4916
- var enum_1 = require_enum();
4917
- var intersection_1 = require_intersection();
4918
- var literal_1 = require_literal();
4919
- var map_1 = require_map();
4920
- var nativeEnum_1 = require_nativeEnum();
4921
- var never_1 = require_never();
4922
- var null_1 = require_null();
4923
- var nullable_1 = require_nullable();
4924
- var number_1 = require_number();
4925
- var object_1 = require_object();
4926
- var optional_1 = require_optional();
4927
- var pipeline_1 = require_pipeline();
4928
- var promise_1 = require_promise();
4929
- var record_1 = require_record();
4930
- var set_1 = require_set();
4931
- var string_1 = require_string();
4932
- var tuple_1 = require_tuple();
4933
- var undefined_1 = require_undefined();
4934
- var union_1 = require_union();
4935
- var unknown_1 = require_unknown();
5072
+ var any_js_1 = require_any();
5073
+ var array_js_1 = require_array();
5074
+ var bigint_js_1 = require_bigint();
5075
+ var boolean_js_1 = require_boolean();
5076
+ var branded_js_1 = require_branded();
5077
+ var catch_js_1 = require_catch();
5078
+ var date_js_1 = require_date();
5079
+ var default_js_1 = require_default();
5080
+ var effects_js_1 = require_effects();
5081
+ var enum_js_1 = require_enum();
5082
+ var intersection_js_1 = require_intersection();
5083
+ var literal_js_1 = require_literal();
5084
+ var map_js_1 = require_map();
5085
+ var nativeEnum_js_1 = require_nativeEnum();
5086
+ var never_js_1 = require_never();
5087
+ var null_js_1 = require_null();
5088
+ var nullable_js_1 = require_nullable();
5089
+ var number_js_1 = require_number();
5090
+ var object_js_1 = require_object();
5091
+ var optional_js_1 = require_optional();
5092
+ var pipeline_js_1 = require_pipeline();
5093
+ var promise_js_1 = require_promise();
5094
+ var record_js_1 = require_record();
5095
+ var set_js_1 = require_set();
5096
+ var string_js_1 = require_string();
5097
+ var tuple_js_1 = require_tuple();
5098
+ var undefined_js_1 = require_undefined();
5099
+ var union_js_1 = require_union();
5100
+ var unknown_js_1 = require_unknown();
5101
+ var readonly_js_1 = require_readonly();
4936
5102
  function parseDef(def, refs, forceResolution = false) {
4937
5103
  const seenItem = refs.seen.get(def);
4938
5104
  if (seenItem && !forceResolution) {
@@ -4954,25 +5120,16 @@ var require_parseDef = __commonJS({
4954
5120
  var get$ref = (item, refs) => {
4955
5121
  switch (refs.$refStrategy) {
4956
5122
  case "root":
4957
- return {
4958
- $ref: item.path.length === 0 ? "" : item.path.length === 1 ? `${item.path[0]}/` : item.path.join("/")
4959
- };
5123
+ return { $ref: item.path.join("/") };
4960
5124
  case "relative":
4961
5125
  return { $ref: getRelativePath(refs.currentPath, item.path) };
4962
- case "none": {
4963
- if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
4964
- console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
4965
- return {};
4966
- }
4967
- return void 0;
4968
- }
5126
+ case "none":
4969
5127
  case "seen": {
4970
5128
  if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
4971
5129
  console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
4972
5130
  return {};
4973
- } else {
4974
- return item.jsonSchema;
4975
5131
  }
5132
+ return refs.$refStrategy === "seen" ? {} : void 0;
4976
5133
  }
4977
5134
  }
4978
5135
  };
@@ -4987,67 +5144,69 @@ var require_parseDef = __commonJS({
4987
5144
  var selectParser = (def, typeName, refs) => {
4988
5145
  switch (typeName) {
4989
5146
  case zod_1.ZodFirstPartyTypeKind.ZodString:
4990
- return (0, string_1.parseStringDef)(def, refs);
5147
+ return (0, string_js_1.parseStringDef)(def, refs);
4991
5148
  case zod_1.ZodFirstPartyTypeKind.ZodNumber:
4992
- return (0, number_1.parseNumberDef)(def, refs);
5149
+ return (0, number_js_1.parseNumberDef)(def, refs);
4993
5150
  case zod_1.ZodFirstPartyTypeKind.ZodObject:
4994
- return (0, object_1.parseObjectDef)(def, refs);
5151
+ return (0, object_js_1.parseObjectDef)(def, refs);
4995
5152
  case zod_1.ZodFirstPartyTypeKind.ZodBigInt:
4996
- return (0, bigint_1.parseBigintDef)(def, refs);
5153
+ return (0, bigint_js_1.parseBigintDef)(def, refs);
4997
5154
  case zod_1.ZodFirstPartyTypeKind.ZodBoolean:
4998
- return (0, boolean_1.parseBooleanDef)();
5155
+ return (0, boolean_js_1.parseBooleanDef)();
4999
5156
  case zod_1.ZodFirstPartyTypeKind.ZodDate:
5000
- return (0, date_1.parseDateDef)(def, refs);
5157
+ return (0, date_js_1.parseDateDef)(def, refs);
5001
5158
  case zod_1.ZodFirstPartyTypeKind.ZodUndefined:
5002
- return (0, undefined_1.parseUndefinedDef)();
5159
+ return (0, undefined_js_1.parseUndefinedDef)();
5003
5160
  case zod_1.ZodFirstPartyTypeKind.ZodNull:
5004
- return (0, null_1.parseNullDef)(refs);
5161
+ return (0, null_js_1.parseNullDef)(refs);
5005
5162
  case zod_1.ZodFirstPartyTypeKind.ZodArray:
5006
- return (0, array_1.parseArrayDef)(def, refs);
5163
+ return (0, array_js_1.parseArrayDef)(def, refs);
5007
5164
  case zod_1.ZodFirstPartyTypeKind.ZodUnion:
5008
5165
  case zod_1.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
5009
- return (0, union_1.parseUnionDef)(def, refs);
5166
+ return (0, union_js_1.parseUnionDef)(def, refs);
5010
5167
  case zod_1.ZodFirstPartyTypeKind.ZodIntersection:
5011
- return (0, intersection_1.parseIntersectionDef)(def, refs);
5168
+ return (0, intersection_js_1.parseIntersectionDef)(def, refs);
5012
5169
  case zod_1.ZodFirstPartyTypeKind.ZodTuple:
5013
- return (0, tuple_1.parseTupleDef)(def, refs);
5170
+ return (0, tuple_js_1.parseTupleDef)(def, refs);
5014
5171
  case zod_1.ZodFirstPartyTypeKind.ZodRecord:
5015
- return (0, record_1.parseRecordDef)(def, refs);
5172
+ return (0, record_js_1.parseRecordDef)(def, refs);
5016
5173
  case zod_1.ZodFirstPartyTypeKind.ZodLiteral:
5017
- return (0, literal_1.parseLiteralDef)(def, refs);
5174
+ return (0, literal_js_1.parseLiteralDef)(def, refs);
5018
5175
  case zod_1.ZodFirstPartyTypeKind.ZodEnum:
5019
- return (0, enum_1.parseEnumDef)(def);
5176
+ return (0, enum_js_1.parseEnumDef)(def);
5020
5177
  case zod_1.ZodFirstPartyTypeKind.ZodNativeEnum:
5021
- return (0, nativeEnum_1.parseNativeEnumDef)(def);
5178
+ return (0, nativeEnum_js_1.parseNativeEnumDef)(def);
5022
5179
  case zod_1.ZodFirstPartyTypeKind.ZodNullable:
5023
- return (0, nullable_1.parseNullableDef)(def, refs);
5180
+ return (0, nullable_js_1.parseNullableDef)(def, refs);
5024
5181
  case zod_1.ZodFirstPartyTypeKind.ZodOptional:
5025
- return (0, optional_1.parseOptionalDef)(def, refs);
5182
+ return (0, optional_js_1.parseOptionalDef)(def, refs);
5026
5183
  case zod_1.ZodFirstPartyTypeKind.ZodMap:
5027
- return (0, map_1.parseMapDef)(def, refs);
5184
+ return (0, map_js_1.parseMapDef)(def, refs);
5028
5185
  case zod_1.ZodFirstPartyTypeKind.ZodSet:
5029
- return (0, set_1.parseSetDef)(def, refs);
5186
+ return (0, set_js_1.parseSetDef)(def, refs);
5030
5187
  case zod_1.ZodFirstPartyTypeKind.ZodLazy:
5031
5188
  return parseDef(def.getter()._def, refs);
5032
5189
  case zod_1.ZodFirstPartyTypeKind.ZodPromise:
5033
- return (0, promise_1.parsePromiseDef)(def, refs);
5190
+ return (0, promise_js_1.parsePromiseDef)(def, refs);
5034
5191
  case zod_1.ZodFirstPartyTypeKind.ZodNaN:
5035
5192
  case zod_1.ZodFirstPartyTypeKind.ZodNever:
5036
- return (0, never_1.parseNeverDef)();
5193
+ return (0, never_js_1.parseNeverDef)();
5037
5194
  case zod_1.ZodFirstPartyTypeKind.ZodEffects:
5038
- return (0, effects_1.parseEffectsDef)(def, refs);
5195
+ return (0, effects_js_1.parseEffectsDef)(def, refs);
5039
5196
  case zod_1.ZodFirstPartyTypeKind.ZodAny:
5040
- return (0, any_1.parseAnyDef)();
5197
+ return (0, any_js_1.parseAnyDef)();
5041
5198
  case zod_1.ZodFirstPartyTypeKind.ZodUnknown:
5042
- return (0, unknown_1.parseUnknownDef)();
5199
+ return (0, unknown_js_1.parseUnknownDef)();
5043
5200
  case zod_1.ZodFirstPartyTypeKind.ZodDefault:
5044
- return (0, default_1.parseDefaultDef)(def, refs);
5201
+ return (0, default_js_1.parseDefaultDef)(def, refs);
5045
5202
  case zod_1.ZodFirstPartyTypeKind.ZodBranded:
5046
- return (0, branded_1.parseBrandedDef)(def, refs);
5203
+ return (0, branded_js_1.parseBrandedDef)(def, refs);
5204
+ case zod_1.ZodFirstPartyTypeKind.ZodReadonly:
5205
+ return (0, readonly_js_1.parseReadonlyDef)(def, refs);
5047
5206
  case zod_1.ZodFirstPartyTypeKind.ZodCatch:
5048
- return (0, catch_1.parseCatchDef)(def, refs);
5207
+ return (0, catch_js_1.parseCatchDef)(def, refs);
5049
5208
  case zod_1.ZodFirstPartyTypeKind.ZodPipeline:
5050
- return (0, pipeline_1.parsePipelineDef)(def, refs);
5209
+ return (0, pipeline_js_1.parsePipelineDef)(def, refs);
5051
5210
  case zod_1.ZodFirstPartyTypeKind.ZodFunction:
5052
5211
  case zod_1.ZodFirstPartyTypeKind.ZodVoid:
5053
5212
  case zod_1.ZodFirstPartyTypeKind.ZodSymbol:
@@ -5068,80 +5227,70 @@ var require_parseDef = __commonJS({
5068
5227
  }
5069
5228
  });
5070
5229
 
5071
- // ../../node_modules/zod-to-json-schema/src/Options.js
5072
- var require_Options = __commonJS({
5073
- "../../node_modules/zod-to-json-schema/src/Options.js"(exports) {
5074
- "use strict";
5075
- Object.defineProperty(exports, "__esModule", { value: true });
5076
- exports.getDefaultOptions = exports.defaultOptions = void 0;
5077
- exports.defaultOptions = {
5078
- name: void 0,
5079
- $refStrategy: "root",
5080
- basePath: ["#"],
5081
- effectStrategy: "input",
5082
- pipeStrategy: "all",
5083
- dateStrategy: "string",
5084
- definitionPath: "definitions",
5085
- target: "jsonSchema7",
5086
- strictUnions: false,
5087
- definitions: {},
5088
- errorMessages: false,
5089
- markdownDescription: false,
5090
- emailStrategy: "format:email"
5091
- };
5092
- var getDefaultOptions = (options) => typeof options === "string" ? Object.assign(Object.assign({}, exports.defaultOptions), { name: options }) : Object.assign(Object.assign({}, exports.defaultOptions), options);
5093
- exports.getDefaultOptions = getDefaultOptions;
5094
- }
5095
- });
5096
-
5097
- // ../../node_modules/zod-to-json-schema/src/Refs.js
5230
+ // ../../node_modules/zod-to-json-schema/dist/cjs/Refs.js
5098
5231
  var require_Refs = __commonJS({
5099
- "../../node_modules/zod-to-json-schema/src/Refs.js"(exports) {
5232
+ "../../node_modules/zod-to-json-schema/dist/cjs/Refs.js"(exports) {
5100
5233
  "use strict";
5101
5234
  Object.defineProperty(exports, "__esModule", { value: true });
5102
5235
  exports.getRefs = void 0;
5103
- var Options_1 = require_Options();
5236
+ var Options_js_1 = require_Options();
5104
5237
  var getRefs = (options) => {
5105
- const _options = (0, Options_1.getDefaultOptions)(options);
5238
+ const _options = (0, Options_js_1.getDefaultOptions)(options);
5106
5239
  const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
5107
- return Object.assign(Object.assign({}, _options), { currentPath, propertyPath: void 0, seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
5108
- def._def,
5109
- {
5110
- def: def._def,
5111
- path: [..._options.basePath, _options.definitionPath, name],
5112
- // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
5113
- jsonSchema: void 0
5114
- }
5115
- ])) });
5240
+ return {
5241
+ ..._options,
5242
+ currentPath,
5243
+ propertyPath: void 0,
5244
+ seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
5245
+ def._def,
5246
+ {
5247
+ def: def._def,
5248
+ path: [..._options.basePath, _options.definitionPath, name],
5249
+ // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
5250
+ jsonSchema: void 0
5251
+ }
5252
+ ]))
5253
+ };
5116
5254
  };
5117
5255
  exports.getRefs = getRefs;
5118
5256
  }
5119
5257
  });
5120
5258
 
5121
- // ../../node_modules/zod-to-json-schema/src/zodToJsonSchema.js
5259
+ // ../../node_modules/zod-to-json-schema/dist/cjs/zodToJsonSchema.js
5122
5260
  var require_zodToJsonSchema = __commonJS({
5123
- "../../node_modules/zod-to-json-schema/src/zodToJsonSchema.js"(exports) {
5261
+ "../../node_modules/zod-to-json-schema/dist/cjs/zodToJsonSchema.js"(exports) {
5124
5262
  "use strict";
5125
5263
  Object.defineProperty(exports, "__esModule", { value: true });
5126
5264
  exports.zodToJsonSchema = void 0;
5127
- var parseDef_1 = require_parseDef();
5128
- var Refs_1 = require_Refs();
5265
+ var parseDef_js_1 = require_parseDef();
5266
+ var Refs_js_1 = require_Refs();
5129
5267
  var zodToJsonSchema = (schema, options) => {
5130
- var _a;
5131
- const refs = (0, Refs_1.getRefs)(options);
5132
- const definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => {
5133
- var _a2;
5134
- return Object.assign(Object.assign({}, acc), { [name2]: (_a2 = (0, parseDef_1.parseDef)(schema2._def, Object.assign(Object.assign({}, refs), { currentPath: [...refs.basePath, refs.definitionPath, name2] }), true)) !== null && _a2 !== void 0 ? _a2 : {} });
5135
- }, {}) : void 0;
5136
- const name = typeof options === "string" ? options : options === null || options === void 0 ? void 0 : options.name;
5137
- const main = (_a = (0, parseDef_1.parseDef)(schema._def, name === void 0 ? refs : Object.assign(Object.assign({}, refs), { currentPath: [...refs.basePath, refs.definitionPath, name] }), false)) !== null && _a !== void 0 ? _a : {};
5138
- const combined = name === void 0 ? definitions ? Object.assign(Object.assign({}, main), { [refs.definitionPath]: definitions }) : main : {
5268
+ const refs = (0, Refs_js_1.getRefs)(options);
5269
+ const definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
5270
+ ...acc,
5271
+ [name2]: (0, parseDef_js_1.parseDef)(schema2._def, {
5272
+ ...refs,
5273
+ currentPath: [...refs.basePath, refs.definitionPath, name2]
5274
+ }, true) ?? {}
5275
+ }), {}) : void 0;
5276
+ const name = typeof options === "string" ? options : options?.name;
5277
+ const main = (0, parseDef_js_1.parseDef)(schema._def, name === void 0 ? refs : {
5278
+ ...refs,
5279
+ currentPath: [...refs.basePath, refs.definitionPath, name]
5280
+ }, false) ?? {};
5281
+ const combined = name === void 0 ? definitions ? {
5282
+ ...main,
5283
+ [refs.definitionPath]: definitions
5284
+ } : main : {
5139
5285
  $ref: [
5140
5286
  ...refs.$refStrategy === "relative" ? [] : refs.basePath,
5141
5287
  refs.definitionPath,
5142
5288
  name
5143
5289
  ].join("/"),
5144
- [refs.definitionPath]: Object.assign(Object.assign({}, definitions), { [name]: main })
5290
+ [refs.definitionPath]: {
5291
+ ...definitions,
5292
+ [name]: main
5293
+ }
5145
5294
  };
5146
5295
  if (refs.target === "jsonSchema7") {
5147
5296
  combined.$schema = "http://json-schema.org/draft-07/schema#";
@@ -5154,17 +5303,68 @@ var require_zodToJsonSchema = __commonJS({
5154
5303
  }
5155
5304
  });
5156
5305
 
5157
- // ../../node_modules/zod-to-json-schema/index.js
5158
- var require_zod_to_json_schema = __commonJS({
5159
- "../../node_modules/zod-to-json-schema/index.js"(exports) {
5306
+ // ../../node_modules/zod-to-json-schema/dist/cjs/index.js
5307
+ var require_cjs = __commonJS({
5308
+ "../../node_modules/zod-to-json-schema/dist/cjs/index.js"(exports) {
5160
5309
  "use strict";
5310
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
5311
+ if (k2 === void 0)
5312
+ k2 = k;
5313
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5314
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5315
+ desc = { enumerable: true, get: function() {
5316
+ return m[k];
5317
+ } };
5318
+ }
5319
+ Object.defineProperty(o, k2, desc);
5320
+ } : function(o, m, k, k2) {
5321
+ if (k2 === void 0)
5322
+ k2 = k;
5323
+ o[k2] = m[k];
5324
+ });
5325
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
5326
+ for (var p in m)
5327
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
5328
+ __createBinding(exports2, m, p);
5329
+ };
5161
5330
  Object.defineProperty(exports, "__esModule", { value: true });
5162
- exports.zodToJsonSchema = void 0;
5163
- var zodToJsonSchema_1 = require_zodToJsonSchema();
5164
- Object.defineProperty(exports, "zodToJsonSchema", { enumerable: true, get: function() {
5165
- return zodToJsonSchema_1.zodToJsonSchema;
5166
- } });
5167
- exports.default = zodToJsonSchema_1.zodToJsonSchema;
5331
+ __exportStar(require_errorMessages(), exports);
5332
+ __exportStar(require_Options(), exports);
5333
+ __exportStar(require_parseDef(), exports);
5334
+ __exportStar(require_any(), exports);
5335
+ __exportStar(require_array(), exports);
5336
+ __exportStar(require_bigint(), exports);
5337
+ __exportStar(require_boolean(), exports);
5338
+ __exportStar(require_branded(), exports);
5339
+ __exportStar(require_catch(), exports);
5340
+ __exportStar(require_date(), exports);
5341
+ __exportStar(require_default(), exports);
5342
+ __exportStar(require_effects(), exports);
5343
+ __exportStar(require_enum(), exports);
5344
+ __exportStar(require_intersection(), exports);
5345
+ __exportStar(require_literal(), exports);
5346
+ __exportStar(require_map(), exports);
5347
+ __exportStar(require_nativeEnum(), exports);
5348
+ __exportStar(require_never(), exports);
5349
+ __exportStar(require_null(), exports);
5350
+ __exportStar(require_nullable(), exports);
5351
+ __exportStar(require_number(), exports);
5352
+ __exportStar(require_object(), exports);
5353
+ __exportStar(require_optional(), exports);
5354
+ __exportStar(require_pipeline(), exports);
5355
+ __exportStar(require_promise(), exports);
5356
+ __exportStar(require_readonly(), exports);
5357
+ __exportStar(require_record(), exports);
5358
+ __exportStar(require_set(), exports);
5359
+ __exportStar(require_string(), exports);
5360
+ __exportStar(require_tuple(), exports);
5361
+ __exportStar(require_undefined(), exports);
5362
+ __exportStar(require_union(), exports);
5363
+ __exportStar(require_unknown(), exports);
5364
+ __exportStar(require_Refs(), exports);
5365
+ __exportStar(require_zodToJsonSchema(), exports);
5366
+ var zodToJsonSchema_js_1 = require_zodToJsonSchema();
5367
+ exports.default = zodToJsonSchema_js_1.zodToJsonSchema;
5168
5368
  }
5169
5369
  });
5170
5370
 
@@ -5207,7 +5407,7 @@ var require_dist = __commonJS({
5207
5407
  };
5208
5408
  exports.__esModule = true;
5209
5409
  exports.serializerCompiler = exports.ResponseValidationError = exports.validatorCompiler = exports.jsonSchemaTransform = exports.createJsonSchemaTransform = void 0;
5210
- var zod_to_json_schema_1 = require_zod_to_json_schema();
5410
+ var zod_to_json_schema_1 = require_cjs();
5211
5411
  var defaultSkipList = [
5212
5412
  "/documentation/",
5213
5413
  "/documentation/initOAuth",