@kubb/agent 4.35.1 → 4.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +125 -44
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +1 -1
- package/package.json +16 -16
package/.output/nitro.json
CHANGED
|
@@ -13,9 +13,8 @@ import { createHash, randomBytes } from 'node:crypto';
|
|
|
13
13
|
import process$1, { version as version$2 } from 'node:process';
|
|
14
14
|
import { Logtail } from '@logtail/node';
|
|
15
15
|
import { consola } from 'consola';
|
|
16
|
-
import { styleText } from 'node:util';
|
|
17
16
|
import mod from 'node:module';
|
|
18
|
-
import { access, rm, readFile as readFile$1, mkdir, writeFile as writeFile$1 } from 'node:fs/promises';
|
|
17
|
+
import { access, rm, readFile as readFile$1, readdir as readdir$1, mkdir, writeFile as writeFile$1 } from 'node:fs/promises';
|
|
19
18
|
import { createFabric, createReactFabric, App, File, Function as Function$1, Const, FunctionParams, Type as Type$1, useApp } from '@kubb/react-fabric';
|
|
20
19
|
import { typescriptParser } from '@kubb/react-fabric/parsers';
|
|
21
20
|
import { fsPlugin } from '@kubb/react-fabric/plugins';
|
|
@@ -27,6 +26,7 @@ import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
|
27
26
|
import * as pkg from 'empathic/package';
|
|
28
27
|
import { coerce, satisfies } from 'semver';
|
|
29
28
|
import { sortBy, isFunction, mergeDeep, isPlainObject as isPlainObject$1, uniqueWith, isDeepEqual, isNumber, difference } from 'remeda';
|
|
29
|
+
import { styleText } from 'node:util';
|
|
30
30
|
import { createJiti } from 'jiti';
|
|
31
31
|
import jsonpointer from 'jsonpointer';
|
|
32
32
|
import BaseOas from 'oas';
|
|
@@ -4650,39 +4650,6 @@ async function disconnect({ sessionId, token, studioUrl }) {
|
|
|
4650
4650
|
}
|
|
4651
4651
|
}
|
|
4652
4652
|
|
|
4653
|
-
var version = "4.35.1";
|
|
4654
|
-
|
|
4655
|
-
function isCommandMessage(msg) {
|
|
4656
|
-
return msg.type === "command";
|
|
4657
|
-
}
|
|
4658
|
-
function isPongMessage(msg) {
|
|
4659
|
-
return msg.type === "pong";
|
|
4660
|
-
}
|
|
4661
|
-
function isDisconnectMessage(msg) {
|
|
4662
|
-
return msg.type === "disconnect";
|
|
4663
|
-
}
|
|
4664
|
-
function isPublishCommandMessage(msg) {
|
|
4665
|
-
return msg.type === "command" && msg.command === "publish";
|
|
4666
|
-
}
|
|
4667
|
-
|
|
4668
|
-
function getStorage() {
|
|
4669
|
-
return useStorage("kubb");
|
|
4670
|
-
}
|
|
4671
|
-
async function saveStudioConfigToStorage({ sessionId, config }) {
|
|
4672
|
-
var _a;
|
|
4673
|
-
const storage = getStorage();
|
|
4674
|
-
const key = `configs:${sessionId}`;
|
|
4675
|
-
const existing = (_a = await storage.getItem(key)) != null ? _a : [];
|
|
4676
|
-
await storage.setItem(key, [...existing, { config, storedAt: (/* @__PURE__ */ new Date()).toISOString() }]);
|
|
4677
|
-
}
|
|
4678
|
-
async function getLatestStudioConfigFromStorage({ sessionId }) {
|
|
4679
|
-
const storage = getStorage();
|
|
4680
|
-
const key = `configs:${sessionId}`;
|
|
4681
|
-
const existing = await storage.getItem(key);
|
|
4682
|
-
if (!(existing == null ? void 0 : existing.length)) return null;
|
|
4683
|
-
return existing[existing.length - 1].config;
|
|
4684
|
-
}
|
|
4685
|
-
|
|
4686
4653
|
const visitorDepths = {
|
|
4687
4654
|
deep: "deep"
|
|
4688
4655
|
};
|
|
@@ -5805,7 +5772,56 @@ executeSync_fn = function({ strategy, hookName, parameters, plugin }) {
|
|
|
5805
5772
|
key: [plugin.name, usedPluginNames[plugin.name]].filter(Boolean)
|
|
5806
5773
|
};
|
|
5807
5774
|
}, _e);
|
|
5808
|
-
|
|
5775
|
+
function defineStorage(build2) {
|
|
5776
|
+
return (options) => build2(options != null ? options : {});
|
|
5777
|
+
}
|
|
5778
|
+
const fsStorage = defineStorage(() => ({
|
|
5779
|
+
name: "fs",
|
|
5780
|
+
async hasItem(key) {
|
|
5781
|
+
try {
|
|
5782
|
+
await access(resolve(key));
|
|
5783
|
+
return true;
|
|
5784
|
+
} catch {
|
|
5785
|
+
return false;
|
|
5786
|
+
}
|
|
5787
|
+
},
|
|
5788
|
+
async getItem(key) {
|
|
5789
|
+
try {
|
|
5790
|
+
return await readFile$1(resolve(key), "utf8");
|
|
5791
|
+
} catch {
|
|
5792
|
+
return null;
|
|
5793
|
+
}
|
|
5794
|
+
},
|
|
5795
|
+
async setItem(key, value) {
|
|
5796
|
+
await write(resolve(key), value, { sanity: false });
|
|
5797
|
+
},
|
|
5798
|
+
async removeItem(key) {
|
|
5799
|
+
await rm(resolve(key), { force: true });
|
|
5800
|
+
},
|
|
5801
|
+
async getKeys(base) {
|
|
5802
|
+
const keys = [];
|
|
5803
|
+
async function walk(dir, prefix) {
|
|
5804
|
+
let entries;
|
|
5805
|
+
try {
|
|
5806
|
+
entries = await readdir$1(dir, { withFileTypes: true });
|
|
5807
|
+
} catch {
|
|
5808
|
+
return;
|
|
5809
|
+
}
|
|
5810
|
+
for (const entry of entries) {
|
|
5811
|
+
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
5812
|
+
if (entry.isDirectory()) await walk(join(dir, entry.name), rel);
|
|
5813
|
+
else keys.push(rel);
|
|
5814
|
+
}
|
|
5815
|
+
}
|
|
5816
|
+
await walk(resolve(base != null ? base : process.cwd()), "");
|
|
5817
|
+
return keys;
|
|
5818
|
+
},
|
|
5819
|
+
async clear(base) {
|
|
5820
|
+
if (!base) return;
|
|
5821
|
+
await clean(resolve(base));
|
|
5822
|
+
}
|
|
5823
|
+
}));
|
|
5824
|
+
var version$1 = "4.36.0";
|
|
5809
5825
|
function getDiagnosticInfo() {
|
|
5810
5826
|
return {
|
|
5811
5827
|
nodeVersion: version$2,
|
|
@@ -5816,7 +5832,7 @@ function getDiagnosticInfo() {
|
|
|
5816
5832
|
};
|
|
5817
5833
|
}
|
|
5818
5834
|
async function setup(options) {
|
|
5819
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
5835
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
5820
5836
|
const { config: userConfig, events = new AsyncEventEmitter() } = options;
|
|
5821
5837
|
const sources = /* @__PURE__ */ new Map();
|
|
5822
5838
|
const diagnosticInfo = getDiagnosticInfo();
|
|
@@ -5830,9 +5846,9 @@ async function setup(options) {
|
|
|
5830
5846
|
` \u2022 Output: ${((_a2 = userConfig.output) == null ? void 0 : _a2.path) || "not specified"}`,
|
|
5831
5847
|
` \u2022 Plugins: ${((_b2 = userConfig.plugins) == null ? void 0 : _b2.length) || 0}`,
|
|
5832
5848
|
"Output Settings:",
|
|
5833
|
-
` \u2022
|
|
5834
|
-
` \u2022 Formatter: ${((
|
|
5835
|
-
` \u2022 Linter: ${((
|
|
5849
|
+
` \u2022 Storage: ${((_c2 = userConfig.output) == null ? void 0 : _c2.storage) ? `custom(${userConfig.output.storage.name})` : ((_d2 = userConfig.output) == null ? void 0 : _d2.write) === false ? "disabled" : "filesystem (default)"}`,
|
|
5850
|
+
` \u2022 Formatter: ${((_e2 = userConfig.output) == null ? void 0 : _e2.format) || "none"}`,
|
|
5851
|
+
` \u2022 Linter: ${((_f2 = userConfig.output) == null ? void 0 : _f2.lint) || "none"}`,
|
|
5836
5852
|
"Environment:",
|
|
5837
5853
|
Object.entries(diagnosticInfo).map(([key, value]) => ` \u2022 ${key}: ${value}`).join("\n")
|
|
5838
5854
|
]
|
|
@@ -5867,12 +5883,13 @@ async function setup(options) {
|
|
|
5867
5883
|
} : void 0,
|
|
5868
5884
|
plugins: userConfig.plugins
|
|
5869
5885
|
};
|
|
5886
|
+
const storage = definedConfig.output.write === false ? null : (_g2 = definedConfig.output.storage) != null ? _g2 : fsStorage();
|
|
5870
5887
|
if (definedConfig.output.clean) {
|
|
5871
5888
|
await events.emit("debug", {
|
|
5872
5889
|
date: /* @__PURE__ */ new Date(),
|
|
5873
5890
|
logs: ["Cleaning output directories", ` \u2022 Output: ${definedConfig.output.path}`]
|
|
5874
5891
|
});
|
|
5875
|
-
await
|
|
5892
|
+
await (storage == null ? void 0 : storage.clear(resolve(definedConfig.root, definedConfig.output.path)));
|
|
5876
5893
|
}
|
|
5877
5894
|
const fabric = createFabric();
|
|
5878
5895
|
fabric.use(fsPlugin);
|
|
@@ -5892,7 +5909,8 @@ async function setup(options) {
|
|
|
5892
5909
|
source
|
|
5893
5910
|
});
|
|
5894
5911
|
if (source) {
|
|
5895
|
-
|
|
5912
|
+
const key = relative(resolve(definedConfig.root), file.path);
|
|
5913
|
+
await (storage == null ? void 0 : storage.setItem(key, source));
|
|
5896
5914
|
sources.set(file.path, source);
|
|
5897
5915
|
}
|
|
5898
5916
|
});
|
|
@@ -5907,7 +5925,7 @@ async function setup(options) {
|
|
|
5907
5925
|
date: /* @__PURE__ */ new Date(),
|
|
5908
5926
|
logs: [
|
|
5909
5927
|
"\u2713 Fabric initialized",
|
|
5910
|
-
` \u2022
|
|
5928
|
+
` \u2022 Storage: ${storage ? storage.name : "disabled (dry-run)"}`,
|
|
5911
5929
|
` \u2022 Barrel type: ${definedConfig.output.barrelType || "none"}`
|
|
5912
5930
|
]
|
|
5913
5931
|
});
|
|
@@ -6174,6 +6192,36 @@ var PackageManager = (_f = class {
|
|
|
6174
6192
|
const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
|
|
6175
6193
|
return matchedDependency ? dependencies[matchedDependency] : void 0;
|
|
6176
6194
|
}, __privateAdd$c(_f, _cache, {}), _f);
|
|
6195
|
+
const memoryStorage = defineStorage(() => {
|
|
6196
|
+
const store = /* @__PURE__ */ new Map();
|
|
6197
|
+
return {
|
|
6198
|
+
name: "memory",
|
|
6199
|
+
async hasItem(key) {
|
|
6200
|
+
return store.has(key);
|
|
6201
|
+
},
|
|
6202
|
+
async getItem(key) {
|
|
6203
|
+
var _a2;
|
|
6204
|
+
return (_a2 = store.get(key)) != null ? _a2 : null;
|
|
6205
|
+
},
|
|
6206
|
+
async setItem(key, value) {
|
|
6207
|
+
store.set(key, value);
|
|
6208
|
+
},
|
|
6209
|
+
async removeItem(key) {
|
|
6210
|
+
store.delete(key);
|
|
6211
|
+
},
|
|
6212
|
+
async getKeys(base) {
|
|
6213
|
+
const keys = [...store.keys()];
|
|
6214
|
+
return base ? keys.filter((k) => k.startsWith(base)) : keys;
|
|
6215
|
+
},
|
|
6216
|
+
async clear(base) {
|
|
6217
|
+
if (!base) {
|
|
6218
|
+
store.clear();
|
|
6219
|
+
return;
|
|
6220
|
+
}
|
|
6221
|
+
for (const key of store.keys()) if (key.startsWith(base)) store.delete(key);
|
|
6222
|
+
}
|
|
6223
|
+
};
|
|
6224
|
+
});
|
|
6177
6225
|
(_g = class {
|
|
6178
6226
|
constructor() {
|
|
6179
6227
|
__privateAdd$c(this, _items, []);
|
|
@@ -6507,6 +6555,39 @@ async function detectLinter() {
|
|
|
6507
6555
|
]) if (await isLinterAvailable(linter)) return linter;
|
|
6508
6556
|
}
|
|
6509
6557
|
|
|
6558
|
+
var version = "4.36.0";
|
|
6559
|
+
|
|
6560
|
+
function isCommandMessage(msg) {
|
|
6561
|
+
return msg.type === "command";
|
|
6562
|
+
}
|
|
6563
|
+
function isPongMessage(msg) {
|
|
6564
|
+
return msg.type === "pong";
|
|
6565
|
+
}
|
|
6566
|
+
function isDisconnectMessage(msg) {
|
|
6567
|
+
return msg.type === "disconnect";
|
|
6568
|
+
}
|
|
6569
|
+
function isPublishCommandMessage(msg) {
|
|
6570
|
+
return msg.type === "command" && msg.command === "publish";
|
|
6571
|
+
}
|
|
6572
|
+
|
|
6573
|
+
function getStorage() {
|
|
6574
|
+
return useStorage("kubb");
|
|
6575
|
+
}
|
|
6576
|
+
async function saveStudioConfigToStorage({ sessionId, config }) {
|
|
6577
|
+
var _a;
|
|
6578
|
+
const storage = getStorage();
|
|
6579
|
+
const key = `configs:${sessionId}`;
|
|
6580
|
+
const existing = (_a = await storage.getItem(key)) != null ? _a : [];
|
|
6581
|
+
await storage.setItem(key, [...existing, { config, storedAt: (/* @__PURE__ */ new Date()).toISOString() }]);
|
|
6582
|
+
}
|
|
6583
|
+
async function getLatestStudioConfigFromStorage({ sessionId }) {
|
|
6584
|
+
const storage = getStorage();
|
|
6585
|
+
const key = `configs:${sessionId}`;
|
|
6586
|
+
const existing = await storage.getItem(key);
|
|
6587
|
+
if (!(existing == null ? void 0 : existing.length)) return null;
|
|
6588
|
+
return existing[existing.length - 1].config;
|
|
6589
|
+
}
|
|
6590
|
+
|
|
6510
6591
|
async function executeHooks({ hooks, events }) {
|
|
6511
6592
|
const commands = Array.isArray(hooks.done) ? hooks.done : [hooks.done].filter(Boolean);
|
|
6512
6593
|
for (const command of commands) {
|
|
@@ -221825,7 +221906,7 @@ async function connectToStudio(options) {
|
|
|
221825
221906
|
...config,
|
|
221826
221907
|
root,
|
|
221827
221908
|
input: inputOverride != null ? inputOverride : config.input,
|
|
221828
|
-
output: { ...config.output,
|
|
221909
|
+
output: { ...config.output, storage: effectiveWrite ? fsStorage() : memoryStorage() },
|
|
221829
221910
|
plugins
|
|
221830
221911
|
},
|
|
221831
221912
|
events
|
|
@@ -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","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../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-mUXoBwsu.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-D7C3CXsN.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-LmqJfxMv.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-DnKRpgGK.js","../../../../../plugin-zod/dist/generators-D1R6NNf2.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-DCnIY6RB.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-D5YFtyyC.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BztogaeO.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-80MDR6tQ.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-C34kqa1L.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-CpiBv5eE.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-CQClzsST.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-BtTsGGrM.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-ClWZJ-YG.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-Zb1s5Wmb.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","path","readFile","writeFile","isValidVarName","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","x","performance","version","_c","_d","_e","build","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","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-mUXoBwsu.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-D7C3CXsN.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-LmqJfxMv.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-DnKRpgGK.js","../../../../../plugin-zod/dist/generators-D1R6NNf2.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-DCnIY6RB.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-D5YFtyyC.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BztogaeO.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-80MDR6tQ.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-C34kqa1L.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-CpiBv5eE.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-CQClzsST.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-BtTsGGrM.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-ClWZJ-YG.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-Zb1s5Wmb.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","path","readFile","writeFile","isValidVarName","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","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","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]}
|
|
@@ -14,7 +14,6 @@ import 'node:crypto';
|
|
|
14
14
|
import 'node:process';
|
|
15
15
|
import '@logtail/node';
|
|
16
16
|
import 'consola';
|
|
17
|
-
import 'node:util';
|
|
18
17
|
import 'node:module';
|
|
19
18
|
import 'node:fs/promises';
|
|
20
19
|
import '@kubb/react-fabric';
|
|
@@ -28,6 +27,7 @@ import 'node:url';
|
|
|
28
27
|
import 'empathic/package';
|
|
29
28
|
import 'semver';
|
|
30
29
|
import 'remeda';
|
|
30
|
+
import 'node:util';
|
|
31
31
|
import 'jiti';
|
|
32
32
|
import 'jsonpointer';
|
|
33
33
|
import 'oas';
|
package/.output/server/index.mjs
CHANGED
|
@@ -14,7 +14,6 @@ import 'node:crypto';
|
|
|
14
14
|
import 'node:process';
|
|
15
15
|
import '@logtail/node';
|
|
16
16
|
import 'consola';
|
|
17
|
-
import 'node:util';
|
|
18
17
|
import 'node:module';
|
|
19
18
|
import 'node:fs/promises';
|
|
20
19
|
import '@kubb/react-fabric';
|
|
@@ -28,6 +27,7 @@ import 'node:url';
|
|
|
28
27
|
import 'empathic/package';
|
|
29
28
|
import 'semver';
|
|
30
29
|
import 'remeda';
|
|
30
|
+
import 'node:util';
|
|
31
31
|
import 'jiti';
|
|
32
32
|
import 'jsonpointer';
|
|
33
33
|
import 'oas';
|
package/README.md
CHANGED
|
@@ -262,7 +262,7 @@ The `payload` may also include an `input` field containing a raw OpenAPI / Swagg
|
|
|
262
262
|
|
|
263
263
|
When Kubb Studio provisions a session for the **Sandbox Agent** (the shared agent hosted by Studio itself), it sets `isSandbox: true` in the session response. In sandbox mode the agent behaves differently from a user-owned agent:
|
|
264
264
|
|
|
265
|
-
|
|
|
265
|
+
| behavior | Normal agent | Sandbox agent |
|
|
266
266
|
|---|---|---|
|
|
267
267
|
| Write generated files to disk | ✅ (when `KUBB_AGENT_ALLOW_WRITE=true`) | ❌ Never |
|
|
268
268
|
| Read `input.path` from disk | ✅ | ✅ (falls back when no inline input supplied) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.36.0",
|
|
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": "4.
|
|
44
|
-
"@kubb/plugin-client": "4.
|
|
45
|
-
"@kubb/plugin-cypress": "4.
|
|
46
|
-
"@kubb/plugin-faker": "4.
|
|
47
|
-
"@kubb/plugin-mcp": "4.
|
|
48
|
-
"@kubb/plugin-msw": "4.
|
|
49
|
-
"@kubb/plugin-oas": "4.
|
|
50
|
-
"@kubb/plugin-react-query": "4.
|
|
51
|
-
"@kubb/plugin-redoc": "4.
|
|
52
|
-
"@kubb/plugin-solid-query": "4.
|
|
53
|
-
"@kubb/plugin-svelte-query": "4.
|
|
54
|
-
"@kubb/plugin-swr": "4.
|
|
55
|
-
"@kubb/plugin-ts": "4.
|
|
56
|
-
"@kubb/plugin-vue-query": "4.
|
|
57
|
-
"@kubb/plugin-zod": "4.
|
|
43
|
+
"@kubb/core": "4.36.0",
|
|
44
|
+
"@kubb/plugin-client": "4.36.0",
|
|
45
|
+
"@kubb/plugin-cypress": "4.36.0",
|
|
46
|
+
"@kubb/plugin-faker": "4.36.0",
|
|
47
|
+
"@kubb/plugin-mcp": "4.36.0",
|
|
48
|
+
"@kubb/plugin-msw": "4.36.0",
|
|
49
|
+
"@kubb/plugin-oas": "4.36.0",
|
|
50
|
+
"@kubb/plugin-react-query": "4.36.0",
|
|
51
|
+
"@kubb/plugin-redoc": "4.36.0",
|
|
52
|
+
"@kubb/plugin-solid-query": "4.36.0",
|
|
53
|
+
"@kubb/plugin-svelte-query": "4.36.0",
|
|
54
|
+
"@kubb/plugin-swr": "4.36.0",
|
|
55
|
+
"@kubb/plugin-ts": "4.36.0",
|
|
56
|
+
"@kubb/plugin-vue-query": "4.36.0",
|
|
57
|
+
"@kubb/plugin-zod": "4.36.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/ws": "^8.18.1",
|