@kubb/agent 5.0.0-beta.27 → 5.0.0-beta.29

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-05-23T08:43:46.770Z",
2
+ "date": "2026-05-24T14:22:38.989Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -4768,12 +4768,14 @@ function* getChildren(node, recurse) {
4768
4768
  return;
4769
4769
  }
4770
4770
  if (node.kind === "Response") {
4771
- if (node.schema) yield node.schema;
4771
+ if (node.content) {
4772
+ for (const c of node.content) if (c.schema) yield c.schema;
4773
+ }
4772
4774
  return;
4773
4775
  }
4774
4776
  }
4775
4777
  function transform(node, options) {
4776
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
4778
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
4777
4779
  const { depth, parent, ...visitor } = options;
4778
4780
  const recurse = (depth != null ? depth : visitorDepths.deep) === visitorDepths.deep;
4779
4781
  if (node.kind === "Input") {
@@ -4853,10 +4855,13 @@ function transform(node, options) {
4853
4855
  const response = (_q = (_p = visitor.response) == null ? void 0 : _p.call(visitor, node, { parent })) != null ? _q : node;
4854
4856
  return {
4855
4857
  ...response,
4856
- schema: transform(response.schema, {
4857
- ...options,
4858
- parent: response
4859
- })
4858
+ content: (_r = response.content) == null ? void 0 : _r.map((entry) => ({
4859
+ ...entry,
4860
+ schema: entry.schema ? transform(entry.schema, {
4861
+ ...options,
4862
+ parent: response
4863
+ }) : entry.schema
4864
+ }))
4860
4865
  };
4861
4866
  }
4862
4867
  return node;
@@ -4975,6 +4980,14 @@ function combineImports(imports, exports, source) {
4975
4980
  if (!importNameMemo.has(key)) importNameMemo.set(key, n);
4976
4981
  return importNameMemo.get(key);
4977
4982
  };
4983
+ const pathsWithUsedNamedImport = /* @__PURE__ */ new Set();
4984
+ for (const node of imports) {
4985
+ if (!Array.isArray(node.name)) continue;
4986
+ if (node.name.some((item) => {
4987
+ var _a;
4988
+ return typeof item === "string" ? isUsed(item) : isUsed((_a = item.name) != null ? _a : item.propertyName);
4989
+ })) pathsWithUsedNamedImport.add(node.path);
4990
+ }
4978
4991
  const result = [];
4979
4992
  const namedByPath = /* @__PURE__ */ new Map();
4980
4993
  const seen = /* @__PURE__ */ new Set();
@@ -5008,7 +5021,7 @@ function combineImports(imports, exports, source) {
5008
5021
  namedByPath.set(key, newItem);
5009
5022
  }
5010
5023
  } else {
5011
- if (name && !isUsed(name)) continue;
5024
+ if (name && !isUsed(name) && !pathsWithUsedNamedImport.has(path2)) continue;
5012
5025
  const key = importKey(path2, name, isTypeOnly);
5013
5026
  if (!seen.has(key)) {
5014
5027
  result.push(curr);
@@ -5567,6 +5580,21 @@ function getMode(fileOrFolder) {
5567
5580
  if (!fileOrFolder) return "split";
5568
5581
  return extname(fileOrFolder) ? "single" : "split";
5569
5582
  }
5583
+ function buildBannerMeta({ meta, file }) {
5584
+ var _a2, _b2, _c2, _d2, _e, _f;
5585
+ return {
5586
+ title: meta == null ? void 0 : meta.title,
5587
+ description: meta == null ? void 0 : meta.description,
5588
+ version: meta == null ? void 0 : meta.version,
5589
+ baseURL: meta == null ? void 0 : meta.baseURL,
5590
+ circularNames: (_a2 = meta == null ? void 0 : meta.circularNames) != null ? _a2 : [],
5591
+ enumNames: (_b2 = meta == null ? void 0 : meta.enumNames) != null ? _b2 : [],
5592
+ filePath: (_c2 = file == null ? void 0 : file.path) != null ? _c2 : "",
5593
+ baseName: (_d2 = file == null ? void 0 : file.baseName) != null ? _d2 : "",
5594
+ isBarrel: (_e = file == null ? void 0 : file.isBarrel) != null ? _e : false,
5595
+ isAggregation: (_f = file == null ? void 0 : file.isAggregation) != null ? _f : false
5596
+ };
5597
+ }
5570
5598
  const stringPatternCache = /* @__PURE__ */ new Map();
5571
5599
  function testPattern(value, pattern) {
5572
5600
  if (typeof pattern === "string") {
@@ -5708,8 +5736,11 @@ function buildDefaultBanner({ title, description, version, config }) {
5708
5736
  return "/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/";
5709
5737
  }
5710
5738
  }
5711
- function defaultResolveBanner(meta, { output, config }) {
5712
- if (typeof (output == null ? void 0 : output.banner) === "function") return output.banner(meta);
5739
+ function defaultResolveBanner(meta, { output, config, file }) {
5740
+ if (typeof (output == null ? void 0 : output.banner) === "function") return output.banner(buildBannerMeta({
5741
+ meta,
5742
+ file
5743
+ }));
5713
5744
  if (typeof (output == null ? void 0 : output.banner) === "string") return output.banner;
5714
5745
  if (config.output.defaultBanner === false) return null;
5715
5746
  return buildDefaultBanner({
@@ -5718,8 +5749,11 @@ function defaultResolveBanner(meta, { output, config }) {
5718
5749
  config
5719
5750
  });
5720
5751
  }
5721
- function defaultResolveFooter(meta, { output }) {
5722
- if (typeof (output == null ? void 0 : output.footer) === "function") return output.footer(meta);
5752
+ function defaultResolveFooter(meta, { output, file }) {
5753
+ if (typeof (output == null ? void 0 : output.footer) === "function") return output.footer(buildBannerMeta({
5754
+ meta,
5755
+ file
5756
+ }));
5723
5757
  if (typeof (output == null ? void 0 : output.footer) === "string") return output.footer;
5724
5758
  return null;
5725
5759
  }
@@ -6819,7 +6853,7 @@ async function clean(path) {
6819
6853
  force: true
6820
6854
  });
6821
6855
  }
6822
- var version$1 = "5.0.0-beta.27";
6856
+ var version$1 = "5.0.0-beta.29";
6823
6857
  function createStorage(build) {
6824
6858
  return (options) => build(options != null ? options : {});
6825
6859
  }
@@ -7088,7 +7122,7 @@ const memoryStorage = createStorage(() => {
7088
7122
  };
7089
7123
  });
7090
7124
 
7091
- var version = "5.0.0-beta.27";
7125
+ var version = "5.0.0-beta.29";
7092
7126
 
7093
7127
  function isCommandMessage(msg) {
7094
7128
  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.4/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.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules-utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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/KubbDriver-BkwOamHp.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/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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","memoize","path","__publicField","__privateAdd","__privateGet","__privateMethod","batch","__privateSet","_b","_c","extname","r","e","n","o","files","duration","_d","readFile","writeFile","readdir","version","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,31,55,56,57,58]}
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.4/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.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules-utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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/KubbDriver-x86YM1Ia.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/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.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.4_rolldown@1.0.1/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","memoize","path","__publicField","__privateAdd","__privateGet","__privateMethod","batch","__privateSet","_b","_c","_d","extname","r","e","n","o","files","duration","readFile","writeFile","readdir","version","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,31,55,56,57,58]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent-prod",
3
- "version": "5.0.0-beta.27",
3
+ "version": "5.0.0-beta.29",
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-beta.27",
3
+ "version": "5.0.0-beta.29",
4
4
  "description": "HTTP agent server for Kubb. Exposes code generation via REST API and WebSocket with real-time Kubb Studio integration, machine binding, and Docker support.",
5
5
  "keywords": [
6
6
  "agent",
@@ -43,8 +43,8 @@
43
43
  "tinyexec": "^1.1.2",
44
44
  "unstorage": "^1.17.5",
45
45
  "ws": "^8.20.1",
46
- "@kubb/ast": "5.0.0-beta.27",
47
- "@kubb/core": "5.0.0-beta.27"
46
+ "@kubb/ast": "5.0.0-beta.29",
47
+ "@kubb/core": "5.0.0-beta.29"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/ws": "^8.18.1",
@@ -52,9 +52,9 @@
52
52
  "nitropack": "^2.13.4",
53
53
  "vite": "^8.0.13",
54
54
  "@internals/utils": "0.0.0",
55
- "@kubb/adapter-oas": "5.0.0-beta.27",
56
- "@kubb/parser-ts": "5.0.0-beta.27",
57
- "@kubb/renderer-jsx": "5.0.0-beta.27"
55
+ "@kubb/adapter-oas": "5.0.0-beta.29",
56
+ "@kubb/parser-ts": "5.0.0-beta.29",
57
+ "@kubb/renderer-jsx": "5.0.0-beta.29"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=22"