@forklaunch/implementation-worker-kafka 0.3.3 → 0.3.4

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