@kubb/agent 5.0.0-alpha.53 → 5.0.0-alpha.54

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-04-23T10:07:13.240Z",
2
+ "date": "2026-04-23T11:15:32.169Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -4894,7 +4894,7 @@ function createLimit(concurrency) {
4894
4894
  };
4895
4895
  }
4896
4896
  function getChildren(node, recurse) {
4897
- var _a;
4897
+ var _a, _b, _c;
4898
4898
  switch (node.kind) {
4899
4899
  case "Input":
4900
4900
  return [...node.schemas, ...node.operations];
@@ -4903,7 +4903,7 @@ function getChildren(node, recurse) {
4903
4903
  case "Operation":
4904
4904
  return [
4905
4905
  ...node.parameters,
4906
- ...((_a = node.requestBody) == null ? void 0 : _a.schema) ? [node.requestBody.schema] : [],
4906
+ ...(_c = (_b = (_a = node.requestBody) == null ? void 0 : _a.content) == null ? void 0 : _b.flatMap((c) => c.schema ? [c.schema] : [])) != null ? _c : [],
4907
4907
  ...node.responses
4908
4908
  ];
4909
4909
  case "Schema": {
@@ -4983,7 +4983,7 @@ async function _walk(node, visitor, recurse, limit, parent) {
4983
4983
  for (const child of children) await _walk(child, visitor, recurse, limit, node);
4984
4984
  }
4985
4985
  function transform(node, options) {
4986
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
4986
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4987
4987
  const { depth, parent, ...visitor } = options;
4988
4988
  const recurse = (depth != null ? depth : visitorDepths.deep) === visitorDepths.deep;
4989
4989
  switch (node.kind) {
@@ -5021,10 +5021,13 @@ function transform(node, options) {
5021
5021
  })),
5022
5022
  requestBody: op.requestBody ? {
5023
5023
  ...op.requestBody,
5024
- schema: op.requestBody.schema ? transform(op.requestBody.schema, {
5025
- ...options,
5026
- parent: op
5027
- }) : void 0
5024
+ content: (_d = op.requestBody.content) == null ? void 0 : _d.map((c) => ({
5025
+ ...c,
5026
+ schema: c.schema ? transform(c.schema, {
5027
+ ...options,
5028
+ parent: op
5029
+ }) : void 0
5030
+ }))
5028
5031
  } : void 0,
5029
5032
  responses: op.responses.map((r) => transform(r, {
5030
5033
  ...options,
@@ -5034,7 +5037,7 @@ function transform(node, options) {
5034
5037
  }
5035
5038
  case "Schema": {
5036
5039
  let schema = node;
5037
- const replaced = (_d = visitor.schema) == null ? void 0 : _d.call(visitor, schema, { parent });
5040
+ const replaced = (_e = visitor.schema) == null ? void 0 : _e.call(visitor, schema, { parent });
5038
5041
  if (replaced) schema = replaced;
5039
5042
  const childOptions = {
5040
5043
  ...options,
@@ -5043,14 +5046,14 @@ function transform(node, options) {
5043
5046
  return {
5044
5047
  ...schema,
5045
5048
  ..."properties" in schema && recurse ? { properties: schema.properties.map((p) => transform(p, childOptions)) } : {},
5046
- ..."items" in schema && recurse ? { items: (_e = schema.items) == null ? void 0 : _e.map((i) => transform(i, childOptions)) } : {},
5047
- ..."members" in schema && recurse ? { members: (_f = schema.members) == null ? void 0 : _f.map((m) => transform(m, childOptions)) } : {},
5049
+ ..."items" in schema && recurse ? { items: (_f = schema.items) == null ? void 0 : _f.map((i) => transform(i, childOptions)) } : {},
5050
+ ..."members" in schema && recurse ? { members: (_g = schema.members) == null ? void 0 : _g.map((m) => transform(m, childOptions)) } : {},
5048
5051
  ..."additionalProperties" in schema && recurse && schema.additionalProperties && schema.additionalProperties !== true ? { additionalProperties: transform(schema.additionalProperties, childOptions) } : {}
5049
5052
  };
5050
5053
  }
5051
5054
  case "Property": {
5052
5055
  let prop = node;
5053
- const replaced = (_g = visitor.property) == null ? void 0 : _g.call(visitor, prop, { parent });
5056
+ const replaced = (_h = visitor.property) == null ? void 0 : _h.call(visitor, prop, { parent });
5054
5057
  if (replaced) prop = replaced;
5055
5058
  return createProperty({
5056
5059
  ...prop,
@@ -5062,7 +5065,7 @@ function transform(node, options) {
5062
5065
  }
5063
5066
  case "Parameter": {
5064
5067
  let param = node;
5065
- const replaced = (_h = visitor.parameter) == null ? void 0 : _h.call(visitor, param, { parent });
5068
+ const replaced = (_i = visitor.parameter) == null ? void 0 : _i.call(visitor, param, { parent });
5066
5069
  if (replaced) param = replaced;
5067
5070
  return createParameter({
5068
5071
  ...param,
@@ -5074,7 +5077,7 @@ function transform(node, options) {
5074
5077
  }
5075
5078
  case "Response": {
5076
5079
  let response = node;
5077
- const replaced = (_i = visitor.response) == null ? void 0 : _i.call(visitor, response, { parent });
5080
+ const replaced = (_j = visitor.response) == null ? void 0 : _j.call(visitor, response, { parent });
5078
5081
  if (replaced) response = replaced;
5079
5082
  return {
5080
5083
  ...response,
@@ -5154,7 +5157,7 @@ function testPattern(value, pattern) {
5154
5157
  return value.match(pattern) !== null;
5155
5158
  }
5156
5159
  function matchesOperationPattern(node, type, pattern) {
5157
- var _a2;
5160
+ var _a2, _b2, _c;
5158
5161
  switch (type) {
5159
5162
  case "tag":
5160
5163
  return node.tags.some((tag) => testPattern(tag, pattern));
@@ -5165,7 +5168,7 @@ function matchesOperationPattern(node, type, pattern) {
5165
5168
  case "method":
5166
5169
  return testPattern(node.method.toLowerCase(), pattern);
5167
5170
  case "contentType":
5168
- return ((_a2 = node.requestBody) == null ? void 0 : _a2.contentType) ? testPattern(node.requestBody.contentType, pattern) : false;
5171
+ return (_c = (_b2 = (_a2 = node.requestBody) == null ? void 0 : _a2.content) == null ? void 0 : _b2.some((c) => testPattern(c.contentType, pattern))) != null ? _c : false;
5169
5172
  default:
5170
5173
  return false;
5171
5174
  }
@@ -6297,7 +6300,7 @@ const fsStorage = createStorage(() => ({
6297
6300
  await clean(resolve(base));
6298
6301
  }
6299
6302
  }));
6300
- var version$1 = "5.0.0-alpha.53";
6303
+ var version$1 = "5.0.0-alpha.54";
6301
6304
  function getDiagnosticInfo() {
6302
6305
  return {
6303
6306
  nodeVersion: version$2,
@@ -6979,7 +6982,7 @@ const memoryStorage = createStorage(() => {
6979
6982
  };
6980
6983
  });
6981
6984
 
6982
- var version = "5.0.0-alpha.53";
6985
+ var version = "5.0.0-alpha.54";
6983
6986
 
6984
6987
  function isCommandMessage(msg) {
6985
6988
  return msg.type === "command";
@@ -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.7/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.11/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.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../ast/dist/index.js","../../../../../core/dist/PluginDriver-ClKHvtnd.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","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/constants.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/utils/runtimeConfig.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","_inlineAppConfig","createRadixRouter","formatMs","resolve","_a","process","__defProp","trimExtName","path","exports","_b","extname","__privateAdd","__privateGet","__privateSet","__publicField","__privateMethod","readFile","writeFile","build","walk","readdir","version","item","_c","_d","_e","_f","error","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,56,57,58,59]}
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.7/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.11/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.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","../../../../../core/dist/chunk--u3MIqq1.js","../../../../../ast/dist/index.js","../../../../../core/dist/PluginDriver-BU7faPiI.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","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/constants.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/utils/runtimeConfig.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_rolldown@1.0.0-rc.16/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","normalizeKey","defineDriver","DRIVER_NAME","createStorage","fsPromises","PATH_TRAVERSE_RE","fsp","_inlineAppConfig","createRadixRouter","formatMs","resolve","_a","process","__defProp","trimExtName","path","exports","_b","extname","__privateAdd","__privateGet","__privateSet","__publicField","__privateMethod","readFile","writeFile","build","walk","readdir","version","item","_c","_d","_e","_f","error","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,56,57,58,59]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent-prod",
3
- "version": "5.0.0-alpha.53",
3
+ "version": "5.0.0-alpha.54",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent",
3
- "version": "5.0.0-alpha.53",
3
+ "version": "5.0.0-alpha.54",
4
4
  "description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
5
5
  "keywords": [
6
6
  "agent",
@@ -43,8 +43,8 @@
43
43
  "tinyexec": "^1.1.1",
44
44
  "unstorage": "^1.17.5",
45
45
  "ws": "^8.20.0",
46
- "@kubb/ast": "5.0.0-alpha.53",
47
- "@kubb/core": "5.0.0-alpha.53"
46
+ "@kubb/ast": "5.0.0-alpha.54",
47
+ "@kubb/core": "5.0.0-alpha.54"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/ws": "^8.18.1",
@@ -52,8 +52,8 @@
52
52
  "nitropack": "^2.13.3",
53
53
  "vite": "^8.0.9",
54
54
  "@internals/utils": "0.0.0",
55
- "@kubb/adapter-oas": "5.0.0-alpha.53",
56
- "@kubb/parser-ts": "5.0.0-alpha.53"
55
+ "@kubb/adapter-oas": "5.0.0-alpha.54",
56
+ "@kubb/parser-ts": "5.0.0-alpha.54"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"