@kubb/agent 5.0.0-alpha.5 → 5.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-03-18T13:05:02.780Z",
2
+ "date": "2026-03-18T19:16:52.482Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -4681,19 +4681,19 @@ const isOperationNode = isKind("Operation");
4681
4681
  const isSchemaNode = isKind("Schema");
4682
4682
  function definePrinter(build) {
4683
4683
  return (options) => {
4684
- const { name, options: resolvedOptions, nodes } = build(options != null ? options : {});
4684
+ const { name, options: resolvedOptions, nodes, print: printOverride } = build(options != null ? options : {});
4685
4685
  const context = {
4686
4686
  options: resolvedOptions,
4687
4687
  print: (node) => {
4688
4688
  const handler = nodes[node.type];
4689
- return handler ? handler.call(context, node) : void 0;
4689
+ if (!handler) return void 0;
4690
+ return handler.call(context, node);
4690
4691
  }
4691
4692
  };
4692
4693
  return {
4693
4694
  name,
4694
4695
  options: resolvedOptions,
4695
- print: context.print,
4696
- for: (nodes2) => nodes2.map(context.print)
4696
+ print: printOverride ? printOverride.bind(context) : context.print
4697
4697
  };
4698
4698
  };
4699
4699
  }
@@ -5956,7 +5956,7 @@ const fsStorage = defineStorage(() => ({
5956
5956
  await clean(resolve(base));
5957
5957
  }
5958
5958
  }));
