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