@forklaunch/implementation-worker-redis 0.3.3 → 0.3.6

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.
@@ -1,96 +1,69 @@
1
- 'use strict';
1
+ "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) =>
9
- function __require() {
10
- return (
11
- mod ||
12
- (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
13
- mod.exports
14
- );
15
- };
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
16
11
  var __export = (target, all) => {
17
12
  for (var name in all)
18
13
  __defProp(target, name, { get: all[name], enumerable: true });
19
14
  };
20
15
  var __copyProps = (to, from, except, desc) => {
21
- if ((from && typeof from === 'object') || typeof from === 'function') {
16
+ if (from && typeof from === "object" || typeof from === "function") {
22
17
  for (let key of __getOwnPropNames(from))
23
18
  if (!__hasOwnProp.call(to, key) && key !== except)
24
- __defProp(to, key, {
25
- get: () => from[key],
26
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
27
- });
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
20
  }
29
21
  return to;
30
22
  };
31
- var __toESM = (mod, isNodeMode, target) => (
32
- (target = mod != null ? __create(__getProtoOf(mod)) : {}),
33
- __copyProps(
34
- // If the importer is in node compatibility mode or this is not an ESM
35
- // file that has been converted to a CommonJS file using a Babel-
36
- // compatible transform (i.e. "__esModule" has not been set), then set
37
- // "default" to the CommonJS "module.exports" for node compatibility.
38
- isNodeMode || !mod || !mod.__esModule
39
- ? __defProp(target, 'default', { value: mod, enumerable: true })
40
- : target,
41
- mod
42
- )
43
- );
44
- var __toCommonJS = (mod) =>
45
- __copyProps(__defProp({}, '__esModule', { value: true }), mod);
23
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
33
 
47
34
  // ../../../node_modules/.pnpm/ts-deepmerge@6.2.1/node_modules/ts-deepmerge/cjs/index.js
48
35
  var require_cjs = __commonJS({
49
- '../../../node_modules/.pnpm/ts-deepmerge@6.2.1/node_modules/ts-deepmerge/cjs/index.js'(
50
- exports2
51
- ) {
52
- 'use strict';
53
- Object.defineProperty(exports2, '__esModule', { value: true });
36
+ "../../../node_modules/.pnpm/ts-deepmerge@6.2.1/node_modules/ts-deepmerge/cjs/index.js"(exports2) {
37
+ "use strict";
38
+ Object.defineProperty(exports2, "__esModule", { value: true });
54
39
  var isObject = (obj) => {
55
- if (typeof obj === 'object' && obj !== null) {
56
- if (typeof Object.getPrototypeOf === 'function') {
40
+ if (typeof obj === "object" && obj !== null) {
41
+ if (typeof Object.getPrototypeOf === "function") {
57
42
  const prototype = Object.getPrototypeOf(obj);
58
43
  return prototype === Object.prototype || prototype === null;
59
44
  }
60
- return Object.prototype.toString.call(obj) === '[object Object]';
45
+ return Object.prototype.toString.call(obj) === "[object Object]";
61
46
  }
62
47
  return false;
63
48
  };
64
- var merge = (...objects) =>
65
- objects.reduce((result, current) => {
66
- if (Array.isArray(current)) {
67
- throw new TypeError(
68
- 'Arguments provided to ts-deepmerge must be objects, not arrays.'
69
- );
49
+ var merge = (...objects) => objects.reduce((result, current) => {
50
+ if (Array.isArray(current)) {
51
+ throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
52
+ }
53
+ Object.keys(current).forEach((key) => {
54
+ if (["__proto__", "constructor", "prototype"].includes(key)) {
55
+ return;
70
56
  }
71
- Object.keys(current).forEach((key) => {
72
- if (['__proto__', 'constructor', 'prototype'].includes(key)) {
73
- return;
74
- }
75
- if (Array.isArray(result[key]) && Array.isArray(current[key])) {
76
- result[key] = merge.options.mergeArrays
77
- ? merge.options.uniqueArrayItems
78
- ? Array.from(new Set(result[key].concat(current[key])))
79
- : [...result[key], ...current[key]]
80
- : current[key];
81
- } else if (isObject(result[key]) && isObject(current[key])) {
82
- result[key] = merge(result[key], current[key]);
83
- } else {
84
- result[key] =
85
- current[key] === void 0
86
- ? merge.options.allowUndefinedOverrides
87
- ? current[key]
88
- : result[key]
89
- : current[key];
90
- }
91
- });
92
- return result;
93
- }, {});
57
+ if (Array.isArray(result[key]) && Array.isArray(current[key])) {
58
+ result[key] = merge.options.mergeArrays ? merge.options.uniqueArrayItems ? Array.from(new Set(result[key].concat(current[key]))) : [...result[key], ...current[key]] : current[key];
59
+ } else if (isObject(result[key]) && isObject(current[key])) {
60
+ result[key] = merge(result[key], current[key]);
61
+ } else {
62
+ result[key] = current[key] === void 0 ? merge.options.allowUndefinedOverrides ? current[key] : result[key] : current[key];
63
+ }
64
+ });
65
+ return result;
66
+ }, {});
94
67
  var defaultOptions = {
95
68
  allowUndefinedOverrides: true,
96
69
  mergeArrays: true,
@@ -107,202 +80,129 @@ var require_cjs = __commonJS({
107
80
  }
108
81
  });
109
82
 
110
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js
83
+ // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js
111
84
  var require_zod_openapi = __commonJS({
112
- '../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js'(
113
- exports2
114
- ) {
115
- 'use strict';
116
- Object.defineProperty(exports2, '__esModule', { value: true });
85
+ "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js"(exports2) {
86
+ "use strict";
87
+ Object.defineProperty(exports2, "__esModule", { value: true });
117
88
  exports2.generateSchema = exports2.extendApi = void 0;
118
89
  var ts_deepmerge_1 = require_cjs();
119
- var zod_1 = require('zod');
90
+ var zod_1 = require("zod");
120
91
  function extendApi(schema, schemaObject = {}) {
121
92
  const This = schema.constructor;
122
93
  const newSchema = new This(schema._def);
123
- newSchema.metaOpenApi = Object.assign(
124
- {},
125
- schema.metaOpenApi || {},
126
- schemaObject
127
- );
94
+ newSchema.metaOpenApi = Object.assign({}, schema.metaOpenApi || {}, schemaObject);
128
95
  return newSchema;
129
96
  }
130
97
  exports2.extendApi = extendApi;
131
- function iterateZodObject({
132
- zodRef,
133
- useOutput,
134
- hideDefinitions,
135
- openApiVersion
136
- }) {
137
- const reduced = Object.keys(zodRef.shape)
138
- .filter(
139
- (key) =>
140
- (hideDefinitions === null || hideDefinitions === void 0
141
- ? void 0
142
- : hideDefinitions.includes(key)) === false
143
- )
144
- .reduce(
145
- (carry, key) =>
146
- Object.assign(Object.assign({}, carry), {
147
- [key]: generateSchema2(
148
- zodRef.shape[key],
149
- useOutput,
150
- openApiVersion
151
- )
152
- }),
153
- {}
154
- );
98
+ function iterateZodObject({ zodRef, useOutput, hideDefinitions, openApiVersion }) {
99
+ const reduced = Object.keys(zodRef.shape).filter((key) => (hideDefinitions === null || hideDefinitions === void 0 ? void 0 : hideDefinitions.includes(key)) === false).reduce((carry, key) => Object.assign(Object.assign({}, carry), { [key]: generateSchema2(zodRef.shape[key], useOutput, openApiVersion) }), {});
155
100
  return reduced;
156
101
  }
157
102
  function typeFormat(type3, openApiVersion) {
158
- return openApiVersion === '3.0' ? type3 : [type3];
103
+ return openApiVersion === "3.0" ? type3 : [type3];
159
104
  }
160
- function parseTransformation({
161
- zodRef,
162
- schemas,
163
- useOutput,
164
- openApiVersion
165
- }) {
166
- const input = generateSchema2(
167
- zodRef._def.schema,
168
- useOutput,
169
- openApiVersion
170
- );
171
- let output = 'undefined';
105
+ function parseTransformation({ zodRef, schemas, useOutput, openApiVersion }) {
106
+ const input = generateSchema2(zodRef._def.schema, useOutput, openApiVersion);
107
+ let output = "undefined";
172
108
  if (useOutput && zodRef._def.effect) {
173
- const effect =
174
- zodRef._def.effect.type === 'transform' ? zodRef._def.effect : null;
175
- if (effect && 'transform' in effect) {
109
+ const effect = zodRef._def.effect.type === "transform" ? zodRef._def.effect : null;
110
+ if (effect && "transform" in effect) {
176
111
  try {
177
- const type3 = Array.isArray(input.type)
178
- ? input.type[0]
179
- : input.type;
112
+ const type3 = Array.isArray(input.type) ? input.type[0] : input.type;
180
113
  output = typeof effect.transform(
181
- ['integer', 'number'].includes(`${type3}`)
182
- ? 0
183
- : 'string' === type3
184
- ? ''
185
- : 'boolean' === type3
186
- ? false
187
- : 'object' === type3
188
- ? {}
189
- : 'null' === type3
190
- ? null
191
- : 'array' === type3
192
- ? []
193
- : void 0,
114
+ ["integer", "number"].includes(`${type3}`) ? 0 : "string" === type3 ? "" : "boolean" === type3 ? false : "object" === type3 ? {} : "null" === type3 ? null : "array" === type3 ? [] : void 0,
194
115
  { addIssue: () => void 0, path: [] }
195
116
  // TODO: Discover if context is necessary here
196
117
  );
197
- } catch (e) {}
118
+ } catch (e) {
119
+ }
198
120
  }
199
121
  }
200
122
  const outputType = output;
201
- return (0, ts_deepmerge_1.default)(
202
- Object.assign(
203
- Object.assign(
204
- Object.assign(
205
- {},
206
- zodRef.description ? { description: zodRef.description } : {}
207
- ),
208
- input
209
- ),
210
- ['number', 'string', 'boolean', 'null'].includes(output)
211
- ? {
212
- type: typeFormat(outputType, openApiVersion)
213
- }
214
- : {}
215
- ),
216
- ...schemas
217
- );
123
+ return (0, ts_deepmerge_1.default)(Object.assign(Object.assign(Object.assign({}, zodRef.description ? { description: zodRef.description } : {}), input), ["number", "string", "boolean", "null"].includes(output) ? {
124
+ type: typeFormat(outputType, openApiVersion)
125
+ } : {}), ...schemas);
218
126
  }
219
127
  function parseString({ zodRef, schemas, openApiVersion }) {
220
128
  const baseSchema = {
221
- type: typeFormat('string', openApiVersion)
129
+ type: typeFormat("string", openApiVersion)
222
130
  };
223
131
  const { checks = [] } = zodRef._def;
224
132
  checks.forEach((item) => {
225
133
  switch (item.kind) {
226
- case 'email':
227
- baseSchema.format = 'email';
134
+ case "email":
135
+ baseSchema.format = "email";
228
136
  break;
229
- case 'uuid':
230
- baseSchema.format = 'uuid';
137
+ case "uuid":
138
+ baseSchema.format = "uuid";
231
139
  break;
232
- case 'cuid':
233
- baseSchema.format = 'cuid';
140
+ case "cuid":
141
+ baseSchema.format = "cuid";
234
142
  break;
235
- case 'url':
236
- baseSchema.format = 'uri';
143
+ case "url":
144
+ baseSchema.format = "uri";
237
145
  break;
238
- case 'datetime':
239
- baseSchema.format = 'date-time';
146
+ case "datetime":
147
+ baseSchema.format = "date-time";
240
148
  break;
241
- case 'length':
149
+ case "length":
242
150
  baseSchema.minLength = item.value;
243
151
  baseSchema.maxLength = item.value;
244
152
  break;
245
- case 'max':
153
+ case "max":
246
154
  baseSchema.maxLength = item.value;
247
155
  break;
248
- case 'min':
156
+ case "min":
249
157
  baseSchema.minLength = item.value;
250
158
  break;
251
- case 'regex':
159
+ case "regex":
252
160
  baseSchema.pattern = item.regex.source;
253
161
  break;
254
162
  }
255
163
  });
256
- return (0, ts_deepmerge_1.default)(
257
- baseSchema,
258
- zodRef.description ? { description: zodRef.description } : {},
259
- ...schemas
260
- );
164
+ return (0, ts_deepmerge_1.default)(baseSchema, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
261
165
  }
262
166
  function parseNumber({ zodRef, schemas, openApiVersion }) {
263
167
  const baseSchema = {
264
- type: typeFormat('number', openApiVersion)
168
+ type: typeFormat("number", openApiVersion)
265
169
  };
266
170
  const { checks = [] } = zodRef._def;
267
171
  checks.forEach((item) => {
268
172
  switch (item.kind) {
269
- case 'max':
270
- if (item.inclusive || openApiVersion === '3.0') {
173
+ case "max":
174
+ if (item.inclusive || openApiVersion === "3.0") {
271
175
  baseSchema.maximum = item.value;
272
176
  }
273
177
  if (!item.inclusive) {
274
- if (openApiVersion === '3.0') {
178
+ if (openApiVersion === "3.0") {
275
179
  baseSchema.exclusiveMaximum = true;
276
180
  } else {
277
181
  baseSchema.exclusiveMaximum = item.value;
278
182
  }
279
183
  }
280
184
  break;
281
- case 'min':
282
- if (item.inclusive || openApiVersion === '3.0') {
185
+ case "min":
186
+ if (item.inclusive || openApiVersion === "3.0") {
283
187
  baseSchema.minimum = item.value;
284
188
  }
285
189
  if (!item.inclusive) {
286
- if (openApiVersion === '3.0') {
190
+ if (openApiVersion === "3.0") {
287
191
  baseSchema.exclusiveMinimum = true;
288
192
  } else {
289
193
  baseSchema.exclusiveMinimum = item.value;
290
194
  }
291
195
  }
292
196
  break;
293
- case 'int':
294
- baseSchema.type = typeFormat('integer', openApiVersion);
197
+ case "int":
198
+ baseSchema.type = typeFormat("integer", openApiVersion);
295
199
  break;
296
- case 'multipleOf':
200
+ case "multipleOf":
297
201
  baseSchema.multipleOf = item.value;
298
202
  break;
299
203
  }
300
204
  });
301
- return (0, ts_deepmerge_1.default)(
302
- baseSchema,
303
- zodRef.description ? { description: zodRef.description } : {},
304
- ...schemas
305
- );
205
+ return (0, ts_deepmerge_1.default)(baseSchema, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
306
206
  }
307
207
  function getExcludedDefinitionsFromSchema(schemas) {
308
208
  const excludedDefinitions = [];
@@ -313,163 +213,65 @@ var require_zod_openapi = __commonJS({
313
213
  }
314
214
  return excludedDefinitions;
315
215
  }
316
- function parseObject({
317
- zodRef,
318
- schemas,
319
- useOutput,
320
- hideDefinitions,
321
- openApiVersion
322
- }) {
216
+ function parseObject({ zodRef, schemas, useOutput, hideDefinitions, openApiVersion }) {
323
217
  var _a;
324
218
  let additionalProperties;
325
- if (
326
- !(
327
- zodRef._def.catchall instanceof zod_1.z.ZodNever ||
328
- ((_a = zodRef._def.catchall) === null || _a === void 0
329
- ? void 0
330
- : _a._def.typeName) === 'ZodNever'
331
- )
332
- )
333
- additionalProperties = generateSchema2(
334
- zodRef._def.catchall,
335
- useOutput,
336
- openApiVersion
337
- );
338
- else if (zodRef._def.unknownKeys === 'passthrough')
219
+ if (!(zodRef._def.catchall instanceof zod_1.z.ZodNever || ((_a = zodRef._def.catchall) === null || _a === void 0 ? void 0 : _a._def.typeName) === "ZodNever"))
220
+ additionalProperties = generateSchema2(zodRef._def.catchall, useOutput, openApiVersion);
221
+ else if (zodRef._def.unknownKeys === "passthrough")
339
222
  additionalProperties = true;
340
- else if (zodRef._def.unknownKeys === 'strict')
223
+ else if (zodRef._def.unknownKeys === "strict")
341
224
  additionalProperties = false;
342
- additionalProperties =
343
- additionalProperties != null ? { additionalProperties } : {};
225
+ additionalProperties = additionalProperties != null ? { additionalProperties } : {};
344
226
  const requiredProperties = Object.keys(zodRef.shape).filter((key) => {
345
227
  const item = zodRef.shape[key];
346
- return (
347
- !(
348
- item.isOptional() ||
349
- item instanceof zod_1.z.ZodDefault ||
350
- item._def.typeName === 'ZodDefault'
351
- ) &&
352
- !(
353
- item instanceof zod_1.z.ZodNever ||
354
- item._def.typeName === 'ZodDefault'
355
- )
356
- );
228
+ return !(item.isOptional() || item instanceof zod_1.z.ZodDefault || item._def.typeName === "ZodDefault") && !(item instanceof zod_1.z.ZodNever || item._def.typeName === "ZodDefault");
357
229
  });
358
- const required =
359
- requiredProperties.length > 0 ? { required: requiredProperties } : {};
360
- return (0, ts_deepmerge_1.default)(
361
- Object.assign(
362
- Object.assign(
363
- Object.assign(
364
- {
365
- type: typeFormat('object', openApiVersion),
366
- properties: iterateZodObject({
367
- zodRef,
368
- schemas,
369
- useOutput,
370
- hideDefinitions: getExcludedDefinitionsFromSchema(schemas),
371
- openApiVersion
372
- })
373
- },
374
- required
375
- ),
376
- additionalProperties
377
- ),
378
- hideDefinitions
379
- ),
380
- zodRef.description
381
- ? { description: zodRef.description, hideDefinitions }
382
- : {},
383
- ...schemas
384
- );
230
+ const required = requiredProperties.length > 0 ? { required: requiredProperties } : {};
231
+ return (0, ts_deepmerge_1.default)(Object.assign(Object.assign(Object.assign({ type: typeFormat("object", openApiVersion), properties: iterateZodObject({
232
+ zodRef,
233
+ schemas,
234
+ useOutput,
235
+ hideDefinitions: getExcludedDefinitionsFromSchema(schemas),
236
+ openApiVersion
237
+ }) }, required), additionalProperties), hideDefinitions), zodRef.description ? { description: zodRef.description, hideDefinitions } : {}, ...schemas);
385
238
  }
386
239
  function parseRecord({ zodRef, schemas, useOutput, openApiVersion }) {
387
- return (0, ts_deepmerge_1.default)(
388
- {
389
- type: typeFormat('object', openApiVersion),
390
- additionalProperties:
391
- zodRef._def.valueType instanceof zod_1.z.ZodUnknown
392
- ? {}
393
- : generateSchema2(
394
- zodRef._def.valueType,
395
- useOutput,
396
- openApiVersion
397
- )
398
- },
399
- zodRef.description ? { description: zodRef.description } : {},
400
- ...schemas
401
- );
240
+ return (0, ts_deepmerge_1.default)({
241
+ type: typeFormat("object", openApiVersion),
242
+ additionalProperties: zodRef._def.valueType instanceof zod_1.z.ZodUnknown ? {} : generateSchema2(zodRef._def.valueType, useOutput, openApiVersion)
243
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
402
244
  }
403
245
  function parseBigInt({ zodRef, schemas, openApiVersion }) {
404
- return (0, ts_deepmerge_1.default)(
405
- {
406
- type: typeFormat('integer', openApiVersion),
407
- format: 'int64'
408
- },
409
- zodRef.description ? { description: zodRef.description } : {},
410
- ...schemas
411
- );
246
+ return (0, ts_deepmerge_1.default)({
247
+ type: typeFormat("integer", openApiVersion),
248
+ format: "int64"
249
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
412
250
  }
413
251
  function parseBoolean({ zodRef, schemas, openApiVersion }) {
414
- return (0, ts_deepmerge_1.default)(
415
- { type: typeFormat('boolean', openApiVersion) },
416
- zodRef.description ? { description: zodRef.description } : {},
417
- ...schemas
418
- );
252
+ return (0, ts_deepmerge_1.default)({ type: typeFormat("boolean", openApiVersion) }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
419
253
  }
420
254
  function parseDate({ zodRef, schemas, openApiVersion }) {
421
- return (0, ts_deepmerge_1.default)(
422
- {
423
- type: typeFormat('string', openApiVersion),
424
- format: 'date-time'
425
- },
426
- zodRef.description ? { description: zodRef.description } : {},
427
- ...schemas
428
- );
255
+ return (0, ts_deepmerge_1.default)({
256
+ type: typeFormat("string", openApiVersion),
257
+ format: "date-time"
258
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
429
259
  }
430
260
  function parseNull({ zodRef, schemas, openApiVersion }) {
431
- return (0, ts_deepmerge_1.default)(
432
- openApiVersion === '3.0'
433
- ? { type: 'null' }
434
- : {
435
- type: ['string', 'null'],
436
- enum: ['null']
437
- },
438
- zodRef.description ? { description: zodRef.description } : {},
439
- ...schemas
440
- );
261
+ return (0, ts_deepmerge_1.default)(openApiVersion === "3.0" ? { type: "null" } : {
262
+ type: ["string", "null"],
263
+ enum: ["null"]
264
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
441
265
  }
442
266
  function parseOptional({ schemas, zodRef, useOutput, openApiVersion }) {
443
- return (0, ts_deepmerge_1.default)(
444
- generateSchema2(zodRef.unwrap(), useOutput, openApiVersion),
445
- zodRef.description ? { description: zodRef.description } : {},
446
- ...schemas
447
- );
267
+ return (0, ts_deepmerge_1.default)(generateSchema2(zodRef.unwrap(), useOutput, openApiVersion), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
448
268
  }
449
269
  function parseNullable({ schemas, zodRef, useOutput, openApiVersion }) {
450
- const schema = generateSchema2(
451
- zodRef.unwrap(),
452
- useOutput,
453
- openApiVersion
454
- );
455
- return (0, ts_deepmerge_1.default)(
456
- schema,
457
- openApiVersion === '3.0'
458
- ? { nullable: true }
459
- : { type: typeFormat('null', openApiVersion) },
460
- zodRef.description ? { description: zodRef.description } : {},
461
- ...schemas
462
- );
270
+ const schema = generateSchema2(zodRef.unwrap(), useOutput, openApiVersion);
271
+ return (0, ts_deepmerge_1.default)(schema, openApiVersion === "3.0" ? { nullable: true } : { type: typeFormat("null", openApiVersion) }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
463
272
  }
464
273
  function parseDefault({ schemas, zodRef, useOutput, openApiVersion }) {
465
- return (0, ts_deepmerge_1.default)(
466
- Object.assign(
467
- { default: zodRef._def.defaultValue() },
468
- generateSchema2(zodRef._def.innerType, useOutput, openApiVersion)
469
- ),
470
- zodRef.description ? { description: zodRef.description } : {},
471
- ...schemas
472
- );
274
+ return (0, ts_deepmerge_1.default)(Object.assign({ default: zodRef._def.defaultValue() }, generateSchema2(zodRef._def.innerType, useOutput, openApiVersion)), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
473
275
  }
474
276
  function parseArray({ schemas, zodRef, useOutput, openApiVersion }) {
475
277
  const constraints = {};
@@ -481,149 +283,70 @@ var require_zod_openapi = __commonJS({
481
283
  constraints.minItems = zodRef._def.minLength.value;
482
284
  if (zodRef._def.maxLength != null)
483
285
  constraints.maxItems = zodRef._def.maxLength.value;
484
- return (0, ts_deepmerge_1.default)(
485
- Object.assign(
486
- {
487
- type: typeFormat('array', openApiVersion),
488
- items: generateSchema2(zodRef.element, useOutput, openApiVersion)
489
- },
490
- constraints
491
- ),
492
- zodRef.description ? { description: zodRef.description } : {},
493
- ...schemas
494
- );
286
+ return (0, ts_deepmerge_1.default)(Object.assign({ type: typeFormat("array", openApiVersion), items: generateSchema2(zodRef.element, useOutput, openApiVersion) }, constraints), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
495
287
  }
496
288
  function parseLiteral({ schemas, zodRef, openApiVersion }) {
497
289
  const type3 = typeof zodRef._def.value;
498
- return (0, ts_deepmerge_1.default)(
499
- {
500
- type: typeFormat(type3, openApiVersion),
501
- enum: [zodRef._def.value]
502
- },
503
- zodRef.description ? { description: zodRef.description } : {},
504
- ...schemas
505
- );
290
+ return (0, ts_deepmerge_1.default)({
291
+ type: typeFormat(type3, openApiVersion),
292
+ enum: [zodRef._def.value]
293
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
506
294
  }
507
295
  function parseEnum({ schemas, zodRef, openApiVersion }) {
508
296
  const type3 = typeof Object.values(zodRef._def.values)[0];
509
- return (0, ts_deepmerge_1.default)(
510
- {
511
- type: typeFormat(type3, openApiVersion),
512
- enum: Object.values(zodRef._def.values)
513
- },
514
- zodRef.description ? { description: zodRef.description } : {},
515
- ...schemas
516
- );
297
+ return (0, ts_deepmerge_1.default)({
298
+ type: typeFormat(type3, openApiVersion),
299
+ enum: Object.values(zodRef._def.values)
300
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
517
301
  }
518
302
  function parseIntersection({ schemas, zodRef, useOutput, openApiVersion }) {
519
- return (0, ts_deepmerge_1.default)(
520
- {
521
- allOf: [
522
- generateSchema2(zodRef._def.left, useOutput, openApiVersion),
523
- generateSchema2(zodRef._def.right, useOutput, openApiVersion)
524
- ]
525
- },
526
- zodRef.description ? { description: zodRef.description } : {},
527
- ...schemas
528
- );
303
+ return (0, ts_deepmerge_1.default)({
304
+ allOf: [
305
+ generateSchema2(zodRef._def.left, useOutput, openApiVersion),
306
+ generateSchema2(zodRef._def.right, useOutput, openApiVersion)
307
+ ]
308
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
529
309
  }
530
310
  function parseUnion({ schemas, zodRef, useOutput, openApiVersion }) {
531
311
  const contents = zodRef._def.options;
532
- if (
533
- contents.reduce(
534
- (prev, content) => prev && content._def.typeName === 'ZodLiteral',
535
- true
536
- )
537
- ) {
312
+ if (contents.reduce((prev, content) => prev && content._def.typeName === "ZodLiteral", true)) {
538
313
  const literals = contents;
539
- const type3 = literals.reduce(
540
- (prev, content) =>
541
- !prev || prev === typeof content._def.value
542
- ? typeof content._def.value
543
- : null,
544
- null
545
- );
314
+ const type3 = literals.reduce((prev, content) => !prev || prev === typeof content._def.value ? typeof content._def.value : null, null);
546
315
  if (type3) {
547
- return (0, ts_deepmerge_1.default)(
548
- {
549
- type: typeFormat(type3, openApiVersion),
550
- enum: literals.map((literal3) => literal3._def.value)
551
- },
552
- zodRef.description ? { description: zodRef.description } : {},
553
- ...schemas
554
- );
316
+ return (0, ts_deepmerge_1.default)({
317
+ type: typeFormat(type3, openApiVersion),
318
+ enum: literals.map((literal3) => literal3._def.value)
319
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
555
320
  }
556
321
  }
557
- const oneOfContents =
558
- openApiVersion === '3.0'
559
- ? contents.filter((content) => content._def.typeName !== 'ZodNull')
560
- : contents;
322
+ const oneOfContents = openApiVersion === "3.0" ? contents.filter((content) => content._def.typeName !== "ZodNull") : contents;
561
323
  const contentsHasNull = contents.length != oneOfContents.length;
562
- return (0, ts_deepmerge_1.default)(
563
- {
564
- oneOf: oneOfContents.map((schema) =>
565
- generateSchema2(schema, useOutput, openApiVersion)
566
- )
567
- },
568
- contentsHasNull ? { nullable: true } : {},
569
- zodRef.description ? { description: zodRef.description } : {},
570
- ...schemas
571
- );
324
+ return (0, ts_deepmerge_1.default)({
325
+ oneOf: oneOfContents.map((schema) => generateSchema2(schema, useOutput, openApiVersion))
326
+ }, contentsHasNull ? { nullable: true } : {}, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
572
327
  }
573
- function parseDiscriminatedUnion({
574
- schemas,
575
- zodRef,
576
- useOutput,
577
- openApiVersion
578
- }) {
579
- return (0, ts_deepmerge_1.default)(
580
- {
581
- discriminator: {
582
- propertyName: zodRef._def.discriminator
583
- },
584
- oneOf: Array.from(zodRef._def.options.values()).map((schema) =>
585
- generateSchema2(schema, useOutput, openApiVersion)
586
- )
328
+ function parseDiscriminatedUnion({ schemas, zodRef, useOutput, openApiVersion }) {
329
+ return (0, ts_deepmerge_1.default)({
330
+ discriminator: {
331
+ propertyName: zodRef._def.discriminator
587
332
  },
588
- zodRef.description ? { description: zodRef.description } : {},
589
- ...schemas
590
- );
333
+ oneOf: Array.from(zodRef._def.options.values()).map((schema) => generateSchema2(schema, useOutput, openApiVersion))
334
+ }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
591
335
  }
592
336
  function parseNever({ zodRef, schemas }) {
593
- return (0, ts_deepmerge_1.default)(
594
- { readOnly: true },
595
- zodRef.description ? { description: zodRef.description } : {},
596
- ...schemas
597
- );
337
+ return (0, ts_deepmerge_1.default)({ readOnly: true }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
598
338
  }
599
339
  function parseBranded({ schemas, zodRef, useOutput, openApiVersion }) {
600
- return (0, ts_deepmerge_1.default)(
601
- generateSchema2(zodRef._def.type, useOutput, openApiVersion),
602
- ...schemas
603
- );
340
+ return (0, ts_deepmerge_1.default)(generateSchema2(zodRef._def.type, useOutput, openApiVersion), ...schemas);
604
341
  }
605
342
  function catchAllParser({ zodRef, schemas }) {
606
- return (0, ts_deepmerge_1.default)(
607
- zodRef.description ? { description: zodRef.description } : {},
608
- ...schemas
609
- );
343
+ return (0, ts_deepmerge_1.default)(zodRef.description ? { description: zodRef.description } : {}, ...schemas);
610
344
  }
611
345
  function parsePipeline({ schemas, zodRef, useOutput, openApiVersion }) {
612
- return (0, ts_deepmerge_1.default)(
613
- generateSchema2(
614
- useOutput ? zodRef._def.out : zodRef._def.in,
615
- useOutput,
616
- openApiVersion
617
- ),
618
- ...schemas
619
- );
346
+ return (0, ts_deepmerge_1.default)(generateSchema2(useOutput ? zodRef._def.out : zodRef._def.in, useOutput, openApiVersion), ...schemas);
620
347
  }
621
348
  function parseReadonly({ zodRef, useOutput, schemas, openApiVersion }) {
622
- return (0, ts_deepmerge_1.default)(
623
- generateSchema2(zodRef._def.innerType, useOutput, openApiVersion),
624
- zodRef.description ? { description: zodRef.description } : {},
625
- ...schemas
626
- );
349
+ return (0, ts_deepmerge_1.default)(generateSchema2(zodRef._def.innerType, useOutput, openApiVersion), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
627
350
  }
628
351
  var workerMap = {
629
352
  ZodObject: parseObject,
@@ -662,14 +385,10 @@ var require_zod_openapi = __commonJS({
662
385
  ZodPipeline: parsePipeline,
663
386
  ZodReadonly: parseReadonly
664
387
  };
665
- function generateSchema2(
666
- zodRef,
667
- useOutput = false,
668
- openApiVersion = '3.1'
669
- ) {
388
+ function generateSchema2(zodRef, useOutput = false, openApiVersion = "3.1") {
670
389
  const { metaOpenApi = {} } = zodRef;
671
390
  const schemas = [
672
- ...(Array.isArray(metaOpenApi) ? metaOpenApi : [metaOpenApi])
391
+ ...Array.isArray(metaOpenApi) ? metaOpenApi : [metaOpenApi]
673
392
  ];
674
393
  try {
675
394
  const typeName = zodRef._def.typeName;
@@ -691,23 +410,18 @@ var require_zod_openapi = __commonJS({
691
410
  }
692
411
  });
693
412
 
694
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js
413
+ // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js
695
414
  var require_zod_extensions = __commonJS({
696
- '../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js'(
697
- exports2
698
- ) {
699
- 'use strict';
700
- Object.defineProperty(exports2, '__esModule', { value: true });
415
+ "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js"(exports2) {
416
+ "use strict";
417
+ Object.defineProperty(exports2, "__esModule", { value: true });
701
418
  exports2.extendZodWithOpenApi = void 0;
702
419
  var zod_openapi_1 = require_zod_openapi();
703
420
  function extendZodWithOpenApi2(zod, forceOverride = false) {
704
- if (
705
- !forceOverride &&
706
- typeof zod.ZodSchema.prototype.openapi !== 'undefined'
707
- ) {
421
+ if (!forceOverride && typeof zod.ZodSchema.prototype.openapi !== "undefined") {
708
422
  return;
709
423
  }
710
- zod.ZodSchema.prototype.openapi = function (metadata) {
424
+ zod.ZodSchema.prototype.openapi = function(metadata) {
711
425
  return (0, zod_openapi_1.extendApi)(this, metadata);
712
426
  };
713
427
  }
@@ -715,48 +429,27 @@ var require_zod_extensions = __commonJS({
715
429
  }
716
430
  });
717
431
 
718
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/index.js
432
+ // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/index.js
719
433
  var require_src = __commonJS({
720
- '../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.4.0_zod@3.25.67/node_modules/@anatine/zod-openapi/src/index.js'(
721
- exports2
722
- ) {
723
- 'use strict';
724
- var __createBinding =
725
- (exports2 && exports2.__createBinding) ||
726
- (Object.create
727
- ? function (o, m, k, k2) {
728
- if (k2 === void 0) k2 = k;
729
- var desc = Object.getOwnPropertyDescriptor(m, k);
730
- if (
731
- !desc ||
732
- ('get' in desc
733
- ? !m.__esModule
734
- : desc.writable || desc.configurable)
735
- ) {
736
- desc = {
737
- enumerable: true,
738
- get: function () {
739
- return m[k];
740
- }
741
- };
742
- }
743
- Object.defineProperty(o, k2, desc);
744
- }
745
- : function (o, m, k, k2) {
746
- if (k2 === void 0) k2 = k;
747
- o[k2] = m[k];
748
- });
749
- var __exportStar =
750
- (exports2 && exports2.__exportStar) ||
751
- function (m, exports3) {
752
- for (var p in m)
753
- if (
754
- p !== 'default' &&
755
- !Object.prototype.hasOwnProperty.call(exports3, p)
756
- )
757
- __createBinding(exports3, m, p);
758
- };
759
- Object.defineProperty(exports2, '__esModule', { value: true });
434
+ "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.71/node_modules/@anatine/zod-openapi/src/index.js"(exports2) {
435
+ "use strict";
436
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
437
+ if (k2 === void 0) k2 = k;
438
+ var desc = Object.getOwnPropertyDescriptor(m, k);
439
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
440
+ desc = { enumerable: true, get: function() {
441
+ return m[k];
442
+ } };
443
+ }
444
+ Object.defineProperty(o, k2, desc);
445
+ } : function(o, m, k, k2) {
446
+ if (k2 === void 0) k2 = k;
447
+ o[k2] = m[k];
448
+ });
449
+ var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
450
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
451
+ };
452
+ Object.defineProperty(exports2, "__esModule", { value: true });
760
453
  __exportStar(require_zod_openapi(), exports2);
761
454
  __exportStar(require_zod_extensions(), exports2);
762
455
  }
@@ -770,250 +463,260 @@ __export(schemas_exports, {
770
463
  module.exports = __toCommonJS(schemas_exports);
771
464
 
772
465
  // domain/schemas/redisWorker.schema.ts
773
- var import_internal = require('@forklaunch/internal');
466
+ var import_internal = require("@forklaunch/internal");
774
467
 
775
- // ../../../node_modules/.pnpm/@forklaunch+common@0.3.14/node_modules/@forklaunch/common/lib/index.mjs
776
- var InMemoryFile = class extends File {
777
- constructor(content, name, { type: type3, endings, lastModified }) {
778
- super([Buffer.from(content)], name, {
779
- type: type3,
780
- endings,
781
- lastModified
782
- });
468
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.4_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
469
+ var typebox_exports = {};
470
+ __export(typebox_exports, {
471
+ SchemaValidator: () => SchemaValidator,
472
+ TypeboxSchemaValidator: () => TypeboxSchemaValidator,
473
+ any: () => any,
474
+ array: () => array,
475
+ bigint: () => bigint,
476
+ binary: () => binary,
477
+ boolean: () => boolean,
478
+ date: () => date,
479
+ email: () => email,
480
+ enum_: () => enum_,
481
+ file: () => file,
482
+ function_: () => function_,
483
+ isSchema: () => isSchema,
484
+ literal: () => literal,
485
+ never: () => never,
486
+ null_: () => null_,
487
+ nullish: () => nullish,
488
+ number: () => number,
489
+ openapi: () => openapi,
490
+ optional: () => optional,
491
+ parse: () => parse,
492
+ promise: () => promise,
493
+ record: () => record,
494
+ schemify: () => schemify,
495
+ string: () => string,
496
+ symbol: () => symbol,
497
+ type: () => type,
498
+ undefined_: () => undefined_,
499
+ union: () => union,
500
+ unknown: () => unknown,
501
+ uri: () => uri,
502
+ uuid: () => uuid,
503
+ validate: () => validate,
504
+ void_: () => void_
505
+ });
506
+ __reExport(typebox_exports, require("@sinclair/typebox"));
507
+
508
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.4.2/node_modules/@forklaunch/common/lib/index.mjs
509
+ var InMemoryBlob = class extends Blob {
510
+ constructor(content) {
511
+ super([Buffer.from(content)]);
783
512
  this.content = content;
784
513
  }
785
514
  };
786
515
 
787
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.6.16_openapi3-ts@4.4.0/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
788
- var import_typebox = require('@sinclair/typebox');
789
- var import_compiler = require('@sinclair/typebox/compiler');
790
- var import_errors = require('@sinclair/typebox/errors');
791
- var import_value = require('@sinclair/typebox/value');
792
- import_typebox.FormatRegistry.Set(
793
- 'binary',
794
- (value) => typeof value === 'string'
795
- );
516
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.4_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
517
+ var import_typebox = require("@sinclair/typebox");
518
+ var import_compiler = require("@sinclair/typebox/compiler");
519
+ var import_errors = require("@sinclair/typebox/errors");
520
+ var import_value = require("@sinclair/typebox/value");
521
+ import_typebox.FormatRegistry.Set("binary", (value) => typeof value === "string");
796
522
  (0, import_errors.SetErrorFunction)((params) => {
797
523
  switch (params.errorType) {
798
524
  case import_errors.ValueErrorType.Union:
799
525
  case import_errors.ValueErrorType.Array:
800
526
  case import_errors.ValueErrorType.String:
801
527
  case import_errors.ValueErrorType.Number:
802
- return params.schema.errorType
803
- ? `Expected ${params.schema.errorType} value${params.schema.errorSuffix ? 's' : ''}`
804
- : (0, import_errors.DefaultErrorFunction)(params);
528
+ return params.schema.errorType ? `Expected ${params.schema.errorType} value${params.schema.errorSuffix ? "s" : ""}` : (0, import_errors.DefaultErrorFunction)(params);
805
529
  default:
806
530
  return (0, import_errors.DefaultErrorFunction)(params);
807
531
  }
808
532
  });
809
533
  var TypeboxSchemaValidator = class {
810
- _Type = 'TypeBox';
534
+ _Type = "TypeBox";
811
535
  _SchemaCatchall;
812
536
  _ValidSchemaObject;
813
537
  string = import_typebox.Type.String({
814
- example: 'a string',
815
- title: 'String'
538
+ example: "a string",
539
+ title: "String"
816
540
  });
817
541
  uuid = import_typebox.Type.String({
818
- pattern:
819
- '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$',
820
- errorType: 'uuid',
821
- example: 'a8b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6',
822
- title: 'UUID'
542
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
543
+ errorType: "uuid",
544
+ example: "a8b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
545
+ title: "UUID"
823
546
  });
824
547
  email = import_typebox.Type.String({
825
548
  pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
826
- errorType: 'email',
827
- example: 'a@b.com',
828
- title: 'Email'
549
+ errorType: "email",
550
+ example: "a@b.com",
551
+ title: "Email"
829
552
  });
830
553
  uri = import_typebox.Type.String({
831
- pattern: '^[a-zA-Z][a-zA-Z\\d+-.]*:[^\\s]*$',
832
- errorType: 'uri',
833
- example: 'https://forklaunch.com',
834
- title: 'URI'
554
+ pattern: "^[a-zA-Z][a-zA-Z\\d+-.]*:[^\\s]*$",
555
+ errorType: "uri",
556
+ example: "https://forklaunch.com",
557
+ title: "URI"
835
558
  });
836
559
  number = import_typebox.Type.Transform(
837
560
  import_typebox.Type.Union(
838
561
  [
839
562
  import_typebox.Type.Number(),
840
- import_typebox.Type.String({ pattern: '^[0-9]+$' }),
563
+ import_typebox.Type.String({ pattern: "^[0-9]+$" }),
841
564
  import_typebox.Type.Boolean(),
842
565
  import_typebox.Type.Null(),
843
566
  import_typebox.Type.BigInt(),
844
567
  import_typebox.Type.Date()
845
568
  ],
846
569
  {
847
- errorType: 'number-like',
570
+ errorType: "number-like",
848
571
  example: 123,
849
- title: 'Number'
572
+ title: "Number"
850
573
  }
851
574
  )
852
- )
853
- .Decode((value) => {
854
- if (typeof value !== 'number') {
855
- const num = Number(value);
856
- if (isNaN(num)) {
857
- throw new Error('Invalid number');
858
- } else {
859
- return num;
860
- }
575
+ ).Decode((value) => {
576
+ if (typeof value !== "number") {
577
+ const num = Number(value);
578
+ if (isNaN(num)) {
579
+ throw new Error("Invalid number");
580
+ } else {
581
+ return num;
861
582
  }
862
- return value;
863
- })
864
- .Encode(Number);
583
+ }
584
+ return value;
585
+ }).Encode(Number);
865
586
  bigint = import_typebox.Type.Transform(
866
587
  import_typebox.Type.Union(
867
588
  [
868
589
  import_typebox.Type.BigInt(),
869
590
  import_typebox.Type.Number(),
870
- import_typebox.Type.String({ pattern: '^[0-9]+n?$' }),
591
+ import_typebox.Type.String({ pattern: "^[0-9]+n?$" }),
871
592
  import_typebox.Type.Boolean(),
872
593
  import_typebox.Type.Date()
873
594
  ],
874
595
  {
875
- errorType: 'BigInt-like',
596
+ errorType: "BigInt-like",
876
597
  example: 123n,
877
- title: 'BigInt'
598
+ title: "BigInt"
878
599
  }
879
600
  )
880
- )
881
- .Decode((value) => {
882
- if (typeof value !== 'bigint') {
883
- try {
884
- if (value instanceof Date) {
885
- return BigInt(value.getTime());
886
- }
887
- return BigInt(value);
888
- } catch {
889
- throw new Error('Invalid bigint');
601
+ ).Decode((value) => {
602
+ if (typeof value !== "bigint") {
603
+ try {
604
+ if (value instanceof Date) {
605
+ return BigInt(value.getTime());
890
606
  }
607
+ return BigInt(value);
608
+ } catch {
609
+ throw new Error("Invalid bigint");
891
610
  }
892
- return value;
893
- })
894
- .Encode(BigInt);
611
+ }
612
+ return value;
613
+ }).Encode(BigInt);
895
614
  boolean = import_typebox.Type.Transform(
896
615
  import_typebox.Type.Union(
897
616
  [
898
617
  import_typebox.Type.Boolean(),
899
618
  import_typebox.Type.String({
900
- pattern: '^(t|T)(r|R)(u|U)(e|E)$|^(f|F)(a|A)(l|L)(s|S)(e|E)$'
619
+ pattern: "^(t|T)(r|R)(u|U)(e|E)$|^(f|F)(a|A)(l|L)(s|S)(e|E)$"
901
620
  })
902
621
  ],
903
622
  {
904
- errorType: 'boolean-like',
623
+ errorType: "boolean-like",
905
624
  example: true,
906
- title: 'Boolean'
625
+ title: "Boolean"
907
626
  }
908
627
  )
909
- )
910
- .Decode((value) => {
911
- if (typeof value === 'string') {
912
- if (value.toLowerCase() === 'true') return true;
913
- return false;
914
- } else {
915
- return value;
916
- }
917
- })
918
- .Encode(Boolean);
628
+ ).Decode((value) => {
629
+ if (typeof value === "string") {
630
+ if (value.toLowerCase() === "true") return true;
631
+ return false;
632
+ } else {
633
+ return value;
634
+ }
635
+ }).Encode(Boolean);
919
636
  date = import_typebox.Type.Transform(
920
637
  import_typebox.Type.Union(
921
638
  [
922
639
  import_typebox.Type.String({
923
- pattern:
924
- '^\\d{4}(-\\d{2}){0,2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|([+-]\\d{2}:\\d{2}))?)?$|^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$|^\\d{4}\\/\\d{1,2}\\/\\d{1,2}$|^\\d+$'
640
+ pattern: "^\\d{4}(-\\d{2}){0,2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|([+-]\\d{2}:\\d{2}))?)?$|^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$|^\\d{4}\\/\\d{1,2}\\/\\d{1,2}$|^\\d+$"
925
641
  }),
926
642
  import_typebox.Type.Number(),
927
643
  import_typebox.Type.Date()
928
644
  ],
929
645
  {
930
- errorType: 'date',
931
- example: '2025-05-16T21:13:04.123Z',
932
- title: 'Date'
646
+ errorType: "date",
647
+ example: "2025-05-16T21:13:04.123Z",
648
+ title: "Date"
933
649
  }
934
650
  )
935
- )
936
- .Decode((value) => {
937
- if (value === null || typeof value === 'boolean') {
938
- return /* @__PURE__ */ new Date(value ? 1 : 0);
939
- }
940
- return new Date(value);
941
- })
942
- .Encode((value) => new Date(value).toISOString());
651
+ ).Decode((value) => {
652
+ if (value === null || typeof value === "boolean") {
653
+ return /* @__PURE__ */ new Date(value ? 1 : 0);
654
+ }
655
+ return new Date(value);
656
+ }).Encode((value) => new Date(value).toISOString());
943
657
  symbol = import_typebox.Type.Symbol({
944
- title: 'Symbol'
658
+ title: "Symbol"
945
659
  });
946
660
  nullish = import_typebox.Type.Union(
947
- [
948
- import_typebox.Type.Void(),
949
- import_typebox.Type.Null(),
950
- import_typebox.Type.Undefined()
951
- ],
661
+ [import_typebox.Type.Void(), import_typebox.Type.Null(), import_typebox.Type.Undefined()],
952
662
  {
953
- errorType: 'nullish',
954
- type: 'null',
955
- example: 'null',
956
- title: 'Nullish'
663
+ errorType: "nullish",
664
+ type: "null",
665
+ example: "null",
666
+ title: "Nullish"
957
667
  }
958
668
  );
959
669
  void = import_typebox.Type.Void({
960
- type: 'null',
961
- example: 'void',
962
- title: 'Void'
670
+ type: "null",
671
+ example: "void",
672
+ title: "Void"
963
673
  });
964
674
  null = import_typebox.Type.Null({
965
- type: 'null',
966
- example: 'null',
967
- title: 'Null'
675
+ type: "null",
676
+ example: "null",
677
+ title: "Null"
968
678
  });
969
679
  undefined = import_typebox.Type.Undefined({
970
- type: 'null',
971
- example: 'undefined',
972
- title: 'Undefined'
680
+ type: "null",
681
+ example: "undefined",
682
+ title: "Undefined"
973
683
  });
974
684
  any = import_typebox.Type.Any({
975
- type: 'object',
976
- example: 'any',
977
- title: 'Any'
685
+ type: "object",
686
+ example: "any",
687
+ title: "Any"
978
688
  });
979
689
  unknown = import_typebox.Type.Unknown({
980
- type: 'object',
981
- example: 'unknown',
982
- title: 'Unknown'
690
+ type: "object",
691
+ example: "unknown",
692
+ title: "Unknown"
983
693
  });
984
694
  never = import_typebox.Type.Never({
985
- type: 'null',
986
- example: 'never',
987
- title: 'Never'
695
+ type: "null",
696
+ example: "never",
697
+ title: "Never"
988
698
  });
989
699
  binary = import_typebox.Type.Transform(
990
700
  import_typebox.Type.String({
991
- errorType: 'binary',
992
- format: 'binary',
993
- example: 'a utf-8 encodable string',
994
- title: 'Binary'
701
+ errorType: "binary",
702
+ format: "binary",
703
+ example: "a utf-8 encodable string",
704
+ title: "Binary"
995
705
  })
996
- )
997
- .Decode((value) => new TextEncoder().encode(value))
998
- .Encode((value) => {
999
- if (value instanceof ArrayBuffer) {
1000
- return String.fromCharCode(...new Uint8Array(value));
1001
- }
1002
- return '';
1003
- });
706
+ ).Decode((value) => new TextEncoder().encode(value)).Encode((value) => {
707
+ if (value instanceof ArrayBuffer) {
708
+ return String.fromCharCode(...new Uint8Array(value));
709
+ }
710
+ return "";
711
+ });
1004
712
  file = import_typebox.Type.Transform(
1005
713
  import_typebox.Type.String({
1006
- errorType: 'binary',
1007
- format: 'binary',
1008
- example: 'a utf-8 encodable string',
1009
- title: 'File'
714
+ errorType: "binary",
715
+ format: "binary",
716
+ example: "a utf-8 encodable blob or file",
717
+ title: "File"
1010
718
  })
1011
- )
1012
- .Decode(
1013
- (value) => (name, type22) =>
1014
- new InMemoryFile(value, name, { type: type22 })
1015
- )
1016
- .Encode((value) => value('name', 'type').content);
719
+ ).Decode((value) => new InMemoryBlob(value)).Encode((value) => value.content);
1017
720
  type = () => this.any;
1018
721
  /**
1019
722
  * Extracts the error type of a schema for error messages.
@@ -1022,10 +725,7 @@ var TypeboxSchemaValidator = class {
1022
725
  * @returns The type of the schema for error messages.
1023
726
  */
1024
727
  errorType(schema) {
1025
- if (
1026
- import_typebox.KindGuard.IsSchema(schema) &&
1027
- Object.hasOwn(schema, 'errorType')
1028
- ) {
728
+ if (import_typebox.KindGuard.IsSchema(schema) && Object.hasOwn(schema, "errorType")) {
1029
729
  return schema.errorType;
1030
730
  } else if (import_typebox.KindGuard.IsLiteral(schema)) {
1031
731
  return schema.const;
@@ -1047,17 +747,10 @@ var TypeboxSchemaValidator = class {
1047
747
  * @returns {TResolve<T>} The resolved schema.
1048
748
  */
1049
749
  schemify(schema) {
1050
- if (
1051
- import_typebox.KindGuard.IsSchema(schema) ||
1052
- schema instanceof import_compiler.TypeCheck
1053
- ) {
750
+ if (import_typebox.KindGuard.IsSchema(schema) || schema instanceof import_compiler.TypeCheck) {
1054
751
  return schema;
1055
752
  }
1056
- if (
1057
- typeof schema === 'string' ||
1058
- typeof schema === 'number' ||
1059
- typeof schema === 'boolean'
1060
- ) {
753
+ if (typeof schema === "string" || typeof schema === "number" || typeof schema === "boolean") {
1061
754
  return import_typebox.Type.Literal(schema);
1062
755
  }
1063
756
  const newSchema = {};
@@ -1104,7 +797,7 @@ var TypeboxSchemaValidator = class {
1104
797
  return this.schemify(schema);
1105
798
  });
1106
799
  return import_typebox.Type.Union(unionTypes, {
1107
- errorType: `any of ${unionTypes.map((s) => this.errorType(s)).join(', ')}`,
800
+ errorType: `any of ${unionTypes.map((s) => this.errorType(s)).join(", ")}`,
1108
801
  errorSuffix: true
1109
802
  });
1110
803
  }
@@ -1175,12 +868,7 @@ var TypeboxSchemaValidator = class {
1175
868
  * @returns {boolean} True if the value is an instance of the schema.
1176
869
  */
1177
870
  isInstanceOf(value, type22) {
1178
- return (
1179
- typeof value === 'object' &&
1180
- value != null &&
1181
- import_typebox.Kind in value &&
1182
- value[import_typebox.Kind] === type22[import_typebox.Kind]
1183
- );
871
+ return typeof value === "object" && value != null && import_typebox.Kind in value && value[import_typebox.Kind] === type22[import_typebox.Kind];
1184
872
  }
1185
873
  /**
1186
874
  * Validate a value against a schema.
@@ -1221,38 +909,33 @@ var TypeboxSchemaValidator = class {
1221
909
  errors = Array.from(import_value.Value.Errors(schemified, value));
1222
910
  }
1223
911
  }
1224
- return errors != null && errors.length === 0
1225
- ? {
1226
- ok: true,
1227
- value: conversion
1228
- }
1229
- : {
1230
- ok: false,
1231
- errors: errors.flatMap((error) => {
1232
- if (
1233
- error.type === import_errors.ValueErrorType.Union &&
1234
- error.schema.errorType.includes('any of')
1235
- ) {
1236
- return error.errors.flatMap((e, idx) =>
1237
- Array.from(e).map((e2) => ({
1238
- path: [
1239
- `Union Schema Variant ${idx}`,
1240
- ...error.path.split('/').slice(1),
1241
- ...e2.path.split('/').slice(1)
1242
- ],
1243
- message: e2.message
1244
- }))
1245
- );
1246
- } else {
1247
- return [
1248
- {
1249
- path: error.path.split('/').slice(1),
1250
- message: error.message
1251
- }
1252
- ];
912
+ return errors != null && errors.length === 0 ? {
913
+ ok: true,
914
+ value: conversion
915
+ } : {
916
+ ok: false,
917
+ errors: errors.flatMap((error) => {
918
+ if (error.type === import_errors.ValueErrorType.Union && error.schema.errorType.includes("any of")) {
919
+ return error.errors.flatMap(
920
+ (e, idx) => Array.from(e).map((e2) => ({
921
+ path: [
922
+ `Union Schema Variant ${idx}`,
923
+ ...error.path.split("/").slice(1),
924
+ ...e2.path.split("/").slice(1)
925
+ ],
926
+ message: e2.message
927
+ }))
928
+ );
929
+ } else {
930
+ return [
931
+ {
932
+ path: error.path.split("/").slice(1),
933
+ message: error.message
1253
934
  }
1254
- })
1255
- };
935
+ ];
936
+ }
937
+ })
938
+ };
1256
939
  }
1257
940
  /**
1258
941
  * Convert a schema to an OpenAPI schema object.
@@ -1263,33 +946,34 @@ var TypeboxSchemaValidator = class {
1263
946
  let schemified = this.schemify(schema);
1264
947
  if (import_typebox.KindGuard.IsDate(schemified)) {
1265
948
  schemified = import_typebox.Type.String({
1266
- format: 'date-time'
949
+ format: "date-time"
1267
950
  });
1268
951
  }
1269
952
  const newSchema = Object.assign({}, schemified);
1270
- if (Object.hasOwn(newSchema, 'properties')) {
953
+ if (Object.hasOwn(newSchema, "properties")) {
1271
954
  if (newSchema.properties) {
1272
955
  Object.entries({ ...schemified.properties }).forEach(([key, value]) => {
1273
- if (
1274
- import_typebox.KindGuard.IsSchema(value) &&
1275
- newSchema.properties
1276
- ) {
956
+ if (import_typebox.KindGuard.IsSchema(value) && newSchema.properties) {
1277
957
  newSchema.properties[key] = this.openapi(value);
1278
958
  }
1279
959
  });
1280
960
  }
1281
961
  }
1282
- if (Object.hasOwn(newSchema, 'items')) {
962
+ if (Object.hasOwn(newSchema, "items")) {
1283
963
  newSchema.items = this.openapi(newSchema.items);
1284
964
  }
1285
965
  if (Array.isArray(newSchema.anyOf)) {
1286
- newSchema.anyOf = newSchema.anyOf.map((item) => this.openapi(item));
966
+ newSchema.anyOf = newSchema.anyOf.map(
967
+ (item) => this.openapi(item)
968
+ );
1287
969
  }
1288
970
  if (Array.isArray(newSchema.oneOf)) {
1289
- newSchema.oneOf = newSchema.oneOf.map((item) => this.openapi(item));
971
+ newSchema.oneOf = newSchema.oneOf.map(
972
+ (item) => this.openapi(item)
973
+ );
1290
974
  }
1291
- if ('errorType' in newSchema) {
1292
- delete newSchema['errorType'];
975
+ if ("errorType" in newSchema) {
976
+ delete newSchema["errorType"];
1293
977
  }
1294
978
  return newSchema;
1295
979
  }
@@ -1336,172 +1020,151 @@ var RedisWorkerOptionsSchema = {
1336
1020
  interval: number
1337
1021
  };
1338
1022
 
1339
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.6.16_openapi3-ts@4.4.0/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1023
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.4_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1340
1024
  var import_zod_openapi = __toESM(require_src(), 1);
1341
- var import_zod = require('zod');
1025
+ var import_zod = require("zod");
1342
1026
  (0, import_zod_openapi.extendZodWithOpenApi)(import_zod.z);
1343
1027
  var ZodSchemaValidator = class {
1344
- _Type = 'Zod';
1028
+ _Type = "Zod";
1345
1029
  _SchemaCatchall;
1346
1030
  _ValidSchemaObject;
1347
1031
  string = import_zod.z.string().openapi({
1348
- title: 'String',
1349
- example: 'a string'
1032
+ title: "String",
1033
+ example: "a string"
1350
1034
  });
1351
1035
  uuid = import_zod.z.string().uuid().openapi({
1352
- title: 'UUID',
1353
- format: 'uuid',
1354
- pattern:
1355
- '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$',
1356
- example: 'a8b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6'
1036
+ title: "UUID",
1037
+ format: "uuid",
1038
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
1039
+ example: "a8b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"
1357
1040
  });
1358
1041
  email = import_zod.z.string().email().openapi({
1359
- title: 'Email',
1360
- format: 'email',
1042
+ title: "Email",
1043
+ format: "email",
1361
1044
  pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
1362
- example: 'a@b.com'
1045
+ example: "a@b.com"
1363
1046
  });
1364
1047
  uri = import_zod.z.string().url().openapi({
1365
- title: 'URI',
1366
- format: 'uri',
1367
- pattern: '^[a-zA-Z][a-zA-Z\\d+-.]*:[^\\s]*$',
1368
- example: 'https://forklaunch.com'
1048
+ title: "URI",
1049
+ format: "uri",
1050
+ pattern: "^[a-zA-Z][a-zA-Z\\d+-.]*:[^\\s]*$",
1051
+ example: "https://forklaunch.com"
1369
1052
  });
1370
- number = import_zod.z
1371
- .preprocess((value) => {
1372
- try {
1373
- return Number(value);
1374
- } catch {
1375
- return value;
1376
- }
1377
- }, import_zod.z.number())
1378
- .openapi({
1379
- title: 'Number',
1380
- example: 123
1381
- });
1382
- bigint = import_zod.z
1383
- .preprocess((value) => {
1384
- try {
1385
- if (value instanceof Date) {
1386
- return BigInt(value.getTime());
1387
- }
1388
- switch (typeof value) {
1389
- case 'number':
1390
- case 'string':
1391
- return BigInt(value);
1392
- case 'boolean':
1393
- return BigInt(value ? 1 : 0);
1394
- default:
1395
- return value;
1396
- }
1397
- } catch {
1398
- return value;
1053
+ number = import_zod.z.preprocess((value) => {
1054
+ try {
1055
+ return Number(value);
1056
+ } catch {
1057
+ return value;
1058
+ }
1059
+ }, import_zod.z.number()).openapi({
1060
+ title: "Number",
1061
+ example: 123
1062
+ });
1063
+ bigint = import_zod.z.preprocess((value) => {
1064
+ try {
1065
+ if (value instanceof Date) {
1066
+ return BigInt(value.getTime());
1399
1067
  }
1400
- }, import_zod.z.bigint())
1401
- .openapi({
1402
- title: 'BigInt',
1403
- type: 'integer',
1404
- format: 'int64',
1405
- example: 123n
1406
- });
1407
- boolean = import_zod.z
1408
- .preprocess((val) => {
1409
- if (typeof val === 'string') {
1410
- if (val.toLowerCase() === 'true') return true;
1411
- if (val.toLowerCase() === 'false') return false;
1068
+ switch (typeof value) {
1069
+ case "number":
1070
+ case "string":
1071
+ return BigInt(value);
1072
+ case "boolean":
1073
+ return BigInt(value ? 1 : 0);
1074
+ default:
1075
+ return value;
1412
1076
  }
1413
- return val;
1414
- }, import_zod.z.boolean())
1415
- .openapi({
1416
- title: 'Boolean',
1417
- example: true
1418
- });
1419
- date = import_zod.z
1420
- .preprocess((value) => {
1421
- try {
1422
- switch (typeof value) {
1423
- case 'string':
1424
- return new Date(value);
1425
- case 'number':
1426
- return new Date(value);
1427
- default:
1428
- return value;
1429
- }
1430
- } catch {
1431
- return value;
1077
+ } catch {
1078
+ return value;
1079
+ }
1080
+ }, import_zod.z.bigint()).openapi({
1081
+ title: "BigInt",
1082
+ type: "integer",
1083
+ format: "int64",
1084
+ example: 123n
1085
+ });
1086
+ boolean = import_zod.z.preprocess((val) => {
1087
+ if (typeof val === "string") {
1088
+ if (val.toLowerCase() === "true") return true;
1089
+ if (val.toLowerCase() === "false") return false;
1090
+ }
1091
+ return val;
1092
+ }, import_zod.z.boolean()).openapi({
1093
+ title: "Boolean",
1094
+ example: true
1095
+ });
1096
+ date = import_zod.z.preprocess((value) => {
1097
+ try {
1098
+ switch (typeof value) {
1099
+ case "string":
1100
+ return new Date(value);
1101
+ case "number":
1102
+ return new Date(value);
1103
+ default:
1104
+ return value;
1432
1105
  }
1433
- }, import_zod.z.date())
1434
- .openapi({
1435
- title: 'Date',
1436
- type: 'string',
1437
- format: 'date-time',
1438
- example: '2025-05-16T21:13:04.123Z'
1439
- });
1106
+ } catch {
1107
+ return value;
1108
+ }
1109
+ }, import_zod.z.date()).openapi({
1110
+ title: "Date",
1111
+ type: "string",
1112
+ format: "date-time",
1113
+ example: "2025-05-16T21:13:04.123Z"
1114
+ });
1440
1115
  symbol = import_zod.z.symbol().openapi({
1441
- title: 'Symbol',
1442
- example: Symbol('symbol')
1116
+ title: "Symbol",
1117
+ example: Symbol("symbol")
1118
+ });
1119
+ nullish = import_zod.z.union([import_zod.z.void(), import_zod.z.null(), import_zod.z.undefined()]).openapi({
1120
+ title: "Nullish",
1121
+ type: "null",
1122
+ example: null
1443
1123
  });
1444
- nullish = import_zod.z
1445
- .union([import_zod.z.void(), import_zod.z.null(), import_zod.z.undefined()])
1446
- .openapi({
1447
- title: 'Nullish',
1448
- type: 'null',
1449
- example: null
1450
- });
1451
1124
  void = import_zod.z.void().openapi({
1452
- title: 'Void',
1453
- type: 'null',
1125
+ title: "Void",
1126
+ type: "null",
1454
1127
  example: void 0
1455
1128
  });
1456
1129
  null = import_zod.z.null().openapi({
1457
- title: 'Null',
1458
- type: 'null',
1130
+ title: "Null",
1131
+ type: "null",
1459
1132
  example: null
1460
1133
  });
1461
1134
  undefined = import_zod.z.undefined().openapi({
1462
- title: 'Undefined',
1463
- type: 'null',
1135
+ title: "Undefined",
1136
+ type: "null",
1464
1137
  example: void 0
1465
1138
  });
1466
1139
  any = import_zod.z.any().openapi({
1467
- title: 'Any',
1468
- type: 'object',
1469
- example: 'any'
1140
+ title: "Any",
1141
+ type: "object",
1142
+ example: "any"
1470
1143
  });
1471
1144
  unknown = import_zod.z.unknown().openapi({
1472
- title: 'Unknown',
1473
- type: 'object',
1474
- example: 'unknown'
1145
+ title: "Unknown",
1146
+ type: "object",
1147
+ example: "unknown"
1475
1148
  });
1476
1149
  never = import_zod.z.never().openapi({
1477
- title: 'Never',
1478
- type: 'null',
1479
- example: 'never'
1150
+ title: "Never",
1151
+ type: "null",
1152
+ example: "never"
1153
+ });
1154
+ binary = import_zod.z.string().transform((v) => new TextEncoder().encode(v)).openapi({
1155
+ title: "Binary",
1156
+ type: "string",
1157
+ format: "binary",
1158
+ example: "a utf-8 encodable string"
1159
+ });
1160
+ file = import_zod.z.string().transform((val) => {
1161
+ return new Blob([val]);
1162
+ }).openapi({
1163
+ title: "File",
1164
+ type: "string",
1165
+ format: "binary",
1166
+ example: "a utf-8 encodable blob or file"
1480
1167
  });
1481
- binary = import_zod.z
1482
- .string()
1483
- .transform((v) => new TextEncoder().encode(v))
1484
- .openapi({
1485
- title: 'Binary',
1486
- type: 'string',
1487
- format: 'binary',
1488
- example: 'a utf-8 encodable string'
1489
- });
1490
- file = import_zod.z
1491
- .string()
1492
- .transform((val) => {
1493
- return (name, type22) =>
1494
- new File([val], name, {
1495
- type: type22,
1496
- lastModified: Date.now()
1497
- });
1498
- })
1499
- .openapi({
1500
- title: 'File',
1501
- type: 'string',
1502
- format: 'binary',
1503
- example: 'a utf-8 encodable string'
1504
- });
1505
1168
  type = () => this.any;
1506
1169
  /**
1507
1170
  * Compiles schema if this exists, for optimal performance.
@@ -1518,11 +1181,7 @@ var ZodSchemaValidator = class {
1518
1181
  * @returns {ZodResolve<T>} The resolved schema.
1519
1182
  */
1520
1183
  schemify(schema) {
1521
- if (
1522
- typeof schema === 'string' ||
1523
- typeof schema === 'number' ||
1524
- typeof schema === 'boolean'
1525
- ) {
1184
+ if (typeof schema === "string" || typeof schema === "number" || typeof schema === "boolean") {
1526
1185
  return import_zod.z.literal(schema);
1527
1186
  }
1528
1187
  if (schema instanceof import_zod.ZodType) {
@@ -1563,7 +1222,9 @@ var ZodSchemaValidator = class {
1563
1222
  */
1564
1223
  union(schemas) {
1565
1224
  const resolvedSchemas = schemas.map((schema) => this.schemify(schema));
1566
- return import_zod.z.union(resolvedSchemas);
1225
+ return import_zod.z.union(
1226
+ resolvedSchemas
1227
+ );
1567
1228
  }
1568
1229
  /**
1569
1230
  * Create a literal schema.
@@ -1579,7 +1240,9 @@ var ZodSchemaValidator = class {
1579
1240
  * @returns {ZodUnion<UnionZodResolve<[T, T, ...T[]]>>} The enum schema.
1580
1241
  */
1581
1242
  enum_(schemaEnum) {
1582
- return this.union(Object.values(schemaEnum));
1243
+ return this.union(
1244
+ Object.values(schemaEnum)
1245
+ );
1583
1246
  }
1584
1247
  /**
1585
1248
  * Create a function schema.
@@ -1590,10 +1253,7 @@ var ZodSchemaValidator = class {
1590
1253
  function_(args, returnType) {
1591
1254
  const schemaArgs = args.map((schema) => this.schemify(schema));
1592
1255
  const schemaReturnType = this.schemify(returnType);
1593
- return import_zod.z.function(
1594
- import_zod.z.tuple(schemaArgs),
1595
- schemaReturnType
1596
- );
1256
+ return import_zod.z.function(import_zod.z.tuple(schemaArgs), schemaReturnType);
1597
1257
  }
1598
1258
  /**
1599
1259
  * Create a record schema.
@@ -1651,33 +1311,31 @@ var ZodSchemaValidator = class {
1651
1311
  parse(schema, value) {
1652
1312
  const resolvedSchema = this.schemify(schema);
1653
1313
  const result = resolvedSchema.safeParse(value);
1654
- return result.success
1655
- ? { ok: true, value: result.data }
1656
- : {
1657
- ok: false,
1658
- errors: result.error.errors.flatMap((error) => {
1659
- switch (error.code) {
1660
- case 'invalid_union':
1661
- return error.unionErrors.flatMap((unionError, idx) =>
1662
- unionError.errors.map((e) => ({
1663
- path: [
1664
- `Union Schema Variant ${idx}`,
1665
- ...error.path.map((p) => p.toString()),
1666
- ...e.path.map((p) => p.toString())
1667
- ],
1668
- message: e.message
1669
- }))
1670
- );
1671
- default:
1672
- return [
1673
- {
1674
- path: error.path.map((p) => p.toString()),
1675
- message: error.message
1676
- }
1677
- ];
1678
- }
1679
- })
1680
- };
1314
+ return result.success ? { ok: true, value: result.data } : {
1315
+ ok: false,
1316
+ errors: result.error.errors.flatMap((error) => {
1317
+ switch (error.code) {
1318
+ case "invalid_union":
1319
+ return error.unionErrors.flatMap(
1320
+ (unionError, idx) => unionError.errors.map((e) => ({
1321
+ path: [
1322
+ `Union Schema Variant ${idx}`,
1323
+ ...error.path.map((p) => p.toString()),
1324
+ ...e.path.map((p) => p.toString())
1325
+ ],
1326
+ message: e.message
1327
+ }))
1328
+ );
1329
+ default:
1330
+ return [
1331
+ {
1332
+ path: error.path.map((p) => p.toString()),
1333
+ message: error.message
1334
+ }
1335
+ ];
1336
+ }
1337
+ })
1338
+ };
1681
1339
  }
1682
1340
  /**
1683
1341
  * Convert a schema to an OpenAPI schema object.
@@ -1736,7 +1394,6 @@ var RedisWorkerSchemas = (0, import_internal.serviceSchemaResolver)(
1736
1394
  () => RedisWorkerOptionsSchema2
1737
1395
  );
1738
1396
  // Annotate the CommonJS export names for ESM import in node:
1739
- 0 &&
1740
- (module.exports = {
1741
- RedisWorkerSchemas
1742
- });
1397
+ 0 && (module.exports = {
1398
+ RedisWorkerSchemas
1399
+ });