@forklaunch/implementation-worker-database 0.3.8 → 0.4.1

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/databaseWorker.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");
@@ -1019,10 +582,632 @@ var DatabaseWorkerOptionsSchema = {
1019
582
  interval: number
1020
583
  };
1021
584
 
1022
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.5_openapi3-ts@4.5.0/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1023
- var import_zod_openapi = __toESM(require_src(), 1);
585
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
1024
586
  var import_v3 = require("zod/v3");
1025
- (0, import_zod_openapi.extendZodWithOpenApi)(import_v3.z);
587
+
588
+ // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
589
+ var isObject = (obj) => {
590
+ if (typeof obj === "object" && obj !== null) {
591
+ if (typeof Object.getPrototypeOf === "function") {
592
+ const prototype = Object.getPrototypeOf(obj);
593
+ return prototype === Object.prototype || prototype === null;
594
+ }
595
+ return Object.prototype.toString.call(obj) === "[object Object]";
596
+ }
597
+ return false;
598
+ };
599
+ var merge = (...objects) => objects.reduce((result, current) => {
600
+ if (current === void 0) {
601
+ return result;
602
+ }
603
+ if (Array.isArray(current)) {
604
+ throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
605
+ }
606
+ Object.keys(current).forEach((key) => {
607
+ if (["__proto__", "constructor", "prototype"].includes(key)) {
608
+ return;
609
+ }
610
+ if (Array.isArray(result[key]) && Array.isArray(current[key])) {
611
+ result[key] = merge.options.mergeArrays ? merge.options.uniqueArrayItems ? Array.from(new Set(result[key].concat(current[key]))) : [...result[key], ...current[key]] : current[key];
612
+ } else if (isObject(result[key]) && isObject(current[key])) {
613
+ result[key] = merge(result[key], current[key]);
614
+ } else if (!isObject(result[key]) && isObject(current[key])) {
615
+ result[key] = merge(current[key], void 0);
616
+ } else {
617
+ result[key] = current[key] === void 0 ? merge.options.allowUndefinedOverrides ? current[key] : result[key] : current[key];
618
+ }
619
+ });
620
+ return result;
621
+ }, {});
622
+ var defaultOptions = {
623
+ allowUndefinedOverrides: true,
624
+ mergeArrays: true,
625
+ uniqueArrayItems: true
626
+ };
627
+ merge.options = defaultOptions;
628
+ merge.withOptions = (options, ...objects) => {
629
+ merge.options = Object.assign(Object.assign({}, defaultOptions), options);
630
+ const result = merge(...objects);
631
+ merge.options = defaultOptions;
632
+ return result;
633
+ };
634
+
635
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.7.7/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
636
+ var import_v32 = require("zod/v3");
637
+ function extendApi(schema, schemaObject = {}) {
638
+ const This = schema.constructor;
639
+ const newSchema = new This(schema._def);
640
+ newSchema.metaOpenApi = Object.assign(
641
+ {},
642
+ schema.metaOpenApi || {},
643
+ schemaObject
644
+ );
645
+ return newSchema;
646
+ }
647
+ function iterateZodObject({
648
+ zodRef,
649
+ useOutput,
650
+ hideDefinitions,
651
+ openApiVersion
652
+ }) {
653
+ const reduced = Object.keys(zodRef.shape).filter((key) => hideDefinitions?.includes(key) === false).reduce(
654
+ (carry, key) => ({
655
+ ...carry,
656
+ [key]: generateSchema(zodRef.shape[key], useOutput, openApiVersion)
657
+ }),
658
+ {}
659
+ );
660
+ return reduced;
661
+ }
662
+ function typeFormat(type22, openApiVersion) {
663
+ return openApiVersion === "3.0" ? type22 : [type22];
664
+ }
665
+ function parseTransformation({
666
+ zodRef,
667
+ schemas,
668
+ useOutput,
669
+ openApiVersion
670
+ }) {
671
+ const input = generateSchema(zodRef._def.schema, useOutput, openApiVersion);
672
+ let output = "undefined";
673
+ if (useOutput && zodRef._def.effect) {
674
+ const effect = zodRef._def.effect.type === "transform" ? zodRef._def.effect : null;
675
+ if (effect && "transform" in effect) {
676
+ try {
677
+ const type22 = Array.isArray(input.type) ? input.type[0] : input.type;
678
+ output = typeof effect.transform(
679
+ ["integer", "number"].includes(`${type22}`) ? 0 : "string" === type22 ? "" : "boolean" === type22 ? false : "object" === type22 ? {} : "null" === type22 ? null : "array" === type22 ? [] : void 0,
680
+ { addIssue: () => void 0, path: [] }
681
+ // TODO: Discover if context is necessary here
682
+ );
683
+ } catch {
684
+ }
685
+ }
686
+ }
687
+ const outputType = output;
688
+ return merge(
689
+ {
690
+ ...zodRef.description ? { description: zodRef.description } : {},
691
+ ...input,
692
+ ...["number", "string", "boolean", "null"].includes(output) ? {
693
+ type: typeFormat(outputType, openApiVersion)
694
+ } : {}
695
+ },
696
+ ...schemas
697
+ );
698
+ }
699
+ function parseString({
700
+ zodRef,
701
+ schemas,
702
+ openApiVersion
703
+ }) {
704
+ const baseSchema = {
705
+ type: typeFormat("string", openApiVersion)
706
+ };
707
+ const { checks = [] } = zodRef._def;
708
+ checks.forEach((item) => {
709
+ switch (item.kind) {
710
+ case "email":
711
+ baseSchema.format = "email";
712
+ break;
713
+ case "uuid":
714
+ baseSchema.format = "uuid";
715
+ break;
716
+ case "cuid":
717
+ baseSchema.format = "cuid";
718
+ break;
719
+ case "url":
720
+ baseSchema.format = "uri";
721
+ break;
722
+ case "datetime":
723
+ baseSchema.format = "date-time";
724
+ break;
725
+ case "length":
726
+ baseSchema.minLength = item.value;
727
+ baseSchema.maxLength = item.value;
728
+ break;
729
+ case "max":
730
+ baseSchema.maxLength = item.value;
731
+ break;
732
+ case "min":
733
+ baseSchema.minLength = item.value;
734
+ break;
735
+ case "regex":
736
+ baseSchema.pattern = item.regex.source;
737
+ break;
738
+ }
739
+ });
740
+ return merge(
741
+ baseSchema,
742
+ zodRef.description ? { description: zodRef.description } : {},
743
+ ...schemas
744
+ );
745
+ }
746
+ function parseNumber({
747
+ zodRef,
748
+ schemas,
749
+ openApiVersion
750
+ }) {
751
+ const baseSchema = {
752
+ type: typeFormat("number", openApiVersion)
753
+ };
754
+ const { checks = [] } = zodRef._def;
755
+ checks.forEach((item) => {
756
+ switch (item.kind) {
757
+ case "max":
758
+ if (item.inclusive || openApiVersion === "3.0") {
759
+ baseSchema.maximum = item.value;
760
+ }
761
+ if (!item.inclusive) {
762
+ if (openApiVersion === "3.0") {
763
+ baseSchema.exclusiveMaximum = true;
764
+ } else {
765
+ baseSchema.exclusiveMaximum = item.value;
766
+ }
767
+ }
768
+ break;
769
+ case "min":
770
+ if (item.inclusive || openApiVersion === "3.0") {
771
+ baseSchema.minimum = item.value;
772
+ }
773
+ if (!item.inclusive) {
774
+ if (openApiVersion === "3.0") {
775
+ baseSchema.exclusiveMinimum = true;
776
+ } else {
777
+ baseSchema.exclusiveMinimum = item.value;
778
+ }
779
+ }
780
+ break;
781
+ case "int":
782
+ baseSchema.type = typeFormat("integer", openApiVersion);
783
+ break;
784
+ case "multipleOf":
785
+ baseSchema.multipleOf = item.value;
786
+ break;
787
+ }
788
+ });
789
+ return merge(
790
+ baseSchema,
791
+ zodRef.description ? { description: zodRef.description } : {},
792
+ ...schemas
793
+ );
794
+ }
795
+ function getExcludedDefinitionsFromSchema(schemas) {
796
+ const excludedDefinitions = [];
797
+ for (const schema of schemas) {
798
+ if (Array.isArray(schema.hideDefinitions)) {
799
+ excludedDefinitions.push(...schema.hideDefinitions);
800
+ }
801
+ }
802
+ return excludedDefinitions;
803
+ }
804
+ function parseObject({
805
+ zodRef,
806
+ schemas,
807
+ useOutput,
808
+ hideDefinitions,
809
+ openApiVersion
810
+ }) {
811
+ let additionalProperties;
812
+ if (!(zodRef._def.catchall instanceof import_v32.z.ZodNever || zodRef._def.catchall?._def.typeName === "ZodNever"))
813
+ additionalProperties = generateSchema(
814
+ zodRef._def.catchall,
815
+ useOutput,
816
+ openApiVersion
817
+ );
818
+ else if (zodRef._def.unknownKeys === "passthrough")
819
+ additionalProperties = true;
820
+ else if (zodRef._def.unknownKeys === "strict") additionalProperties = false;
821
+ additionalProperties = additionalProperties != null ? { additionalProperties } : {};
822
+ const requiredProperties = Object.keys(
823
+ zodRef.shape
824
+ ).filter((key) => {
825
+ const item = zodRef.shape[key];
826
+ return !(item.isOptional() || item instanceof import_v32.z.ZodDefault || item._def.typeName === "ZodDefault") && !(item instanceof import_v32.z.ZodNever || item._def.typeName === "ZodDefault");
827
+ });
828
+ const required = requiredProperties.length > 0 ? { required: requiredProperties } : {};
829
+ return merge(
830
+ {
831
+ type: typeFormat("object", openApiVersion),
832
+ properties: iterateZodObject({
833
+ zodRef,
834
+ schemas,
835
+ useOutput,
836
+ hideDefinitions: getExcludedDefinitionsFromSchema(schemas),
837
+ openApiVersion
838
+ }),
839
+ ...required,
840
+ ...additionalProperties,
841
+ ...hideDefinitions
842
+ },
843
+ zodRef.description ? { description: zodRef.description, hideDefinitions } : {},
844
+ ...schemas
845
+ );
846
+ }
847
+ function parseRecord({
848
+ zodRef,
849
+ schemas,
850
+ useOutput,
851
+ openApiVersion
852
+ }) {
853
+ return merge(
854
+ {
855
+ type: typeFormat("object", openApiVersion),
856
+ additionalProperties: zodRef._def.valueType instanceof import_v32.z.ZodUnknown ? {} : generateSchema(zodRef._def.valueType, useOutput, openApiVersion)
857
+ },
858
+ zodRef.description ? { description: zodRef.description } : {},
859
+ ...schemas
860
+ );
861
+ }
862
+ function parseBigInt({
863
+ zodRef,
864
+ schemas,
865
+ openApiVersion
866
+ }) {
867
+ return merge(
868
+ {
869
+ type: typeFormat("integer", openApiVersion),
870
+ format: "int64"
871
+ },
872
+ zodRef.description ? { description: zodRef.description } : {},
873
+ ...schemas
874
+ );
875
+ }
876
+ function parseBoolean({
877
+ zodRef,
878
+ schemas,
879
+ openApiVersion
880
+ }) {
881
+ return merge(
882
+ { type: typeFormat("boolean", openApiVersion) },
883
+ zodRef.description ? { description: zodRef.description } : {},
884
+ ...schemas
885
+ );
886
+ }
887
+ function parseDate({
888
+ zodRef,
889
+ schemas,
890
+ openApiVersion
891
+ }) {
892
+ return merge(
893
+ {
894
+ type: typeFormat("string", openApiVersion),
895
+ format: "date-time"
896
+ },
897
+ zodRef.description ? { description: zodRef.description } : {},
898
+ ...schemas
899
+ );
900
+ }
901
+ function parseNull({
902
+ zodRef,
903
+ schemas,
904
+ openApiVersion
905
+ }) {
906
+ return merge(
907
+ openApiVersion === "3.0" ? { type: "null" } : {
908
+ type: ["string", "null"],
909
+ enum: ["null"]
910
+ },
911
+ zodRef.description ? { description: zodRef.description } : {},
912
+ ...schemas
913
+ );
914
+ }
915
+ function parseOptional({
916
+ schemas,
917
+ zodRef,
918
+ useOutput,
919
+ openApiVersion
920
+ }) {
921
+ return merge(
922
+ generateSchema(zodRef.unwrap(), useOutput, openApiVersion),
923
+ zodRef.description ? { description: zodRef.description } : {},
924
+ ...schemas
925
+ );
926
+ }
927
+ function parseNullable({
928
+ schemas,
929
+ zodRef,
930
+ useOutput,
931
+ openApiVersion
932
+ }) {
933
+ const schema = generateSchema(zodRef.unwrap(), useOutput, openApiVersion);
934
+ return merge(
935
+ schema,
936
+ openApiVersion === "3.0" ? { nullable: true } : { type: typeFormat("null", openApiVersion) },
937
+ zodRef.description ? { description: zodRef.description } : {},
938
+ ...schemas
939
+ );
940
+ }
941
+ function parseDefault({
942
+ schemas,
943
+ zodRef,
944
+ useOutput,
945
+ openApiVersion
946
+ }) {
947
+ return merge(
948
+ {
949
+ default: zodRef._def.defaultValue(),
950
+ ...generateSchema(zodRef._def.innerType, useOutput, openApiVersion)
951
+ },
952
+ zodRef.description ? { description: zodRef.description } : {},
953
+ ...schemas
954
+ );
955
+ }
956
+ function parseArray({
957
+ schemas,
958
+ zodRef,
959
+ useOutput,
960
+ openApiVersion
961
+ }) {
962
+ const constraints = {};
963
+ if (zodRef._def.exactLength != null) {
964
+ constraints.minItems = zodRef._def.exactLength.value;
965
+ constraints.maxItems = zodRef._def.exactLength.value;
966
+ }
967
+ if (zodRef._def.minLength != null)
968
+ constraints.minItems = zodRef._def.minLength.value;
969
+ if (zodRef._def.maxLength != null)
970
+ constraints.maxItems = zodRef._def.maxLength.value;
971
+ return merge(
972
+ {
973
+ type: typeFormat("array", openApiVersion),
974
+ items: generateSchema(zodRef.element, useOutput, openApiVersion),
975
+ ...constraints
976
+ },
977
+ zodRef.description ? { description: zodRef.description } : {},
978
+ ...schemas
979
+ );
980
+ }
981
+ function parseLiteral({
982
+ schemas,
983
+ zodRef,
984
+ openApiVersion
985
+ }) {
986
+ const type22 = typeof zodRef._def.value;
987
+ return merge(
988
+ {
989
+ type: typeFormat(type22, openApiVersion),
990
+ enum: [zodRef._def.value]
991
+ },
992
+ zodRef.description ? { description: zodRef.description } : {},
993
+ ...schemas
994
+ );
995
+ }
996
+ function parseEnum({
997
+ schemas,
998
+ zodRef,
999
+ openApiVersion
1000
+ }) {
1001
+ const type22 = typeof Object.values(zodRef._def.values)[0];
1002
+ return merge(
1003
+ {
1004
+ type: typeFormat(type22, openApiVersion),
1005
+ enum: Object.values(zodRef._def.values)
1006
+ },
1007
+ zodRef.description ? { description: zodRef.description } : {},
1008
+ ...schemas
1009
+ );
1010
+ }
1011
+ function parseIntersection({
1012
+ schemas,
1013
+ zodRef,
1014
+ useOutput,
1015
+ openApiVersion
1016
+ }) {
1017
+ return merge(
1018
+ {
1019
+ allOf: [
1020
+ generateSchema(zodRef._def.left, useOutput, openApiVersion),
1021
+ generateSchema(zodRef._def.right, useOutput, openApiVersion)
1022
+ ]
1023
+ },
1024
+ zodRef.description ? { description: zodRef.description } : {},
1025
+ ...schemas
1026
+ );
1027
+ }
1028
+ function parseUnion({
1029
+ schemas,
1030
+ zodRef,
1031
+ useOutput,
1032
+ openApiVersion
1033
+ }) {
1034
+ const contents = zodRef._def.options;
1035
+ if (contents.reduce(
1036
+ (prev, content) => prev && content._def.typeName === "ZodLiteral",
1037
+ true
1038
+ )) {
1039
+ const literals = contents;
1040
+ const type22 = literals.reduce(
1041
+ (prev, content) => !prev || prev === typeof content._def.value ? typeof content._def.value : null,
1042
+ null
1043
+ );
1044
+ if (type22) {
1045
+ return merge(
1046
+ {
1047
+ type: typeFormat(type22, openApiVersion),
1048
+ enum: literals.map((literal22) => literal22._def.value)
1049
+ },
1050
+ zodRef.description ? { description: zodRef.description } : {},
1051
+ ...schemas
1052
+ );
1053
+ }
1054
+ }
1055
+ const oneOfContents = openApiVersion === "3.0" ? contents.filter((content) => content._def.typeName !== "ZodNull") : contents;
1056
+ const contentsHasNull = contents.length != oneOfContents.length;
1057
+ return merge(
1058
+ {
1059
+ oneOf: oneOfContents.map(
1060
+ (schema) => generateSchema(schema, useOutput, openApiVersion)
1061
+ )
1062
+ },
1063
+ contentsHasNull ? { nullable: true } : {},
1064
+ zodRef.description ? { description: zodRef.description } : {},
1065
+ ...schemas
1066
+ );
1067
+ }
1068
+ function parseDiscriminatedUnion({
1069
+ schemas,
1070
+ zodRef,
1071
+ useOutput,
1072
+ openApiVersion
1073
+ }) {
1074
+ return merge(
1075
+ {
1076
+ discriminator: {
1077
+ propertyName: zodRef._def.discriminator
1078
+ },
1079
+ oneOf: Array.from(
1080
+ zodRef._def.options.values()
1081
+ ).map((schema) => generateSchema(schema, useOutput, openApiVersion))
1082
+ },
1083
+ zodRef.description ? { description: zodRef.description } : {},
1084
+ ...schemas
1085
+ );
1086
+ }
1087
+ function parseNever({
1088
+ zodRef,
1089
+ schemas
1090
+ }) {
1091
+ return merge(
1092
+ { readOnly: true },
1093
+ zodRef.description ? { description: zodRef.description } : {},
1094
+ ...schemas
1095
+ );
1096
+ }
1097
+ function parseBranded({
1098
+ schemas,
1099
+ zodRef,
1100
+ useOutput,
1101
+ openApiVersion
1102
+ }) {
1103
+ return merge(
1104
+ generateSchema(zodRef._def.type, useOutput, openApiVersion),
1105
+ ...schemas
1106
+ );
1107
+ }
1108
+ function catchAllParser({
1109
+ zodRef,
1110
+ schemas
1111
+ }) {
1112
+ return merge(
1113
+ zodRef.description ? { description: zodRef.description } : {},
1114
+ ...schemas
1115
+ );
1116
+ }
1117
+ function parsePipeline({
1118
+ schemas,
1119
+ zodRef,
1120
+ useOutput,
1121
+ openApiVersion
1122
+ }) {
1123
+ return merge(
1124
+ generateSchema(
1125
+ useOutput ? zodRef._def.out : zodRef._def.in,
1126
+ useOutput,
1127
+ openApiVersion
1128
+ ),
1129
+ ...schemas
1130
+ );
1131
+ }
1132
+ function parseReadonly({
1133
+ zodRef,
1134
+ useOutput,
1135
+ schemas,
1136
+ openApiVersion
1137
+ }) {
1138
+ return merge(
1139
+ generateSchema(zodRef._def.innerType, useOutput, openApiVersion),
1140
+ zodRef.description ? { description: zodRef.description } : {},
1141
+ ...schemas
1142
+ );
1143
+ }
1144
+ var workerMap = {
1145
+ ZodObject: parseObject,
1146
+ ZodRecord: parseRecord,
1147
+ ZodString: parseString,
1148
+ ZodNumber: parseNumber,
1149
+ ZodBigInt: parseBigInt,
1150
+ ZodBoolean: parseBoolean,
1151
+ ZodDate: parseDate,
1152
+ ZodNull: parseNull,
1153
+ ZodOptional: parseOptional,
1154
+ ZodNullable: parseNullable,
1155
+ ZodDefault: parseDefault,
1156
+ ZodArray: parseArray,
1157
+ ZodLiteral: parseLiteral,
1158
+ ZodEnum: parseEnum,
1159
+ ZodNativeEnum: parseEnum,
1160
+ ZodTransformer: parseTransformation,
1161
+ ZodEffects: parseTransformation,
1162
+ ZodIntersection: parseIntersection,
1163
+ ZodUnion: parseUnion,
1164
+ ZodDiscriminatedUnion: parseDiscriminatedUnion,
1165
+ ZodNever: parseNever,
1166
+ ZodBranded: parseBranded,
1167
+ // TODO Transform the rest to schemas
1168
+ ZodUndefined: catchAllParser,
1169
+ // TODO: `prefixItems` is allowed in OpenAPI 3.1 which can be used to create tuples
1170
+ ZodTuple: catchAllParser,
1171
+ ZodMap: catchAllParser,
1172
+ ZodFunction: catchAllParser,
1173
+ ZodLazy: catchAllParser,
1174
+ ZodPromise: catchAllParser,
1175
+ ZodAny: catchAllParser,
1176
+ ZodUnknown: catchAllParser,
1177
+ ZodVoid: catchAllParser,
1178
+ ZodPipeline: parsePipeline,
1179
+ ZodReadonly: parseReadonly
1180
+ };
1181
+ function generateSchema(zodRef, useOutput = false, openApiVersion = "3.1") {
1182
+ const { metaOpenApi = {} } = zodRef;
1183
+ const schemas = [
1184
+ ...Array.isArray(metaOpenApi) ? metaOpenApi : [metaOpenApi]
1185
+ ];
1186
+ try {
1187
+ const typeName = zodRef._def.typeName;
1188
+ if (typeName in workerMap) {
1189
+ return workerMap[typeName]({
1190
+ zodRef,
1191
+ schemas,
1192
+ useOutput,
1193
+ openApiVersion
1194
+ });
1195
+ }
1196
+ return catchAllParser({ zodRef, schemas, openApiVersion });
1197
+ } catch (err) {
1198
+ console.error(err);
1199
+ return catchAllParser({ zodRef, schemas, openApiVersion });
1200
+ }
1201
+ }
1202
+ function extendZodWithOpenApi(zod, forceOverride = false) {
1203
+ if (!forceOverride && typeof zod.ZodSchema.prototype.openapi !== "undefined") {
1204
+ return;
1205
+ }
1206
+ zod.ZodSchema.prototype.openapi = function(metadata) {
1207
+ return extendApi(this, metadata);
1208
+ };
1209
+ }
1210
+ extendZodWithOpenApi(import_v3.z);
1026
1211
  var ZodSchemaValidator = class {
1027
1212
  _Type = "Zod";
1028
1213
  _SchemaCatchall;
@@ -1342,7 +1527,7 @@ var ZodSchemaValidator = class {
1342
1527
  * @returns {SchemaObject} The OpenAPI schema object.
1343
1528
  */
1344
1529
  openapi(schema) {
1345
- return (0, import_zod_openapi.generateSchema)(this.schemify(schema));
1530
+ return generateSchema(this.schemify(schema));
1346
1531
  }
1347
1532
  };
1348
1533
  var SchemaValidator2 = () => new ZodSchemaValidator();