@forklaunch/implementation-worker-kafka 0.3.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
6
  var __export = (target, all) => {
12
7
  for (var name in all)
13
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -21,440 +16,8 @@ var __copyProps = (to, from, except, desc) => {
21
16
  return to;
22
17
  };
23
18
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
32
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
20
 
34
- // ../../../node_modules/.pnpm/ts-deepmerge@6.2.1/node_modules/ts-deepmerge/cjs/index.js
35
- var require_cjs = __commonJS({
36
- "../../../node_modules/.pnpm/ts-deepmerge@6.2.1/node_modules/ts-deepmerge/cjs/index.js"(exports2) {
37
- "use strict";
38
- Object.defineProperty(exports2, "__esModule", { value: true });
39
- var isObject = (obj) => {
40
- if (typeof obj === "object" && obj !== null) {
41
- if (typeof Object.getPrototypeOf === "function") {
42
- const prototype = Object.getPrototypeOf(obj);
43
- return prototype === Object.prototype || prototype === null;
44
- }
45
- return Object.prototype.toString.call(obj) === "[object Object]";
46
- }
47
- return false;
48
- };
49
- var merge = (...objects) => objects.reduce((result, current) => {
50
- if (Array.isArray(current)) {
51
- throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
52
- }
53
- Object.keys(current).forEach((key) => {
54
- if (["__proto__", "constructor", "prototype"].includes(key)) {
55
- return;
56
- }
57
- if (Array.isArray(result[key]) && Array.isArray(current[key])) {
58
- result[key] = merge.options.mergeArrays ? merge.options.uniqueArrayItems ? Array.from(new Set(result[key].concat(current[key]))) : [...result[key], ...current[key]] : current[key];
59
- } else if (isObject(result[key]) && isObject(current[key])) {
60
- result[key] = merge(result[key], current[key]);
61
- } else {
62
- result[key] = current[key] === void 0 ? merge.options.allowUndefinedOverrides ? current[key] : result[key] : current[key];
63
- }
64
- });
65
- return result;
66
- }, {});
67
- var defaultOptions = {
68
- allowUndefinedOverrides: true,
69
- mergeArrays: true,
70
- uniqueArrayItems: true
71
- };
72
- merge.options = defaultOptions;
73
- merge.withOptions = (options, ...objects) => {
74
- merge.options = Object.assign(Object.assign({}, defaultOptions), options);
75
- const result = merge(...objects);
76
- merge.options = defaultOptions;
77
- return result;
78
- };
79
- exports2.default = merge;
80
- }
81
- });
82
-
83
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js
84
- var require_zod_openapi = __commonJS({
85
- "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js"(exports2) {
86
- "use strict";
87
- Object.defineProperty(exports2, "__esModule", { value: true });
88
- exports2.generateSchema = exports2.extendApi = void 0;
89
- var ts_deepmerge_1 = require_cjs();
90
- var zod_1 = require("zod");
91
- function extendApi(schema, schemaObject = {}) {
92
- const This = schema.constructor;
93
- const newSchema = new This(schema._def);
94
- newSchema.metaOpenApi = Object.assign({}, schema.metaOpenApi || {}, schemaObject);
95
- return newSchema;
96
- }
97
- exports2.extendApi = extendApi;
98
- function iterateZodObject({ zodRef, useOutput, hideDefinitions, openApiVersion }) {
99
- const reduced = Object.keys(zodRef.shape).filter((key) => (hideDefinitions === null || hideDefinitions === void 0 ? void 0 : hideDefinitions.includes(key)) === false).reduce((carry, key) => Object.assign(Object.assign({}, carry), { [key]: generateSchema2(zodRef.shape[key], useOutput, openApiVersion) }), {});
100
- return reduced;
101
- }
102
- function typeFormat(type3, openApiVersion) {
103
- return openApiVersion === "3.0" ? type3 : [type3];
104
- }
105
- function parseTransformation({ zodRef, schemas, useOutput, openApiVersion }) {
106
- const input = generateSchema2(zodRef._def.schema, useOutput, openApiVersion);
107
- let output = "undefined";
108
- if (useOutput && zodRef._def.effect) {
109
- const effect = zodRef._def.effect.type === "transform" ? zodRef._def.effect : null;
110
- if (effect && "transform" in effect) {
111
- try {
112
- const type3 = Array.isArray(input.type) ? input.type[0] : input.type;
113
- output = typeof effect.transform(
114
- ["integer", "number"].includes(`${type3}`) ? 0 : "string" === type3 ? "" : "boolean" === type3 ? false : "object" === type3 ? {} : "null" === type3 ? null : "array" === type3 ? [] : void 0,
115
- { addIssue: () => void 0, path: [] }
116
- // TODO: Discover if context is necessary here
117
- );
118
- } catch (e) {
119
- }
120
- }
121
- }
122
- const outputType = output;
123
- return (0, ts_deepmerge_1.default)(Object.assign(Object.assign(Object.assign({}, zodRef.description ? { description: zodRef.description } : {}), input), ["number", "string", "boolean", "null"].includes(output) ? {
124
- type: typeFormat(outputType, openApiVersion)
125
- } : {}), ...schemas);
126
- }
127
- function parseString({ zodRef, schemas, openApiVersion }) {
128
- const baseSchema = {
129
- type: typeFormat("string", openApiVersion)
130
- };
131
- const { checks = [] } = zodRef._def;
132
- checks.forEach((item) => {
133
- switch (item.kind) {
134
- case "email":
135
- baseSchema.format = "email";
136
- break;
137
- case "uuid":
138
- baseSchema.format = "uuid";
139
- break;
140
- case "cuid":
141
- baseSchema.format = "cuid";
142
- break;
143
- case "url":
144
- baseSchema.format = "uri";
145
- break;
146
- case "datetime":
147
- baseSchema.format = "date-time";
148
- break;
149
- case "length":
150
- baseSchema.minLength = item.value;
151
- baseSchema.maxLength = item.value;
152
- break;
153
- case "max":
154
- baseSchema.maxLength = item.value;
155
- break;
156
- case "min":
157
- baseSchema.minLength = item.value;
158
- break;
159
- case "regex":
160
- baseSchema.pattern = item.regex.source;
161
- break;
162
- }
163
- });
164
- return (0, ts_deepmerge_1.default)(baseSchema, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
165
- }
166
- function parseNumber({ zodRef, schemas, openApiVersion }) {
167
- const baseSchema = {
168
- type: typeFormat("number", openApiVersion)
169
- };
170
- const { checks = [] } = zodRef._def;
171
- checks.forEach((item) => {
172
- switch (item.kind) {
173
- case "max":
174
- if (item.inclusive || openApiVersion === "3.0") {
175
- baseSchema.maximum = item.value;
176
- }
177
- if (!item.inclusive) {
178
- if (openApiVersion === "3.0") {
179
- baseSchema.exclusiveMaximum = true;
180
- } else {
181
- baseSchema.exclusiveMaximum = item.value;
182
- }
183
- }
184
- break;
185
- case "min":
186
- if (item.inclusive || openApiVersion === "3.0") {
187
- baseSchema.minimum = item.value;
188
- }
189
- if (!item.inclusive) {
190
- if (openApiVersion === "3.0") {
191
- baseSchema.exclusiveMinimum = true;
192
- } else {
193
- baseSchema.exclusiveMinimum = item.value;
194
- }
195
- }
196
- break;
197
- case "int":
198
- baseSchema.type = typeFormat("integer", openApiVersion);
199
- break;
200
- case "multipleOf":
201
- baseSchema.multipleOf = item.value;
202
- break;
203
- }
204
- });
205
- return (0, ts_deepmerge_1.default)(baseSchema, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
206
- }
207
- function getExcludedDefinitionsFromSchema(schemas) {
208
- const excludedDefinitions = [];
209
- for (const schema of schemas) {
210
- if (Array.isArray(schema.hideDefinitions)) {
211
- excludedDefinitions.push(...schema.hideDefinitions);
212
- }
213
- }
214
- return excludedDefinitions;
215
- }
216
- function parseObject({ zodRef, schemas, useOutput, hideDefinitions, openApiVersion }) {
217
- var _a;
218
- let additionalProperties;
219
- if (!(zodRef._def.catchall instanceof zod_1.z.ZodNever || ((_a = zodRef._def.catchall) === null || _a === void 0 ? void 0 : _a._def.typeName) === "ZodNever"))
220
- additionalProperties = generateSchema2(zodRef._def.catchall, useOutput, openApiVersion);
221
- else if (zodRef._def.unknownKeys === "passthrough")
222
- additionalProperties = true;
223
- else if (zodRef._def.unknownKeys === "strict")
224
- additionalProperties = false;
225
- additionalProperties = additionalProperties != null ? { additionalProperties } : {};
226
- const requiredProperties = Object.keys(zodRef.shape).filter((key) => {
227
- const item = zodRef.shape[key];
228
- return !(item.isOptional() || item instanceof zod_1.z.ZodDefault || item._def.typeName === "ZodDefault") && !(item instanceof zod_1.z.ZodNever || item._def.typeName === "ZodDefault");
229
- });
230
- const required = requiredProperties.length > 0 ? { required: requiredProperties } : {};
231
- return (0, ts_deepmerge_1.default)(Object.assign(Object.assign(Object.assign({ type: typeFormat("object", openApiVersion), properties: iterateZodObject({
232
- zodRef,
233
- schemas,
234
- useOutput,
235
- hideDefinitions: getExcludedDefinitionsFromSchema(schemas),
236
- openApiVersion
237
- }) }, required), additionalProperties), hideDefinitions), zodRef.description ? { description: zodRef.description, hideDefinitions } : {}, ...schemas);
238
- }
239
- function parseRecord({ zodRef, schemas, useOutput, openApiVersion }) {
240
- return (0, ts_deepmerge_1.default)({
241
- type: typeFormat("object", openApiVersion),
242
- additionalProperties: zodRef._def.valueType instanceof zod_1.z.ZodUnknown ? {} : generateSchema2(zodRef._def.valueType, useOutput, openApiVersion)
243
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
244
- }
245
- function parseBigInt({ zodRef, schemas, openApiVersion }) {
246
- return (0, ts_deepmerge_1.default)({
247
- type: typeFormat("integer", openApiVersion),
248
- format: "int64"
249
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
250
- }
251
- function parseBoolean({ zodRef, schemas, openApiVersion }) {
252
- return (0, ts_deepmerge_1.default)({ type: typeFormat("boolean", openApiVersion) }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
253
- }
254
- function parseDate({ zodRef, schemas, openApiVersion }) {
255
- return (0, ts_deepmerge_1.default)({
256
- type: typeFormat("string", openApiVersion),
257
- format: "date-time"
258
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
259
- }
260
- function parseNull({ zodRef, schemas, openApiVersion }) {
261
- return (0, ts_deepmerge_1.default)(openApiVersion === "3.0" ? { type: "null" } : {
262
- type: ["string", "null"],
263
- enum: ["null"]
264
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
265
- }
266
- function parseOptional({ schemas, zodRef, useOutput, openApiVersion }) {
267
- return (0, ts_deepmerge_1.default)(generateSchema2(zodRef.unwrap(), useOutput, openApiVersion), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
268
- }
269
- function parseNullable({ schemas, zodRef, useOutput, openApiVersion }) {
270
- const schema = generateSchema2(zodRef.unwrap(), useOutput, openApiVersion);
271
- return (0, ts_deepmerge_1.default)(schema, openApiVersion === "3.0" ? { nullable: true } : { type: typeFormat("null", openApiVersion) }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
272
- }
273
- function parseDefault({ schemas, zodRef, useOutput, openApiVersion }) {
274
- return (0, ts_deepmerge_1.default)(Object.assign({ default: zodRef._def.defaultValue() }, generateSchema2(zodRef._def.innerType, useOutput, openApiVersion)), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
275
- }
276
- function parseArray({ schemas, zodRef, useOutput, openApiVersion }) {
277
- const constraints = {};
278
- if (zodRef._def.exactLength != null) {
279
- constraints.minItems = zodRef._def.exactLength.value;
280
- constraints.maxItems = zodRef._def.exactLength.value;
281
- }
282
- if (zodRef._def.minLength != null)
283
- constraints.minItems = zodRef._def.minLength.value;
284
- if (zodRef._def.maxLength != null)
285
- constraints.maxItems = zodRef._def.maxLength.value;
286
- return (0, ts_deepmerge_1.default)(Object.assign({ type: typeFormat("array", openApiVersion), items: generateSchema2(zodRef.element, useOutput, openApiVersion) }, constraints), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
287
- }
288
- function parseLiteral({ schemas, zodRef, openApiVersion }) {
289
- const type3 = typeof zodRef._def.value;
290
- return (0, ts_deepmerge_1.default)({
291
- type: typeFormat(type3, openApiVersion),
292
- enum: [zodRef._def.value]
293
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
294
- }
295
- function parseEnum({ schemas, zodRef, openApiVersion }) {
296
- const type3 = typeof Object.values(zodRef._def.values)[0];
297
- return (0, ts_deepmerge_1.default)({
298
- type: typeFormat(type3, openApiVersion),
299
- enum: Object.values(zodRef._def.values)
300
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
301
- }
302
- function parseIntersection({ schemas, zodRef, useOutput, openApiVersion }) {
303
- return (0, ts_deepmerge_1.default)({
304
- allOf: [
305
- generateSchema2(zodRef._def.left, useOutput, openApiVersion),
306
- generateSchema2(zodRef._def.right, useOutput, openApiVersion)
307
- ]
308
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
309
- }
310
- function parseUnion({ schemas, zodRef, useOutput, openApiVersion }) {
311
- const contents = zodRef._def.options;
312
- if (contents.reduce((prev, content) => prev && content._def.typeName === "ZodLiteral", true)) {
313
- const literals = contents;
314
- const type3 = literals.reduce((prev, content) => !prev || prev === typeof content._def.value ? typeof content._def.value : null, null);
315
- if (type3) {
316
- return (0, ts_deepmerge_1.default)({
317
- type: typeFormat(type3, openApiVersion),
318
- enum: literals.map((literal3) => literal3._def.value)
319
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
320
- }
321
- }
322
- const oneOfContents = openApiVersion === "3.0" ? contents.filter((content) => content._def.typeName !== "ZodNull") : contents;
323
- const contentsHasNull = contents.length != oneOfContents.length;
324
- return (0, ts_deepmerge_1.default)({
325
- oneOf: oneOfContents.map((schema) => generateSchema2(schema, useOutput, openApiVersion))
326
- }, contentsHasNull ? { nullable: true } : {}, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
327
- }
328
- function parseDiscriminatedUnion({ schemas, zodRef, useOutput, openApiVersion }) {
329
- return (0, ts_deepmerge_1.default)({
330
- discriminator: {
331
- propertyName: zodRef._def.discriminator
332
- },
333
- oneOf: Array.from(zodRef._def.options.values()).map((schema) => generateSchema2(schema, useOutput, openApiVersion))
334
- }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
335
- }
336
- function parseNever({ zodRef, schemas }) {
337
- return (0, ts_deepmerge_1.default)({ readOnly: true }, zodRef.description ? { description: zodRef.description } : {}, ...schemas);
338
- }
339
- function parseBranded({ schemas, zodRef, useOutput, openApiVersion }) {
340
- return (0, ts_deepmerge_1.default)(generateSchema2(zodRef._def.type, useOutput, openApiVersion), ...schemas);
341
- }
342
- function catchAllParser({ zodRef, schemas }) {
343
- return (0, ts_deepmerge_1.default)(zodRef.description ? { description: zodRef.description } : {}, ...schemas);
344
- }
345
- function parsePipeline({ schemas, zodRef, useOutput, openApiVersion }) {
346
- return (0, ts_deepmerge_1.default)(generateSchema2(useOutput ? zodRef._def.out : zodRef._def.in, useOutput, openApiVersion), ...schemas);
347
- }
348
- function parseReadonly({ zodRef, useOutput, schemas, openApiVersion }) {
349
- return (0, ts_deepmerge_1.default)(generateSchema2(zodRef._def.innerType, useOutput, openApiVersion), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
350
- }
351
- var workerMap = {
352
- ZodObject: parseObject,
353
- ZodRecord: parseRecord,
354
- ZodString: parseString,
355
- ZodNumber: parseNumber,
356
- ZodBigInt: parseBigInt,
357
- ZodBoolean: parseBoolean,
358
- ZodDate: parseDate,
359
- ZodNull: parseNull,
360
- ZodOptional: parseOptional,
361
- ZodNullable: parseNullable,
362
- ZodDefault: parseDefault,
363
- ZodArray: parseArray,
364
- ZodLiteral: parseLiteral,
365
- ZodEnum: parseEnum,
366
- ZodNativeEnum: parseEnum,
367
- ZodTransformer: parseTransformation,
368
- ZodEffects: parseTransformation,
369
- ZodIntersection: parseIntersection,
370
- ZodUnion: parseUnion,
371
- ZodDiscriminatedUnion: parseDiscriminatedUnion,
372
- ZodNever: parseNever,
373
- ZodBranded: parseBranded,
374
- // TODO Transform the rest to schemas
375
- ZodUndefined: catchAllParser,
376
- // TODO: `prefixItems` is allowed in OpenAPI 3.1 which can be used to create tuples
377
- ZodTuple: catchAllParser,
378
- ZodMap: catchAllParser,
379
- ZodFunction: catchAllParser,
380
- ZodLazy: catchAllParser,
381
- ZodPromise: catchAllParser,
382
- ZodAny: catchAllParser,
383
- ZodUnknown: catchAllParser,
384
- ZodVoid: catchAllParser,
385
- ZodPipeline: parsePipeline,
386
- ZodReadonly: parseReadonly
387
- };
388
- function generateSchema2(zodRef, useOutput = false, openApiVersion = "3.1") {
389
- const { metaOpenApi = {} } = zodRef;
390
- const schemas = [
391
- ...Array.isArray(metaOpenApi) ? metaOpenApi : [metaOpenApi]
392
- ];
393
- try {
394
- const typeName = zodRef._def.typeName;
395
- if (typeName in workerMap) {
396
- return workerMap[typeName]({
397
- zodRef,
398
- schemas,
399
- useOutput,
400
- openApiVersion
401
- });
402
- }
403
- return catchAllParser({ zodRef, schemas, openApiVersion });
404
- } catch (err) {
405
- console.error(err);
406
- return catchAllParser({ zodRef, schemas, openApiVersion });
407
- }
408
- }
409
- exports2.generateSchema = generateSchema2;
410
- }
411
- });
412
-
413
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js
414
- var require_zod_extensions = __commonJS({
415
- "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/lib/zod-extensions.js"(exports2) {
416
- "use strict";
417
- Object.defineProperty(exports2, "__esModule", { value: true });
418
- exports2.extendZodWithOpenApi = void 0;
419
- var zod_openapi_1 = require_zod_openapi();
420
- function extendZodWithOpenApi2(zod, forceOverride = false) {
421
- if (!forceOverride && typeof zod.ZodSchema.prototype.openapi !== "undefined") {
422
- return;
423
- }
424
- zod.ZodSchema.prototype.openapi = function(metadata) {
425
- return (0, zod_openapi_1.extendApi)(this, metadata);
426
- };
427
- }
428
- exports2.extendZodWithOpenApi = extendZodWithOpenApi2;
429
- }
430
- });
431
-
432
- // ../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/index.js
433
- var require_src = __commonJS({
434
- "../../../node_modules/.pnpm/@anatine+zod-openapi@2.2.8_openapi3-ts@4.5.0_zod@3.25.76/node_modules/@anatine/zod-openapi/src/index.js"(exports2) {
435
- "use strict";
436
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
437
- if (k2 === void 0) k2 = k;
438
- var desc = Object.getOwnPropertyDescriptor(m, k);
439
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
440
- desc = { enumerable: true, get: function() {
441
- return m[k];
442
- } };
443
- }
444
- Object.defineProperty(o, k2, desc);
445
- } : function(o, m, k, k2) {
446
- if (k2 === void 0) k2 = k;
447
- o[k2] = m[k];
448
- });
449
- var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
450
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
451
- };
452
- Object.defineProperty(exports2, "__esModule", { value: true });
453
- __exportStar(require_zod_openapi(), exports2);
454
- __exportStar(require_zod_extensions(), exports2);
455
- }
456
- });
457
-
458
21
  // domain/schemas/index.ts
459
22
  var schemas_exports = {};
460
23
  __export(schemas_exports, {
@@ -465,7 +28,7 @@ module.exports = __toCommonJS(schemas_exports);
465
28
  // domain/schemas/kafka.schema.ts
466
29
  var import_internal = require("@forklaunch/internal");
467
30
 
468
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.5_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
31
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
469
32
  var typebox_exports = {};
470
33
  __export(typebox_exports, {
471
34
  SchemaValidator: () => SchemaValidator,
@@ -505,7 +68,7 @@ __export(typebox_exports, {
505
68
  });
506
69
  __reExport(typebox_exports, require("@sinclair/typebox"));
507
70
 
508
- // ../../../node_modules/.pnpm/@forklaunch+common@0.4.3/node_modules/@forklaunch/common/lib/index.mjs
71
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.4.5/node_modules/@forklaunch/common/lib/index.mjs
509
72
  var InMemoryBlob = class extends Blob {
510
73
  constructor(content) {
511
74
  super([Buffer.from(content)]);
@@ -513,7 +76,7 @@ var InMemoryBlob = class extends Blob {
513
76
  }
514
77
  };
515
78
 
516
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.5_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
79
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
517
80
  var import_typebox = require("@sinclair/typebox");
518
81
  var import_compiler = require("@sinclair/typebox/compiler");
519
82
  var import_errors = require("@sinclair/typebox/errors");
@@ -1023,10 +586,632 @@ var KafkaWorkerOptionsSchema = {
1023
586
  peekCount: number
1024
587
  };
1025
588
 
1026
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.5_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1027
- var import_zod_openapi = __toESM(require_src(), 1);
589
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1028
590
  var import_v3 = require("zod/v3");
1029
- (0, import_zod_openapi.extendZodWithOpenApi)(import_v3.z);
591
+
592
+ // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
593
+ var isObject = (obj) => {
594
+ if (typeof obj === "object" && obj !== null) {
595
+ if (typeof Object.getPrototypeOf === "function") {
596
+ const prototype = Object.getPrototypeOf(obj);
597
+ return prototype === Object.prototype || prototype === null;
598
+ }
599
+ return Object.prototype.toString.call(obj) === "[object Object]";
600
+ }
601
+ return false;
602
+ };
603
+ var merge = (...objects) => objects.reduce((result, current) => {
604
+ if (current === void 0) {
605
+ return result;
606
+ }
607
+ if (Array.isArray(current)) {
608
+ throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
609
+ }
610
+ Object.keys(current).forEach((key) => {
611
+ if (["__proto__", "constructor", "prototype"].includes(key)) {
612
+ return;
613
+ }
614
+ if (Array.isArray(result[key]) && Array.isArray(current[key])) {
615
+ result[key] = merge.options.mergeArrays ? merge.options.uniqueArrayItems ? Array.from(new Set(result[key].concat(current[key]))) : [...result[key], ...current[key]] : current[key];
616
+ } else if (isObject(result[key]) && isObject(current[key])) {
617
+ result[key] = merge(result[key], current[key]);
618
+ } else if (!isObject(result[key]) && isObject(current[key])) {
619
+ result[key] = merge(current[key], void 0);
620
+ } else {
621
+ result[key] = current[key] === void 0 ? merge.options.allowUndefinedOverrides ? current[key] : result[key] : current[key];
622
+ }
623
+ });
624
+ return result;
625
+ }, {});
626
+ var defaultOptions = {
627
+ allowUndefinedOverrides: true,
628
+ mergeArrays: true,
629
+ uniqueArrayItems: true
630
+ };
631
+ merge.options = defaultOptions;
632
+ merge.withOptions = (options, ...objects) => {
633
+ merge.options = Object.assign(Object.assign({}, defaultOptions), options);
634
+ const result = merge(...objects);
635
+ merge.options = defaultOptions;
636
+ return result;
637
+ };
638
+
639
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
640
+ var import_v32 = require("zod/v3");
641
+ function extendApi(schema, schemaObject = {}) {
642
+ const This = schema.constructor;
643
+ const newSchema = new This(schema._def);
644
+ newSchema.metaOpenApi = Object.assign(
645
+ {},
646
+ schema.metaOpenApi || {},
647
+ schemaObject
648
+ );
649
+ return newSchema;
650
+ }
651
+ function iterateZodObject({
652
+ zodRef,
653
+ useOutput,
654
+ hideDefinitions,
655
+ openApiVersion
656
+ }) {
657
+ const reduced = Object.keys(zodRef.shape).filter((key) => hideDefinitions?.includes(key) === false).reduce(
658
+ (carry, key) => ({
659
+ ...carry,
660
+ [key]: generateSchema(zodRef.shape[key], useOutput, openApiVersion)
661
+ }),
662
+ {}
663
+ );
664
+ return reduced;
665
+ }
666
+ function typeFormat(type22, openApiVersion) {
667
+ return openApiVersion === "3.0" ? type22 : [type22];
668
+ }
669
+ function parseTransformation({
670
+ zodRef,
671
+ schemas,
672
+ useOutput,
673
+ openApiVersion
674
+ }) {
675
+ const input = generateSchema(zodRef._def.schema, useOutput, openApiVersion);
676
+ let output = "undefined";
677
+ if (useOutput && zodRef._def.effect) {
678
+ const effect = zodRef._def.effect.type === "transform" ? zodRef._def.effect : null;
679
+ if (effect && "transform" in effect) {
680
+ try {
681
+ const type22 = Array.isArray(input.type) ? input.type[0] : input.type;
682
+ output = typeof effect.transform(
683
+ ["integer", "number"].includes(`${type22}`) ? 0 : "string" === type22 ? "" : "boolean" === type22 ? false : "object" === type22 ? {} : "null" === type22 ? null : "array" === type22 ? [] : void 0,
684
+ { addIssue: () => void 0, path: [] }
685
+ // TODO: Discover if context is necessary here
686
+ );
687
+ } catch {
688
+ }
689
+ }
690
+ }
691
+ const outputType = output;
692
+ return merge(
693
+ {
694
+ ...zodRef.description ? { description: zodRef.description } : {},
695
+ ...input,
696
+ ...["number", "string", "boolean", "null"].includes(output) ? {
697
+ type: typeFormat(outputType, openApiVersion)
698
+ } : {}
699
+ },
700
+ ...schemas
701
+ );
702
+ }
703
+ function parseString({
704
+ zodRef,
705
+ schemas,
706
+ openApiVersion
707
+ }) {
708
+ const baseSchema = {
709
+ type: typeFormat("string", openApiVersion)
710
+ };
711
+ const { checks = [] } = zodRef._def;
712
+ checks.forEach((item) => {
713
+ switch (item.kind) {
714
+ case "email":
715
+ baseSchema.format = "email";
716
+ break;
717
+ case "uuid":
718
+ baseSchema.format = "uuid";
719
+ break;
720
+ case "cuid":
721
+ baseSchema.format = "cuid";
722
+ break;
723
+ case "url":
724
+ baseSchema.format = "uri";
725
+ break;
726
+ case "datetime":
727
+ baseSchema.format = "date-time";
728
+ break;
729
+ case "length":
730
+ baseSchema.minLength = item.value;
731
+ baseSchema.maxLength = item.value;
732
+ break;
733
+ case "max":
734
+ baseSchema.maxLength = item.value;
735
+ break;
736
+ case "min":
737
+ baseSchema.minLength = item.value;
738
+ break;
739
+ case "regex":
740
+ baseSchema.pattern = item.regex.source;
741
+ break;
742
+ }
743
+ });
744
+ return merge(
745
+ baseSchema,
746
+ zodRef.description ? { description: zodRef.description } : {},
747
+ ...schemas
748
+ );
749
+ }
750
+ function parseNumber({
751
+ zodRef,
752
+ schemas,
753
+ openApiVersion
754
+ }) {
755
+ const baseSchema = {
756
+ type: typeFormat("number", openApiVersion)
757
+ };
758
+ const { checks = [] } = zodRef._def;
759
+ checks.forEach((item) => {
760
+ switch (item.kind) {
761
+ case "max":
762
+ if (item.inclusive || openApiVersion === "3.0") {
763
+ baseSchema.maximum = item.value;
764
+ }
765
+ if (!item.inclusive) {
766
+ if (openApiVersion === "3.0") {
767
+ baseSchema.exclusiveMaximum = true;
768
+ } else {
769
+ baseSchema.exclusiveMaximum = item.value;
770
+ }
771
+ }
772
+ break;
773
+ case "min":
774
+ if (item.inclusive || openApiVersion === "3.0") {
775
+ baseSchema.minimum = item.value;
776
+ }
777
+ if (!item.inclusive) {
778
+ if (openApiVersion === "3.0") {
779
+ baseSchema.exclusiveMinimum = true;
780
+ } else {
781
+ baseSchema.exclusiveMinimum = item.value;
782
+ }
783
+ }
784
+ break;
785
+ case "int":
786
+ baseSchema.type = typeFormat("integer", openApiVersion);
787
+ break;
788
+ case "multipleOf":
789
+ baseSchema.multipleOf = item.value;
790
+ break;
791
+ }
792
+ });
793
+ return merge(
794
+ baseSchema,
795
+ zodRef.description ? { description: zodRef.description } : {},
796
+ ...schemas
797
+ );
798
+ }
799
+ function getExcludedDefinitionsFromSchema(schemas) {
800
+ const excludedDefinitions = [];
801
+ for (const schema of schemas) {
802
+ if (Array.isArray(schema.hideDefinitions)) {
803
+ excludedDefinitions.push(...schema.hideDefinitions);
804
+ }
805
+ }
806
+ return excludedDefinitions;
807
+ }
808
+ function parseObject({
809
+ zodRef,
810
+ schemas,
811
+ useOutput,
812
+ hideDefinitions,
813
+ openApiVersion
814
+ }) {
815
+ let additionalProperties;
816
+ if (!(zodRef._def.catchall instanceof import_v32.z.ZodNever || zodRef._def.catchall?._def.typeName === "ZodNever"))
817
+ additionalProperties = generateSchema(
818
+ zodRef._def.catchall,
819
+ useOutput,
820
+ openApiVersion
821
+ );
822
+ else if (zodRef._def.unknownKeys === "passthrough")
823
+ additionalProperties = true;
824
+ else if (zodRef._def.unknownKeys === "strict") additionalProperties = false;
825
+ additionalProperties = additionalProperties != null ? { additionalProperties } : {};
826
+ const requiredProperties = Object.keys(
827
+ zodRef.shape
828
+ ).filter((key) => {
829
+ const item = zodRef.shape[key];
830
+ return !(item.isOptional() || item instanceof import_v32.z.ZodDefault || item._def.typeName === "ZodDefault") && !(item instanceof import_v32.z.ZodNever || item._def.typeName === "ZodDefault");
831
+ });
832
+ const required = requiredProperties.length > 0 ? { required: requiredProperties } : {};
833
+ return merge(
834
+ {
835
+ type: typeFormat("object", openApiVersion),
836
+ properties: iterateZodObject({
837
+ zodRef,
838
+ schemas,
839
+ useOutput,
840
+ hideDefinitions: getExcludedDefinitionsFromSchema(schemas),
841
+ openApiVersion
842
+ }),
843
+ ...required,
844
+ ...additionalProperties,
845
+ ...hideDefinitions
846
+ },
847
+ zodRef.description ? { description: zodRef.description, hideDefinitions } : {},
848
+ ...schemas
849
+ );
850
+ }
851
+ function parseRecord({
852
+ zodRef,
853
+ schemas,
854
+ useOutput,
855
+ openApiVersion
856
+ }) {
857
+ return merge(
858
+ {
859
+ type: typeFormat("object", openApiVersion),
860
+ additionalProperties: zodRef._def.valueType instanceof import_v32.z.ZodUnknown ? {} : generateSchema(zodRef._def.valueType, useOutput, openApiVersion)
861
+ },
862
+ zodRef.description ? { description: zodRef.description } : {},
863
+ ...schemas
864
+ );
865
+ }
866
+ function parseBigInt({
867
+ zodRef,
868
+ schemas,
869
+ openApiVersion
870
+ }) {
871
+ return merge(
872
+ {
873
+ type: typeFormat("integer", openApiVersion),
874
+ format: "int64"
875
+ },
876
+ zodRef.description ? { description: zodRef.description } : {},
877
+ ...schemas
878
+ );
879
+ }
880
+ function parseBoolean({
881
+ zodRef,
882
+ schemas,
883
+ openApiVersion
884
+ }) {
885
+ return merge(
886
+ { type: typeFormat("boolean", openApiVersion) },
887
+ zodRef.description ? { description: zodRef.description } : {},
888
+ ...schemas
889
+ );
890
+ }
891
+ function parseDate({
892
+ zodRef,
893
+ schemas,
894
+ openApiVersion
895
+ }) {
896
+ return merge(
897
+ {
898
+ type: typeFormat("string", openApiVersion),
899
+ format: "date-time"
900
+ },
901
+ zodRef.description ? { description: zodRef.description } : {},
902
+ ...schemas
903
+ );
904
+ }
905
+ function parseNull({
906
+ zodRef,
907
+ schemas,
908
+ openApiVersion
909
+ }) {
910
+ return merge(
911
+ openApiVersion === "3.0" ? { type: "null" } : {
912
+ type: ["string", "null"],
913
+ enum: ["null"]
914
+ },
915
+ zodRef.description ? { description: zodRef.description } : {},
916
+ ...schemas
917
+ );
918
+ }
919
+ function parseOptional({
920
+ schemas,
921
+ zodRef,
922
+ useOutput,
923
+ openApiVersion
924
+ }) {
925
+ return merge(
926
+ generateSchema(zodRef.unwrap(), useOutput, openApiVersion),
927
+ zodRef.description ? { description: zodRef.description } : {},
928
+ ...schemas
929
+ );
930
+ }
931
+ function parseNullable({
932
+ schemas,
933
+ zodRef,
934
+ useOutput,
935
+ openApiVersion
936
+ }) {
937
+ const schema = generateSchema(zodRef.unwrap(), useOutput, openApiVersion);
938
+ return merge(
939
+ schema,
940
+ openApiVersion === "3.0" ? { nullable: true } : { type: typeFormat("null", openApiVersion) },
941
+ zodRef.description ? { description: zodRef.description } : {},
942
+ ...schemas
943
+ );
944
+ }
945
+ function parseDefault({
946
+ schemas,
947
+ zodRef,
948
+ useOutput,
949
+ openApiVersion
950
+ }) {
951
+ return merge(
952
+ {
953
+ default: zodRef._def.defaultValue(),
954
+ ...generateSchema(zodRef._def.innerType, useOutput, openApiVersion)
955
+ },
956
+ zodRef.description ? { description: zodRef.description } : {},
957
+ ...schemas
958
+ );
959
+ }
960
+ function parseArray({
961
+ schemas,
962
+ zodRef,
963
+ useOutput,
964
+ openApiVersion
965
+ }) {
966
+ const constraints = {};
967
+ if (zodRef._def.exactLength != null) {
968
+ constraints.minItems = zodRef._def.exactLength.value;
969
+ constraints.maxItems = zodRef._def.exactLength.value;
970
+ }
971
+ if (zodRef._def.minLength != null)
972
+ constraints.minItems = zodRef._def.minLength.value;
973
+ if (zodRef._def.maxLength != null)
974
+ constraints.maxItems = zodRef._def.maxLength.value;
975
+ return merge(
976
+ {
977
+ type: typeFormat("array", openApiVersion),
978
+ items: generateSchema(zodRef.element, useOutput, openApiVersion),
979
+ ...constraints
980
+ },
981
+ zodRef.description ? { description: zodRef.description } : {},
982
+ ...schemas
983
+ );
984
+ }
985
+ function parseLiteral({
986
+ schemas,
987
+ zodRef,
988
+ openApiVersion
989
+ }) {
990
+ const type22 = typeof zodRef._def.value;
991
+ return merge(
992
+ {
993
+ type: typeFormat(type22, openApiVersion),
994
+ enum: [zodRef._def.value]
995
+ },
996
+ zodRef.description ? { description: zodRef.description } : {},
997
+ ...schemas
998
+ );
999
+ }
1000
+ function parseEnum({
1001
+ schemas,
1002
+ zodRef,
1003
+ openApiVersion
1004
+ }) {
1005
+ const type22 = typeof Object.values(zodRef._def.values)[0];
1006
+ return merge(
1007
+ {
1008
+ type: typeFormat(type22, openApiVersion),
1009
+ enum: Object.values(zodRef._def.values)
1010
+ },
1011
+ zodRef.description ? { description: zodRef.description } : {},
1012
+ ...schemas
1013
+ );
1014
+ }
1015
+ function parseIntersection({
1016
+ schemas,
1017
+ zodRef,
1018
+ useOutput,
1019
+ openApiVersion
1020
+ }) {
1021
+ return merge(
1022
+ {
1023
+ allOf: [
1024
+ generateSchema(zodRef._def.left, useOutput, openApiVersion),
1025
+ generateSchema(zodRef._def.right, useOutput, openApiVersion)
1026
+ ]
1027
+ },
1028
+ zodRef.description ? { description: zodRef.description } : {},
1029
+ ...schemas
1030
+ );
1031
+ }
1032
+ function parseUnion({
1033
+ schemas,
1034
+ zodRef,
1035
+ useOutput,
1036
+ openApiVersion
1037
+ }) {
1038
+ const contents = zodRef._def.options;
1039
+ if (contents.reduce(
1040
+ (prev, content) => prev && content._def.typeName === "ZodLiteral",
1041
+ true
1042
+ )) {
1043
+ const literals = contents;
1044
+ const type22 = literals.reduce(
1045
+ (prev, content) => !prev || prev === typeof content._def.value ? typeof content._def.value : null,
1046
+ null
1047
+ );
1048
+ if (type22) {
1049
+ return merge(
1050
+ {
1051
+ type: typeFormat(type22, openApiVersion),
1052
+ enum: literals.map((literal22) => literal22._def.value)
1053
+ },
1054
+ zodRef.description ? { description: zodRef.description } : {},
1055
+ ...schemas
1056
+ );
1057
+ }
1058
+ }
1059
+ const oneOfContents = openApiVersion === "3.0" ? contents.filter((content) => content._def.typeName !== "ZodNull") : contents;
1060
+ const contentsHasNull = contents.length != oneOfContents.length;
1061
+ return merge(
1062
+ {
1063
+ oneOf: oneOfContents.map(
1064
+ (schema) => generateSchema(schema, useOutput, openApiVersion)
1065
+ )
1066
+ },
1067
+ contentsHasNull ? { nullable: true } : {},
1068
+ zodRef.description ? { description: zodRef.description } : {},
1069
+ ...schemas
1070
+ );
1071
+ }
1072
+ function parseDiscriminatedUnion({
1073
+ schemas,
1074
+ zodRef,
1075
+ useOutput,
1076
+ openApiVersion
1077
+ }) {
1078
+ return merge(
1079
+ {
1080
+ discriminator: {
1081
+ propertyName: zodRef._def.discriminator
1082
+ },
1083
+ oneOf: Array.from(
1084
+ zodRef._def.options.values()
1085
+ ).map((schema) => generateSchema(schema, useOutput, openApiVersion))
1086
+ },
1087
+ zodRef.description ? { description: zodRef.description } : {},
1088
+ ...schemas
1089
+ );
1090
+ }
1091
+ function parseNever({
1092
+ zodRef,
1093
+ schemas
1094
+ }) {
1095
+ return merge(
1096
+ { readOnly: true },
1097
+ zodRef.description ? { description: zodRef.description } : {},
1098
+ ...schemas
1099
+ );
1100
+ }
1101
+ function parseBranded({
1102
+ schemas,
1103
+ zodRef,
1104
+ useOutput,
1105
+ openApiVersion
1106
+ }) {
1107
+ return merge(
1108
+ generateSchema(zodRef._def.type, useOutput, openApiVersion),
1109
+ ...schemas
1110
+ );
1111
+ }
1112
+ function catchAllParser({
1113
+ zodRef,
1114
+ schemas
1115
+ }) {
1116
+ return merge(
1117
+ zodRef.description ? { description: zodRef.description } : {},
1118
+ ...schemas
1119
+ );
1120
+ }
1121
+ function parsePipeline({
1122
+ schemas,
1123
+ zodRef,
1124
+ useOutput,
1125
+ openApiVersion
1126
+ }) {
1127
+ return merge(
1128
+ generateSchema(
1129
+ useOutput ? zodRef._def.out : zodRef._def.in,
1130
+ useOutput,
1131
+ openApiVersion
1132
+ ),
1133
+ ...schemas
1134
+ );
1135
+ }
1136
+ function parseReadonly({
1137
+ zodRef,
1138
+ useOutput,
1139
+ schemas,
1140
+ openApiVersion
1141
+ }) {
1142
+ return merge(
1143
+ generateSchema(zodRef._def.innerType, useOutput, openApiVersion),
1144
+ zodRef.description ? { description: zodRef.description } : {},
1145
+ ...schemas
1146
+ );
1147
+ }
1148
+ var workerMap = {
1149
+ ZodObject: parseObject,
1150
+ ZodRecord: parseRecord,
1151
+ ZodString: parseString,
1152
+ ZodNumber: parseNumber,
1153
+ ZodBigInt: parseBigInt,
1154
+ ZodBoolean: parseBoolean,
1155
+ ZodDate: parseDate,
1156
+ ZodNull: parseNull,
1157
+ ZodOptional: parseOptional,
1158
+ ZodNullable: parseNullable,
1159
+ ZodDefault: parseDefault,
1160
+ ZodArray: parseArray,
1161
+ ZodLiteral: parseLiteral,
1162
+ ZodEnum: parseEnum,
1163
+ ZodNativeEnum: parseEnum,
1164
+ ZodTransformer: parseTransformation,
1165
+ ZodEffects: parseTransformation,
1166
+ ZodIntersection: parseIntersection,
1167
+ ZodUnion: parseUnion,
1168
+ ZodDiscriminatedUnion: parseDiscriminatedUnion,
1169
+ ZodNever: parseNever,
1170
+ ZodBranded: parseBranded,
1171
+ // TODO Transform the rest to schemas
1172
+ ZodUndefined: catchAllParser,
1173
+ // TODO: `prefixItems` is allowed in OpenAPI 3.1 which can be used to create tuples
1174
+ ZodTuple: catchAllParser,
1175
+ ZodMap: catchAllParser,
1176
+ ZodFunction: catchAllParser,
1177
+ ZodLazy: catchAllParser,
1178
+ ZodPromise: catchAllParser,
1179
+ ZodAny: catchAllParser,
1180
+ ZodUnknown: catchAllParser,
1181
+ ZodVoid: catchAllParser,
1182
+ ZodPipeline: parsePipeline,
1183
+ ZodReadonly: parseReadonly
1184
+ };
1185
+ function generateSchema(zodRef, useOutput = false, openApiVersion = "3.1") {
1186
+ const { metaOpenApi = {} } = zodRef;
1187
+ const schemas = [
1188
+ ...Array.isArray(metaOpenApi) ? metaOpenApi : [metaOpenApi]
1189
+ ];
1190
+ try {
1191
+ const typeName = zodRef._def.typeName;
1192
+ if (typeName in workerMap) {
1193
+ return workerMap[typeName]({
1194
+ zodRef,
1195
+ schemas,
1196
+ useOutput,
1197
+ openApiVersion
1198
+ });
1199
+ }
1200
+ return catchAllParser({ zodRef, schemas, openApiVersion });
1201
+ } catch (err) {
1202
+ console.error(err);
1203
+ return catchAllParser({ zodRef, schemas, openApiVersion });
1204
+ }
1205
+ }
1206
+ function extendZodWithOpenApi(zod, forceOverride = false) {
1207
+ if (!forceOverride && typeof zod.ZodSchema.prototype.openapi !== "undefined") {
1208
+ return;
1209
+ }
1210
+ zod.ZodSchema.prototype.openapi = function(metadata) {
1211
+ return extendApi(this, metadata);
1212
+ };
1213
+ }
1214
+ extendZodWithOpenApi(import_v3.z);
1030
1215
  var ZodSchemaValidator = class {
1031
1216
  _Type = "Zod";
1032
1217
  _SchemaCatchall;
@@ -1346,7 +1531,7 @@ var ZodSchemaValidator = class {
1346
1531
  * @returns {SchemaObject} The OpenAPI schema object.
1347
1532
  */
1348
1533
  openapi(schema) {
1349
- return (0, import_zod_openapi.generateSchema)(this.schemify(schema));
1534
+ return generateSchema(this.schemify(schema));
1350
1535
  }
1351
1536
  };
1352
1537
  var SchemaValidator2 = () => new ZodSchemaValidator();