5959
- var version$1 = "5.0.0-alpha.5";
5959
+ var version$1 = "5.0.0-alpha.6";
5960
5960
  function getDiagnosticInfo() {
5961
5961
  return {
5962
5962
  nodeVersion: version$2,
@@ -6766,7 +6766,7 @@ function resolveOptions(node, { options, exclude = [], include, override = [] })
6766
6766
  return options;
6767
6767
  }
6768
6768
 
6769
- var version = "5.0.0-alpha.5";
6769
+ var version = "5.0.0-alpha.6";
6770
6770
 
6771
6771
  function isCommandMessage(msg) {
6772
6772
  return msg.type === "command";
@@ -209411,7 +209411,6 @@ const parse$1 = createParser({
209411
209411
  }).map(([name2, schemas]) => {
209412
209412
  var _a2, _b2, _c2, _d2, _e2;
209413
209413
  const mappedName = ((_a2 = schemas.find((schema2) => schema2.keyword === schemaKeywords.name)) == null ? void 0 : _a2.args) || name2;
209414
- if (options.mapper && Object.hasOwn(options.mapper, mappedName)) return options.mapper[mappedName];
209415
209414
  const isNullish = schemas.some((schema2) => schema2.keyword === schemaKeywords.nullish);
209416
209415
  const isNullable = schemas.some((schema2) => schema2.keyword === schemaKeywords.nullable);
209417
209416
  const isOptional = schemas.some((schema2) => schema2.keyword === schemaKeywords.optional);
@@ -209499,7 +209498,7 @@ const parse$1 = createParser({
209499
209498
  }
209500
209499
  }
209501
209500
  });
209502
- function Type$1({ name, typedName, tree, keysToOmit, schema, optionalType, arrayType, syntaxType, enumType, enumKeyCasing, mapper, description }) {
209501
+ function Type$1({ name, typedName, tree, keysToOmit, schema, optionalType, arrayType, syntaxType, enumType, enumKeyCasing, description }) {
209503
209502
  const typeNodes = [];
209504
209503
  if (!tree.length) return "";
209505
209504
  const schemaFromTree = tree.find((item) => item.keyword === schemaKeywords.schema);
@@ -209513,8 +209512,7 @@ function Type$1({ name, typedName, tree, keysToOmit, schema, optionalType, array
209513
209512
  }, {
209514
209513
  optionalType,
209515
209514
  arrayType,
209516
- enumType,
209517
- mapper
209515
+ enumType
209518
209516
  })).filter(Boolean).at(0) || typeKeywordMapper.undefined();
209519
209517
  if (["asConst", "asPascalConst"].includes(enumType) && enumSchemas.length > 0) {
209520
209518
  const isDirectEnum = schema.type === "array" && schema.items !== void 0;
@@ -209987,7 +209985,7 @@ function printResponseSchema({ baseName, schemas, pluginManager, unknownType })
209987
209985
  const typeGenerator$1 = createReactGenerator({
209988
209986
  name: "typescript",
209989
209987
  Operation({ operation, generator, plugin }) {
209990
- const { options, options: { mapper, enumType, enumKeyCasing, syntaxType, optionalType, arrayType, unknownType, paramsCasing } } = plugin;
209988
+ const { options, options: { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, unknownType, paramsCasing } } = plugin;
209991
209989
  const mode = useMode();
209992
209990
  const pluginManager = usePluginManager();
209993
209991
  const oas = useOas();
@@ -210046,7 +210044,6 @@ const typeGenerator$1 = createReactGenerator({
210046
210044
  description,
210047
210045
  tree,
210048
210046
  schema: transformedSchema,
210049
- mapper,
210050
210047
  enumType,
210051
210048
  enumKeyCasing,
210052
210049
  optionalType,
@@ -210106,7 +210103,7 @@ const typeGenerator$1 = createReactGenerator({
210106
210103
  });
210107
210104
  },
210108
210105
  Schema({ schema, plugin }) {
210109
- const { options: { mapper, enumType, enumKeyCasing, syntaxType, optionalType, arrayType, output } } = plugin;
210106
+ const { options: { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, output } } = plugin;
210110
210107
  const mode = useMode();
210111
210108
  const oas = useOas();
210112
210109
  const pluginManager = usePluginManager();
@@ -210148,7 +210145,6 @@ const typeGenerator$1 = createReactGenerator({
210148
210145
  description: schema.value.description,
210149
210146
  tree: schema.tree,
210150
210147
  schema: schema.value,
210151
- mapper,
210152
210148
  enumType,
210153
210149
  enumKeyCasing,
210154
210150
  optionalType,
@@ -210158,6 +210154,23 @@ const typeGenerator$1 = createReactGenerator({
210158
210154
  });
210159
210155
  }
210160
210156
  });
210157
+ const OPTIONAL_ADDS_UNDEFINED = /* @__PURE__ */ new Set(["undefined", "questionTokenAndUndefined"]);
210158
+ const OPTIONAL_ADDS_QUESTION_TOKEN = /* @__PURE__ */ new Set(["questionToken", "questionTokenAndUndefined"]);
210159
+ const ENUM_TYPES_WITH_KEY_SUFFIX = /* @__PURE__ */ new Set(["asConst", "asPascalConst"]);
210160
+ const ENUM_TYPES_WITH_RUNTIME_VALUE = /* @__PURE__ */ new Set([
210161
+ "enum",
210162
+ "asConst",
210163
+ "asPascalConst",
210164
+ "constEnum",
210165
+ "literal",
210166
+ void 0
210167
+ ]);
210168
+ const ENUM_TYPES_WITH_TYPE_ONLY = /* @__PURE__ */ new Set([
210169
+ "asConst",
210170
+ "asPascalConst",
210171
+ "literal",
210172
+ void 0
210173
+ ]);
210161
210174
  function constToTypeNode(value, format) {
210162
210175
  if (format === "boolean") return createLiteralTypeNode(value === true ? createTrue() : createFalse());
210163
210176
  if (format === "number" && typeof value === "number") {
@@ -210186,7 +210199,7 @@ function buildTupleNode(node, print) {
210186
210199
  return createTupleTypeNode(items);
210187
210200
  }
210188
210201
  function buildPropertyType(schema, baseType, optionalType) {
210189
- const addsUndefined = ["undefined", "questionTokenAndUndefined"].includes(optionalType);
210202
+ const addsUndefined = OPTIONAL_ADDS_UNDEFINED.has(optionalType);
210190
210203
  let type = baseType;
210191
210204
  if (schema.nullable) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.null] });
210192
210205
  if ((schema.nullish || schema.optional) && addsUndefined) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.undefined] });
@@ -210221,202 +210234,200 @@ function buildIndexSignatures(node, propertyCount, print) {
210221
210234
  }
210222
210235
  return elements;
210223
210236
  }
210224
- const printerTs = definePrinter((options) => ({
210225
- name: "typescript",
210226
- options,
210227
- nodes: {
210228
- any: () => keywordTypeNodes.any,
210229
- unknown: () => keywordTypeNodes.unknown,
210230
- void: () => keywordTypeNodes.void,
210231
- never: () => keywordTypeNodes.never,
210232
- boolean: () => keywordTypeNodes.boolean,
210233
- null: () => keywordTypeNodes.null,
210234
- blob: () => createTypeReferenceNode("Blob", []),
210235
- string: () => keywordTypeNodes.string,
210236
- uuid: () => keywordTypeNodes.string,
210237
- email: () => keywordTypeNodes.string,
210238
- url: (node) => {
210239
- if (node.path) return createUrlTemplateType(node.path);
210240
- return keywordTypeNodes.string;
210241
- },
210242
- datetime: () => keywordTypeNodes.string,
210243
- number: () => keywordTypeNodes.number,
210244
- integer: () => keywordTypeNodes.number,
210245
- bigint: () => keywordTypeNodes.bigint,
210246
- date: (node) => dateOrStringNode(node),
210247
- time: (node) => dateOrStringNode(node),
210248
- ref(node) {
210249
- if (!node.name) return;
210250
- return createTypeReferenceNode(node.name, void 0);
210251
- },
210252
- enum(node) {
210253
- var _a, _b, _c, _d;
210254
- const values = (_c = (_b = (_a = node.namedEnumValues) == null ? void 0 : _a.map((v) => v.value)) != null ? _b : node.enumValues) != null ? _c : [];
210255
- if (this.options.enumType === "inlineLiteral" || !node.name) return (_d = createUnionDeclaration({
210256
- withParentheses: true,
210257
- nodes: values.filter((v) => v !== null).map((value) => constToTypeNode(value, typeof value === "number" ? "number" : typeof value === "boolean" ? "boolean" : "string")).filter(Boolean)
210258
- })) != null ? _d : void 0;
210259
- return createTypeReferenceNode(["asConst", "asPascalConst"].includes(this.options.enumType) ? `${node.name}Key` : node.name, void 0);
210260
- },
210261
- union(node) {
210262
- var _a, _b, _c;
210263
- const members = (_a = node.members) != null ? _a : [];
210264
- const hasStringLiteral = members.some((m) => m.type === "enum" && m.enumType === "string");
210265
- const hasPlainString = members.some((m) => isPlainStringType(m));
210266
- if (hasStringLiteral && hasPlainString) return (_b = createUnionDeclaration({
210267
- withParentheses: true,
210268
- nodes: members.map((m) => {
210269
- if (isPlainStringType(m)) return createIntersectionDeclaration({
210270
- nodes: [keywordTypeNodes.string, createTypeLiteralNode([])],
210271
- withParentheses: true
210272
- });
210273
- return this.print(m);
210274
- }).filter(Boolean)
210275
- })) != null ? _b : void 0;
210276
- return (_c = createUnionDeclaration({
210277
- withParentheses: true,
210278
- nodes: buildMemberNodes(members, this.print)
210279
- })) != null ? _c : void 0;
210280
- },
210281
- intersection(node) {
210282
- var _a;
210283
- return (_a = createIntersectionDeclaration({
210284
- withParentheses: true,
210285
- nodes: buildMemberNodes(node.members, this.print)
210286
- })) != null ? _a : void 0;
210287
- },
210288
- array(node) {
210289
- var _a, _b;
210290
- return (_b = createArrayDeclaration({
210291
- nodes: ((_a = node.items) != null ? _a : []).map((item) => this.print(item)).filter(Boolean),
210292
- arrayType: this.options.arrayType
210293
- })) != null ? _b : void 0;
210294
- },
210295
- tuple(node) {
210296
- return buildTupleNode(node, this.print);
210297
- },
210298
- object(node) {
210299
- const addsQuestionToken = ["questionToken", "questionTokenAndUndefined"].includes(this.options.optionalType);
210300
- const { print } = this;
210301
- const propertyNodes = node.properties.map((prop) => {
210237
+ const printerTs = definePrinter((options) => {
210238
+ const addsUndefined = OPTIONAL_ADDS_UNDEFINED.has(options.optionalType);
210239
+ return {
210240
+ name: "typescript",
210241
+ options,
210242
+ nodes: {
210243
+ any: () => keywordTypeNodes.any,
210244
+ unknown: () => keywordTypeNodes.unknown,
210245
+ void: () => keywordTypeNodes.void,
210246
+ never: () => keywordTypeNodes.never,
210247
+ boolean: () => keywordTypeNodes.boolean,
210248
+ null: () => keywordTypeNodes.null,
210249
+ blob: () => createTypeReferenceNode("Blob", []),
210250
+ string: () => keywordTypeNodes.string,
210251
+ uuid: () => keywordTypeNodes.string,
210252
+ email: () => keywordTypeNodes.string,
210253
+ url: (node) => {
210254
+ if (node.path) return createUrlTemplateType(node.path);
210255
+ return keywordTypeNodes.string;
210256
+ },
210257
+ datetime: () => keywordTypeNodes.string,
210258
+ number: () => keywordTypeNodes.number,
210259
+ integer: () => keywordTypeNodes.number,
210260
+ bigint: () => keywordTypeNodes.bigint,
210261
+ date: dateOrStringNode,
210262
+ time: dateOrStringNode,
210263
+ ref(node) {
210264
+ if (!node.name) return;
210265
+ return createTypeReferenceNode(node.name, void 0);
210266
+ },
210267
+ enum(node) {
210268
+ var _a, _b, _c, _d;
210269
+ const values = (_c = (_b = (_a = node.namedEnumValues) == null ? void 0 : _a.map((v) => v.value)) != null ? _b : node.enumValues) != null ? _c : [];
210270
+ if (this.options.enumType === "inlineLiteral" || !node.name) return (_d = createUnionDeclaration({
210271
+ withParentheses: true,
210272
+ nodes: values.filter((v) => v !== null).map((value) => constToTypeNode(value, typeof value)).filter(Boolean)
210273
+ })) != null ? _d : void 0;
210274
+ const resolvedName = pascalCase$6(node.name);
210275
+ return createTypeReferenceNode(ENUM_TYPES_WITH_KEY_SUFFIX.has(this.options.enumType) ? `${resolvedName}Key` : resolvedName, void 0);
210276
+ },
210277
+ union(node) {
210278
+ var _a, _b, _c;
210279
+ const members = (_a = node.members) != null ? _a : [];
210280
+ const hasStringLiteral = members.some((m) => m.type === "enum" && m.enumType === "string");
210281
+ const hasPlainString = members.some((m) => isPlainStringType(m));
210282
+ if (hasStringLiteral && hasPlainString) return (_b = createUnionDeclaration({
210283
+ withParentheses: true,
210284
+ nodes: members.map((m) => {
210285
+ if (isPlainStringType(m)) return createIntersectionDeclaration({
210286
+ nodes: [keywordTypeNodes.string, createTypeLiteralNode([])],
210287
+ withParentheses: true
210288
+ });
210289
+ return this.print(m);
210290
+ }).filter(Boolean)
210291
+ })) != null ? _b : void 0;
210292
+ return (_c = createUnionDeclaration({
210293
+ withParentheses: true,
210294
+ nodes: buildMemberNodes(members, this.print)
210295
+ })) != null ? _c : void 0;
210296
+ },
210297
+ intersection(node) {
210302
210298
  var _a;
210303
- if (this.options.mapper && Object.hasOwn(this.options.mapper, prop.name)) return this.options.mapper[prop.name];
210304
- const baseType = (_a = print(prop.schema)) != null ? _a : keywordTypeNodes.unknown;
210305
- const type = buildPropertyType(prop.schema, baseType, this.options.optionalType);
210306
- return appendJSDocToNode({
210307
- node: createPropertySignature({
210308
- questionToken: prop.schema.optional || prop.schema.nullish ? addsQuestionToken : false,
210309
- name: prop.name,
210310
- type,
210311
- readOnly: prop.schema.readOnly
210312
- }),
210313
- comments: buildPropertyJSDocComments(prop.schema)
210299
+ return (_a = createIntersectionDeclaration({
210300
+ withParentheses: true,
210301
+ nodes: buildMemberNodes(node.members, this.print)
210302
+ })) != null ? _a : void 0;
210303
+ },
210304
+ array(node) {
210305
+ var _a, _b;
210306
+ return (_b = createArrayDeclaration({
210307
+ nodes: ((_a = node.items) != null ? _a : []).map((item) => this.print(item)).filter(Boolean),
210308
+ arrayType: this.options.arrayType
210309
+ })) != null ? _b : void 0;
210310
+ },
210311
+ tuple(node) {
210312
+ return buildTupleNode(node, this.print);
210313
+ },
210314
+ object(node) {
210315
+ const { print, options: options2 } = this;
210316
+ const addsQuestionToken = OPTIONAL_ADDS_QUESTION_TOKEN.has(options2.optionalType);
210317
+ const propertyNodes = node.properties.map((prop) => {
210318
+ var _a;
210319
+ const baseType = (_a = print(prop.schema)) != null ? _a : keywordTypeNodes.unknown;
210320
+ const type = buildPropertyType(prop.schema, baseType, options2.optionalType);
210321
+ return appendJSDocToNode({
210322
+ node: createPropertySignature({
210323
+ questionToken: prop.schema.optional || prop.schema.nullish ? addsQuestionToken : false,
210324
+ name: prop.name,
210325
+ type,
210326
+ readOnly: prop.schema.readOnly
210327
+ }),
210328
+ comments: buildPropertyJSDocComments(prop.schema)
210329
+ });
210314
210330
  });
210331
+ const allElements = [...propertyNodes, ...buildIndexSignatures(node, propertyNodes.length, print)];
210332
+ if (!allElements.length) return keywordTypeNodes.object;
210333
+ return createTypeLiteralNode(allElements);
210334
+ }
210335
+ },
210336
+ print(node) {
210337
+ let type = this.print(node);
210338
+ if (!type) return;
210339
+ if (node.nullable) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.null] });
210340
+ if ((node.nullish || node.optional) && addsUndefined) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.undefined] });
210341
+ const { typeName, syntaxType = "type", description, keysToOmit } = this.options;
210342
+ if (!typeName) return type;
210343
+ const useTypeGeneration = syntaxType === "type" || type.kind === syntaxKind.union || !!(keysToOmit == null ? void 0 : keysToOmit.length);
210344
+ return createTypeDeclaration({
210345
+ name: typeName,
210346
+ isExportable: true,
210347
+ type: (keysToOmit == null ? void 0 : keysToOmit.length) ? createOmitDeclaration({
210348
+ keys: keysToOmit,
210349
+ type,
210350
+ nonNullable: true
210351
+ }) : type,
210352
+ syntax: useTypeGeneration ? "type" : "interface",
210353
+ comments: [
210354
+ (node == null ? void 0 : node.title) ? jsStringEscape$1(node.title) : void 0,
210355
+ description ? `@description ${jsStringEscape$1(description)}` : void 0,
210356
+ (node == null ? void 0 : node.deprecated) ? "@deprecated" : void 0,
210357
+ node && "min" in node && node.min !== void 0 ? `@minLength ${node.min}` : void 0,
210358
+ node && "max" in node && node.max !== void 0 ? `@maxLength ${node.max}` : void 0,
210359
+ node && "pattern" in node && node.pattern ? `@pattern ${node.pattern}` : void 0,
210360
+ (node == null ? void 0 : node.default) ? `@default ${node.default}` : void 0,
210361
+ (node == null ? void 0 : node.example) ? `@example ${node.example}` : void 0
210362
+ ]
210315
210363
  });
210316
- const allElements = [...propertyNodes, ...buildIndexSignatures(node, propertyNodes.length, print)];
210317
- if (!allElements.length) return keywordTypeNodes.object;
210318
- return createTypeLiteralNode(allElements);
210319
210364
  }
210320
- }
210321
- }));
210322
- function Type({ name, typedName, node, keysToOmit, optionalType, arrayType, syntaxType, enumType, enumKeyCasing, mapper, ...rest }) {
210323
- const typeNodes = [];
210324
- const description = rest.description || (node == null ? void 0 : node.description);
210365
+ };
210366
+ });
210367
+ function getEnumNames(node, enumType) {
210368
+ const resolved = pascalCase$6(node.name);
210369
+ return {
210370
+ enumName: enumType === "asPascalConst" ? resolved : camelCase$a(node.name),
210371
+ typeName: ENUM_TYPES_WITH_KEY_SUFFIX.has(enumType) ? `${resolved}Key` : resolved
210372
+ };
210373
+ }
210374
+ function Enum({ node, enumType, enumKeyCasing }) {
210375
+ var _a, _b, _c, _d;
210376
+ const { enumName, typeName } = getEnumNames(node, enumType);
210377
+ const [nameNode, typeNode] = createEnumDeclaration({
210378
+ name: enumName,
210379
+ typeName,
210380
+ enums: (_d = (_c = (_a = node.namedEnumValues) == null ? void 0 : _a.map((v) => [trimQuotes$1(v.name.toString()), v.value])) != null ? _c : (_b = node.enumValues) == null ? void 0 : _b.filter((v) => v !== null && v !== void 0).map((v) => [trimQuotes$1(v.toString()), v])) != null ? _d : [],
210381
+ type: enumType,
210382
+ enumKeyCasing
210383
+ });
210384
+ return /* @__PURE__ */ jsxs(Fragment, { children: [nameNode && /* @__PURE__ */ jsx(File.Source, {
210385
+ name: enumName,
210386
+ isExportable: true,
210387
+ isIndexable: true,
210388
+ isTypeOnly: false,
210389
+ children: safePrint(nameNode)
210390
+ }), /* @__PURE__ */ jsx(File.Source, {
210391
+ name: typeName,
210392
+ isIndexable: true,
210393
+ isExportable: ENUM_TYPES_WITH_RUNTIME_VALUE.has(enumType),
210394
+ isTypeOnly: ENUM_TYPES_WITH_TYPE_ONLY.has(enumType),
210395
+ children: safePrint(typeNode)
210396
+ })] });
210397
+ }
210398
+ function Type({ name, typedName, node, keysToOmit, optionalType, arrayType, syntaxType, enumType, enumKeyCasing, description }) {
210399
+ const resolvedDescription = description || (node == null ? void 0 : node.description);
210325
210400
  const enumSchemaNodes = collect(node, { schema(n) {
210326
210401
  if (n.type === "enum" && n.name) return n;
210327
210402
  } });
210328
- let type = printerTs({
210403
+ const typeNode = printerTs({
210329
210404
  optionalType,
210330
210405
  arrayType,
210331
210406
  enumType,
210332
- mapper
210407
+ typeName: name,
210408
+ syntaxType,
210409
+ description: resolvedDescription,
210410
+ keysToOmit
210333
210411
  }).print(node);
210334
- if (!type) return;
210335
- if (["asConst", "asPascalConst"].includes(enumType) && enumSchemaNodes.length > 0) {
210336
- const isDirectEnum = node.type === "array" && node.items !== void 0;
210337
- const isEnumOnly = "enum" in node && node.enum;
210338
- if (isDirectEnum || isEnumOnly) {
210339
- type = createTypeReferenceNode(`${enumSchemaNodes[0].name}Key`);
210340
- if (isDirectEnum) if (arrayType === "generic") type = createTypeReferenceNode(createIdentifier("Array"), [type]);
210341
- else type = createArrayTypeNode(type);
210342
- }
210343
- }
210344
- if (node) {
210345
- if (node.nullable) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.null] });
210346
- if (node.nullish && ["undefined", "questionTokenAndUndefined"].includes(optionalType)) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.undefined] });
210347
- if (node.optional && ["undefined", "questionTokenAndUndefined"].includes(optionalType)) type = createUnionDeclaration({ nodes: [type, keywordTypeNodes.undefined] });
210348
- }
210349
- const useTypeGeneration = syntaxType === "type" || [syntaxKind.union].includes(type.kind) || !!(keysToOmit == null ? void 0 : keysToOmit.length);
210350
- typeNodes.push(createTypeDeclaration({
210351
- name,
210352
- isExportable: true,
210353
- type: (keysToOmit == null ? void 0 : keysToOmit.length) ? createOmitDeclaration({
210354
- keys: keysToOmit,
210355
- type,
210356
- nonNullable: true
210357
- }) : type,
210358
- syntax: useTypeGeneration ? "type" : "interface",
210359
- comments: [
210360
- (node == null ? void 0 : node.title) ? `${jsStringEscape$1(node.title)}` : void 0,
210361
- description ? `@description ${jsStringEscape$1(description)}` : void 0,
210362
- (node == null ? void 0 : node.deprecated) ? "@deprecated" : void 0,
210363
- node && "min" in node && node.min !== void 0 ? `@minLength ${node.min}` : void 0,
210364
- node && "max" in node && node.max !== void 0 ? `@maxLength ${node.max}` : void 0,
210365
- node && "pattern" in node && node.pattern ? `@pattern ${node.pattern}` : void 0,
210366
- (node == null ? void 0 : node.default) ? `@default ${node.default}` : void 0,
210367
- (node == null ? void 0 : node.example) ? `@example ${node.example}` : void 0
210368
- ]
210369
- }));
210370
- const enums = [...new Map(enumSchemaNodes.map((n) => [n.name, n])).values()].map((enumSchemaNode) => {
210371
- var _a, _b, _c, _d;
210372
- const enumName = enumType === "asPascalConst" ? pascalCase$6(enumSchemaNode.name) : camelCase$a(enumSchemaNode.name);
210373
- const typeName = ["asConst", "asPascalConst"].includes(enumType) ? `${enumSchemaNode.name}Key` : enumSchemaNode.name;
210374
- const [nameNode, typeNode] = createEnumDeclaration({
210375
- name: enumName,
210376
- typeName,
210377
- enums: (_d = (_c = (_a = enumSchemaNode.namedEnumValues) == null ? void 0 : _a.map((v) => [trimQuotes$1(v.name.toString()), v.value])) != null ? _c : (_b = enumSchemaNode.enumValues) == null ? void 0 : _b.filter((v) => v !== null && v !== void 0).map((v) => [trimQuotes$1(v.toString()), v])) != null ? _d : [],
210378
- type: enumType,
210379
- enumKeyCasing
210380
- });
210412
+ if (!typeNode) return;
210413
+ const enums = [...new Map(enumSchemaNodes.map((n) => [n.name, n])).values()].map((node2) => {
210381
210414
  return {
210382
- nameNode,
210383
- typeNode,
210384
- name: enumName,
210385
- typeName
210415
+ node: node2,
210416
+ ...getEnumNames(node2, enumType)
210386
210417
  };
210387
210418
  });
210388
210419
  const shouldExportEnums = enumType !== "inlineLiteral";
210389
210420
  const shouldExportType = enumType === "inlineLiteral" || enums.every((item) => item.typeName !== name);
210390
- return /* @__PURE__ */ jsxs(Fragment, { children: [shouldExportEnums && enums.map(({ name: enumName, nameNode, typeName, typeNode }) => /* @__PURE__ */ jsxs(Fragment, { children: [nameNode && /* @__PURE__ */ jsx(File.Source, {
210391
- name: enumName,
210392
- isExportable: true,
210393
- isIndexable: true,
210394
- isTypeOnly: false,
210395
- children: safePrint(nameNode)
210396
- }), /* @__PURE__ */ jsx(File.Source, {
210397
- name: typeName,
210398
- isIndexable: true,
210399
- isExportable: [
210400
- "enum",
210401
- "asConst",
210402
- "asPascalConst",
210403
- "constEnum",
210404
- "literal",
210405
- void 0
210406
- ].includes(enumType),
210407
- isTypeOnly: [
210408
- "asConst",
210409
- "asPascalConst",
210410
- "literal",
210411
- void 0
210412
- ].includes(enumType),
210413
- children: safePrint(typeNode)
210414
- })] })), shouldExportType && /* @__PURE__ */ jsx(File.Source, {
210421
+ return /* @__PURE__ */ jsxs(Fragment, { children: [shouldExportEnums && enums.map(({ node: node2 }) => /* @__PURE__ */ jsx(Enum, {
210422
+ node: node2,
210423
+ enumType,
210424
+ enumKeyCasing
210425
+ })), shouldExportType && /* @__PURE__ */ jsx(File.Source, {
210415
210426
  name: typedName,
210416
210427
  isTypeOnly: true,
210417
210428
  isExportable: true,
210418
210429
  isIndexable: true,
210419
- children: safePrint(...typeNodes)
210430
+ children: safePrint(typeNode)
210420
210431
  })] });
210421
210432
  }
210422
210433
  function buildParamsSchema({ params, operationId, resolveName }) {
@@ -210427,7 +210438,7 @@ function buildParamsSchema({ params, operationId, resolveName }) {
210427
210438
  schema: createSchema({
210428
210439
  type: "ref",
210429
210440
  name: resolveName({
210430
- name: `${operationId} ${param.name}`,
210441
+ name: `${operationId} ${pascalCase$6(param.in)} ${param.name}`,
210431
210442
  type: "function"
210432
210443
  }),
210433
210444
  optional: !param.required
@@ -210447,7 +210458,7 @@ function buildDataSchemaNode({ node, resolveName }) {
210447
210458
  schema: node.requestBody ? createSchema({
210448
210459
  type: "ref",
210449
210460
  name: resolveName({
210450
- name: `${node.operationId} MutationRequest`,
210461
+ name: `${node.operationId} Data`,
210451
210462
  type: "function"
210452
210463
  }),
210453
210464
  optional: true
@@ -210515,7 +210526,7 @@ function buildResponsesSchemaNode({ node, resolveName }) {
210515
210526
  schema: createSchema({
210516
210527
  type: "ref",
210517
210528
  name: resolveName({
210518
- name: `${node.operationId} ${res.statusCode}`,
210529
+ name: `${node.operationId} Status ${res.statusCode}`,
210519
210530
  type: "function"
210520
210531
  })
210521
210532
  })
@@ -210530,7 +210541,7 @@ function buildResponseUnionSchemaNode({ node, resolveName }) {
210530
210541
  members: responsesWithSchema.map((res) => createSchema({
210531
210542
  type: "ref",
210532
210543
  name: resolveName({
210533
- name: `${node.operationId} ${res.statusCode}`,
210544
+ name: `${node.operationId} Status ${res.statusCode}`,
210534
210545
  type: "function"
210535
210546
  })
210536
210547
  }))
@@ -210540,12 +210551,13 @@ const typeGenerator = defineGenerator({
210540
210551
  name: "typescript",
210541
210552
  type: "react",
210542
210553
  Operation({ node, adapter, options }) {
210543
- const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, mapper } = options;
210554
+ const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group } = options;
210544
210555
  const { mode, getFile, resolveName } = useKubb();
210545
210556
  const file = getFile({
210546
210557
  name: node.operationId,
210547
210558
  extname: ".ts",
210548
- mode
210559
+ mode,
210560
+ options: { group: group ? group.type === "tag" ? { tag: node.tags[0] } : { path: node.path } : void 0 }
210549
210561
  });
210550
210562
  const params = applyParamsCasing$1(node.parameters, paramsCasing);
210551
210563
  function renderSchemaType({ node: schemaNode, name, typedName, description }) {
@@ -210579,29 +210591,28 @@ const typeGenerator = defineGenerator({
210579
210591
  enumKeyCasing,
210580
210592
  optionalType,
210581
210593
  arrayType,
210582
- syntaxType,
210583
- mapper
210594
+ syntaxType
210584
210595
  })] });
210585
210596
  }
210586
210597
  const paramTypes = params.map((param) => renderSchemaType({
210587
210598
  node: param.schema,
210588
210599
  name: resolveName({
210589
- name: `${node.operationId} ${param.name}`,
210600
+ name: `${node.operationId} ${pascalCase$6(param.in)} ${param.name}`,
210590
210601
  type: "function"
210591
210602
  }),
210592
210603
  typedName: resolveName({
210593
- name: `${node.operationId} ${param.name}`,
210604
+ name: `${node.operationId} ${pascalCase$6(param.in)} ${param.name}`,
210594
210605
  type: "type"
210595
210606
  })
210596
210607
  }));
210597
210608
  const responseTypes = node.responses.filter((res) => res.schema).map((res) => renderSchemaType({
210598
210609
  node: res.schema,
210599
210610
  name: resolveName({
210600
- name: `${node.operationId} ${res.statusCode}`,
210611
+ name: `${node.operationId} Status ${res.statusCode}`,
210601
210612
  type: "function"
210602
210613
  }),
210603
210614
  typedName: resolveName({
210604
- name: `${node.operationId} ${res.statusCode}`,
210615
+ name: `${node.operationId} Status ${res.statusCode}`,
210605
210616
  type: "type"
210606
210617
  }),
210607
210618
  description: res.description
@@ -210609,11 +210620,11 @@ const typeGenerator = defineGenerator({
210609
210620
  const requestType = node.requestBody ? renderSchemaType({
210610
210621
  node: node.requestBody,
210611
210622
  name: resolveName({
210612
- name: `${node.operationId} MutationRequest`,
210623
+ name: `${node.operationId} Data`,
210613
210624
  type: "function"
210614
210625
  }),
210615
210626
  typedName: resolveName({
210616
- name: `${node.operationId} MutationRequest`,
210627
+ name: `${node.operationId} Data`,
210617
210628
  type: "type"
210618
210629
  }),
210619
210630
  description: node.requestBody.description
@@ -210627,11 +210638,11 @@ const typeGenerator = defineGenerator({
210627
210638
  resolveName
210628
210639
  }),
210629
210640
  name: resolveName({
210630
- name: `${node.operationId} Data`,
210641
+ name: `${node.operationId} RequestConfig`,
210631
210642
  type: "function"
210632
210643
  }),
210633
210644
  typedName: resolveName({
210634
- name: `${node.operationId} Data`,
210645
+ name: `${node.operationId} RequestConfig`,
210635
210646
  type: "type"
210636
210647
  })
210637
210648
  });
@@ -210661,7 +210672,8 @@ const typeGenerator = defineGenerator({
210661
210672
  typedName: resolveName({
210662
210673
  name: `${node.operationId} Response`,
210663
210674
  type: "type"
210664
- })
210675
+ }),
210676
+ description: "Union of all possible responses"
210665
210677
  });
210666
210678
  return /* @__PURE__ */ jsxs(File, {
210667
210679
  baseName: file.baseName,
@@ -210678,7 +210690,7 @@ const typeGenerator = defineGenerator({
210678
210690
  });
210679
210691
  },
210680
210692
  Schema({ node, adapter, options }) {
210681
- const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, mapper } = options;
210693
+ const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType } = options;
210682
210694
  const { mode, resolveName, getFile } = useKubb();
210683
210695
  if (!node.name) return;
210684
210696
  const imports = adapter.getImports(node, (schemaName) => ({
@@ -210697,7 +210709,7 @@ const typeGenerator = defineGenerator({
210697
210709
  name: node.name,
210698
210710
  type: "type"
210699
210711
  });
210700
- if (["asConst", "asPascalConst"].includes(enumType) && isEnumSchema) typedName += "Key";
210712
+ if (ENUM_TYPES_WITH_KEY_SUFFIX.has(enumType) && isEnumSchema) typedName += "Key";
210701
210713
  const type = {
210702
210714
  name: resolveName({
210703
210715
  name: node.name,
@@ -210731,8 +210743,7 @@ const typeGenerator = defineGenerator({
210731
210743
  enumKeyCasing,
210732
210744
  optionalType,
210733
210745
  arrayType,
210734
- syntaxType,
210735
- mapper
210746
+ syntaxType
210736
210747
  })]
210737
210748
  });
210738
210749
  }
@@ -210742,7 +210753,7 @@ const pluginTs = definePlugin((options) => {
210742
210753
  const { output = {
210743
210754
  path: "types",
210744
210755
  barrelType: "named"
210745
- }, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", enumSuffix = "enum", dateType = "string", integerType = "number", unknownType = "any", optionalType = "questionToken", arrayType = "array", emptySchemaType = unknownType, syntaxType = "type", transformers = {}, mapper = {}, paramsCasing, generators = [typeGenerator$1, typeGenerator].filter(Boolean), contentType, UNSTABLE_NAMING } = options;
210756
+ }, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", enumSuffix = "enum", dateType = "string", integerType = "number", unknownType = "any", optionalType = "questionToken", arrayType = "array", emptySchemaType = unknownType, syntaxType = "type", transformers = {}, paramsCasing, generators = [typeGenerator$1, typeGenerator].filter(Boolean), contentType, UNSTABLE_NAMING } = options;
210746
210757
  return {
210747
210758
  name: pluginTsName,
210748
210759
  options: {
@@ -210760,7 +210771,6 @@ const pluginTs = definePlugin((options) => {
210760
210771
  syntaxType,
210761
210772
  group,
210762
210773
  override,
210763
- mapper,
210764
210774
  paramsCasing,
210765
210775
  usedEnumNames: {}
210766
210776
  },
@@ -1 +1 @@
1
- {"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.5/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Pw3tLCiV.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-Cs-1vKOq.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-DxN9Dqyi.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-eECfXVou.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/components-Cwn1rflQ.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-kdQ5D2cW.js","../../../../../plugin-zod/dist/generators-CRKtFRi1.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-C2jT7XCH.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-BK_6GU4v.js","../../../../../plugin-cypress/dist/generators-BImGfp9Q.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BuATcfwD.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-BFPqVSmg.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-Cs46KGm7.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CpyHYGOw.js","../../../../../plugin-react-query/dist/generators-BZn1n6rK.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-BhStIi1M.js","../../../../../plugin-solid-query/dist/generators-5ZZQ5Oz3.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-DntKBsnB.js","../../../../../plugin-svelte-query/dist/generators-BjJF5K9h.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-D0W2bxXt.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-_AMBl0g-.js","../../../../../plugin-vue-query/dist/generators-BzA136hL.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","nodes","toCamelOrPascal","applyToFileParts","camelCase","isValidVarName","applyParamsCasing","path","readFile","writeFile","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","extname","x","performance","build","readdir","version","_c","_d","_e","_f","_g","os","item","trimExtName","error","__defProp","__name","pascalCase","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","propertyName","applyParamsCasing$1","barrelFiles","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,55,108,109,110,111]}
1
+ {"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.5/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Pw3tLCiV.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-Cs-1vKOq.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-DxN9Dqyi.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-eECfXVou.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/components-CRu8IKY3.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-BcK4SBA0.js","../../../../../plugin-zod/dist/generators-CRKtFRi1.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-C2jT7XCH.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-BK_6GU4v.js","../../../../../plugin-cypress/dist/generators-BImGfp9Q.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BuATcfwD.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-BFPqVSmg.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-Cs46KGm7.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CpyHYGOw.js","../../../../../plugin-react-query/dist/generators-BZn1n6rK.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-BhStIi1M.js","../../../../../plugin-solid-query/dist/generators-5ZZQ5Oz3.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-DntKBsnB.js","../../../../../plugin-svelte-query/dist/generators-BjJF5K9h.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-D0W2bxXt.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-_AMBl0g-.js","../../../../../plugin-vue-query/dist/generators-BzA136hL.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","toCamelOrPascal","applyToFileParts","camelCase","isValidVarName","applyParamsCasing","path","readFile","writeFile","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","extname","x","performance","build","readdir","version","_c","_d","_e","_f","_g","os","item","trimExtName","error","__defProp","__name","pascalCase","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","propertyName","applyParamsCasing$1","node","barrelFiles","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,55,108,109,110,111]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-core",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "types": "lib/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent-prod",
3
- "version": "5.0.0-alpha.5",
3
+ "version": "5.0.0-alpha.6",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -25,7 +25,7 @@
25
25
  "@readme/postman-to-openapi": "4.1.0",
26
26
  "@redocly/ajv": "8.18.0",
27
27
  "@redocly/config": "0.44.1",
28
- "@redocly/openapi-core": "2.23.0",
28
+ "@redocly/openapi-core": "2.24.0",
29
29
  "@stoplight/ordered-object-literal": "1.0.5",
30
30
  "@stoplight/types": "14.1.1",
31
31
  "@stoplight/yaml": "4.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent",
3
- "version": "5.0.0-alpha.5",
3
+ "version": "5.0.0-alpha.6",
4
4
  "description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
5
5
  "keywords": [
6
6
  "agent",
@@ -40,21 +40,21 @@
40
40
  "tinyexec": "^1.0.4",
41
41
  "unstorage": "^1.17.4",
42
42
  "ws": "^8.19.0",
43
- "@kubb/core": "5.0.0-alpha.5",
44
- "@kubb/plugin-client": "5.0.0-alpha.5",
45
- "@kubb/plugin-cypress": "5.0.0-alpha.5",
46
- "@kubb/plugin-faker": "5.0.0-alpha.5",
47
- "@kubb/plugin-mcp": "5.0.0-alpha.5",
48
- "@kubb/plugin-msw": "5.0.0-alpha.5",
49
- "@kubb/plugin-oas": "5.0.0-alpha.5",
50
- "@kubb/plugin-react-query": "5.0.0-alpha.5",
51
- "@kubb/plugin-redoc": "5.0.0-alpha.5",
52
- "@kubb/plugin-solid-query": "5.0.0-alpha.5",
53
- "@kubb/plugin-svelte-query": "5.0.0-alpha.5",
54
- "@kubb/plugin-swr": "5.0.0-alpha.5",
55
- "@kubb/plugin-ts": "5.0.0-alpha.5",
56
- "@kubb/plugin-vue-query": "5.0.0-alpha.5",
57
- "@kubb/plugin-zod": "5.0.0-alpha.5"
43
+ "@kubb/core": "5.0.0-alpha.6",
44
+ "@kubb/plugin-client": "5.0.0-alpha.6",
45
+ "@kubb/plugin-cypress": "5.0.0-alpha.6",
46
+ "@kubb/plugin-faker": "5.0.0-alpha.6",
47
+ "@kubb/plugin-mcp": "5.0.0-alpha.6",
48
+ "@kubb/plugin-msw": "5.0.0-alpha.6",
49
+ "@kubb/plugin-oas": "5.0.0-alpha.6",
50
+ "@kubb/plugin-react-query": "5.0.0-alpha.6",
51
+ "@kubb/plugin-redoc": "5.0.0-alpha.6",
52
+ "@kubb/plugin-solid-query": "5.0.0-alpha.6",
53
+ "@kubb/plugin-svelte-query": "5.0.0-alpha.6",
54
+ "@kubb/plugin-swr": "5.0.0-alpha.6",
55
+ "@kubb/plugin-ts": "5.0.0-alpha.6",
56
+ "@kubb/plugin-vue-query": "5.0.0-alpha.6",
57
+ "@kubb/plugin-zod": "5.0.0-alpha.6"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/ws": "^8.18.1",