@kubb/agent 4.26.1 → 4.27.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
CHANGED
|
@@ -5654,7 +5654,7 @@ var _b, _cache, _cwd, _SLASHES, _PackageManager_instances, match_fn;
|
|
|
5654
5654
|
function isInputPath(config) {
|
|
5655
5655
|
return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
|
|
5656
5656
|
}
|
|
5657
|
-
var version$1 = "4.
|
|
5657
|
+
var version$1 = "4.27.0";
|
|
5658
5658
|
function getDiagnosticInfo() {
|
|
5659
5659
|
return {
|
|
5660
5660
|
nodeVersion: version$2,
|
|
@@ -5720,7 +5720,7 @@ async function setup(options) {
|
|
|
5720
5720
|
await clean(definedConfig.output.path);
|
|
5721
5721
|
}
|
|
5722
5722
|
const fabric = createFabric();
|
|
5723
|
-
fabric.use(fsPlugin
|
|
5723
|
+
fabric.use(fsPlugin);
|
|
5724
5724
|
fabric.use(typescriptParser);
|
|
5725
5725
|
fabric.context.on("files:processing:start", (files) => {
|
|
5726
5726
|
events.emit("files:processing:start", files);
|
|
@@ -5737,7 +5737,7 @@ async function setup(options) {
|
|
|
5737
5737
|
source
|
|
5738
5738
|
});
|
|
5739
5739
|
if (source) {
|
|
5740
|
-
await write(file.path, source, { sanity: false });
|
|
5740
|
+
if (definedConfig.output.write) await write(file.path, source, { sanity: false });
|
|
5741
5741
|
sources.set(file.path, source);
|
|
5742
5742
|
}
|
|
5743
5743
|
});
|
|
@@ -6291,6 +6291,43 @@ async function getCosmiConfig(configPath) {
|
|
|
6291
6291
|
}
|
|
6292
6292
|
}
|
|
6293
6293
|
|
|
6294
|
+
function getFactoryName(packageName) {
|
|
6295
|
+
const match = packageName.match(/\/plugin-(.+)$/);
|
|
6296
|
+
if (!match) {
|
|
6297
|
+
return packageName;
|
|
6298
|
+
}
|
|
6299
|
+
return `plugin-${match[1]}`.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
6300
|
+
}
|
|
6301
|
+
async function resolvePlugins(plugins) {
|
|
6302
|
+
return Promise.all(
|
|
6303
|
+
plugins.map(async ({ name, options }) => {
|
|
6304
|
+
const mod = await import(name);
|
|
6305
|
+
const factoryName = getFactoryName(name);
|
|
6306
|
+
const factory = mod[factoryName];
|
|
6307
|
+
if (typeof factory !== "function") {
|
|
6308
|
+
throw new Error(`Plugin factory "${factoryName}" not found in package "${name}"`);
|
|
6309
|
+
}
|
|
6310
|
+
return factory(options != null ? options : {});
|
|
6311
|
+
})
|
|
6312
|
+
);
|
|
6313
|
+
}
|
|
6314
|
+
|
|
6315
|
+
function readStudioConfig(configPath) {
|
|
6316
|
+
const studioConfigPath = path$1.join(path$1.dirname(configPath), "kubb.config.studio.json");
|
|
6317
|
+
if (!existsSync(studioConfigPath)) {
|
|
6318
|
+
return null;
|
|
6319
|
+
}
|
|
6320
|
+
try {
|
|
6321
|
+
return JSON.parse(readFileSync(studioConfigPath, "utf-8"));
|
|
6322
|
+
} catch {
|
|
6323
|
+
return null;
|
|
6324
|
+
}
|
|
6325
|
+
}
|
|
6326
|
+
function writeStudioConfig(configPath, config) {
|
|
6327
|
+
const studioConfigPath = path$1.join(path$1.dirname(configPath), "kubb.config.studio.json");
|
|
6328
|
+
writeFileSync(studioConfigPath, JSON.stringify(config, null, 2), "utf-8");
|
|
6329
|
+
}
|
|
6330
|
+
|
|
6294
6331
|
const WEBSOCKET_READY = 1;
|
|
6295
6332
|
const WEBSOCKET_CONNECTING = 0;
|
|
6296
6333
|
function createWebsocket(url, options) {
|
|
@@ -6420,7 +6457,7 @@ function setupEventsStream(ws, events) {
|
|
|
6420
6457
|
});
|
|
6421
6458
|
}
|
|
6422
6459
|
|
|
6423
|
-
var version = "4.
|
|
6460
|
+
var version = "4.27.0";
|
|
6424
6461
|
|
|
6425
6462
|
const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nitro) => {
|
|
6426
6463
|
const studioUrl = process$1.env.KUBB_STUDIO_URL || "https://studio.kubb.dev";
|
|
@@ -6428,11 +6465,15 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
6428
6465
|
const configPath = process$1.env.KUBB_CONFIG || "kubb.config.ts";
|
|
6429
6466
|
const noCache = process$1.env.KUBB_AGENT_NO_CACHE === "true";
|
|
6430
6467
|
const retryInterval = process$1.env.KUBB_RETRY_TIMEOUT ? Number.parseInt(process$1.env.KUBB_RETRY_TIMEOUT, 10) : 3e4;
|
|
6468
|
+
const root = process$1.env.KUBB_ROOT || process$1.cwd();
|
|
6469
|
+
const allowAll = process$1.env.KUBB_ALLOW_ALL === "true";
|
|
6470
|
+
const allowWrite = allowAll || process$1.env.KUBB_ALLOW_WRITE === "true";
|
|
6431
6471
|
if (!token) {
|
|
6432
6472
|
logger.warn("KUBB_AGENT_TOKEN not set", "cannot authenticate with studio");
|
|
6433
6473
|
return null;
|
|
6434
6474
|
}
|
|
6435
|
-
const
|
|
6475
|
+
const resolvedConfigPath = path$1.isAbsolute(configPath) ? configPath : path$1.resolve(root, configPath);
|
|
6476
|
+
const result = await getCosmiConfig(resolvedConfigPath);
|
|
6436
6477
|
const configs = await getConfigs(result.config, {});
|
|
6437
6478
|
if (configs.length === 0) {
|
|
6438
6479
|
throw new Error("No configs found");
|
|
@@ -6444,7 +6485,6 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
6444
6485
|
Authorization: `Bearer ${token}`
|
|
6445
6486
|
}
|
|
6446
6487
|
};
|
|
6447
|
-
const root = process$1.env.KUBB_ROOT || config.root || process$1.cwd();
|
|
6448
6488
|
events.on("hook:start", async ({ id, command, args }) => {
|
|
6449
6489
|
const commandWithArgs = (args == null ? void 0 : args.length) ? `${command} ${args.join(" ")}` : command;
|
|
6450
6490
|
if (!id) {
|
|
@@ -6532,57 +6572,56 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
6532
6572
|
}, 3e4);
|
|
6533
6573
|
setupEventsStream(ws, events);
|
|
6534
6574
|
ws.addEventListener("message", async (message) => {
|
|
6535
|
-
var _a;
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
if (data
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
events
|
|
6545
|
-
});
|
|
6546
|
-
logger.success("Generated command success");
|
|
6547
|
-
}
|
|
6548
|
-
if (data.command === "connect") {
|
|
6549
|
-
let specContent;
|
|
6550
|
-
if (config && "path" in config.input) {
|
|
6551
|
-
const specPath = path$1.resolve(process$1.cwd(), config.root, config.input.path);
|
|
6552
|
-
try {
|
|
6553
|
-
specContent = readFileSync(specPath, "utf-8");
|
|
6554
|
-
} catch {
|
|
6555
|
-
}
|
|
6556
|
-
}
|
|
6557
|
-
sendAgentMessage(ws, {
|
|
6558
|
-
type: "connected",
|
|
6559
|
-
payload: {
|
|
6560
|
-
version,
|
|
6561
|
-
configPath: process$1.env.KUBB_CONFIG || "",
|
|
6562
|
-
spec: specContent,
|
|
6575
|
+
var _a, _b, _c;
|
|
6576
|
+
try {
|
|
6577
|
+
const data = JSON.parse(message.data);
|
|
6578
|
+
if (isCommandMessage(data)) {
|
|
6579
|
+
if (data.command === "generate") {
|
|
6580
|
+
const studioConfig = readStudioConfig(resolvedConfigPath);
|
|
6581
|
+
const patch = (_a = data.payload) != null ? _a : studioConfig;
|
|
6582
|
+
const resolvedPlugins = await resolvePlugins(patch.plugins);
|
|
6583
|
+
await generate({
|
|
6563
6584
|
config: {
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
path: "path" in config.input ? config.input.path : void 0
|
|
6568
|
-
},
|
|
6585
|
+
...config,
|
|
6586
|
+
plugins: patch ? resolvedPlugins : config.plugins,
|
|
6587
|
+
root,
|
|
6569
6588
|
output: {
|
|
6570
|
-
|
|
6571
|
-
write:
|
|
6572
|
-
|
|
6573
|
-
|
|
6589
|
+
...config.output,
|
|
6590
|
+
write: allowWrite
|
|
6591
|
+
}
|
|
6592
|
+
},
|
|
6593
|
+
events
|
|
6594
|
+
});
|
|
6595
|
+
if (allowWrite) {
|
|
6596
|
+
writeStudioConfig(resolvedConfigPath, data.payload);
|
|
6597
|
+
}
|
|
6598
|
+
logger.success("Generated command success");
|
|
6599
|
+
}
|
|
6600
|
+
if (data.command === "connect") {
|
|
6601
|
+
sendAgentMessage(ws, {
|
|
6602
|
+
type: "connected",
|
|
6603
|
+
payload: {
|
|
6604
|
+
version,
|
|
6605
|
+
configPath,
|
|
6606
|
+
permissions: {
|
|
6607
|
+
allowAll,
|
|
6608
|
+
allowWrite
|
|
6574
6609
|
},
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6610
|
+
config: {
|
|
6611
|
+
plugins: (_b = config.plugins) == null ? void 0 : _b.map((plugin) => ({
|
|
6612
|
+
name: `@kubb/${plugin.name}`,
|
|
6613
|
+
options: serializePluginOptions(plugin.options)
|
|
6614
|
+
}))
|
|
6615
|
+
}
|
|
6579
6616
|
}
|
|
6580
|
-
}
|
|
6581
|
-
}
|
|
6617
|
+
});
|
|
6618
|
+
}
|
|
6619
|
+
return;
|
|
6582
6620
|
}
|
|
6583
|
-
|
|
6621
|
+
logger.warn(`Unknown message type from Kubb Studio: ${message.data}`);
|
|
6622
|
+
} catch (error) {
|
|
6623
|
+
logger.error(`[unhandledRejection] ${(_c = error == null ? void 0 : error.message) != null ? _c : error}`);
|
|
6584
6624
|
}
|
|
6585
|
-
logger.warn(`Unknown message type from Kubb Studio: ${message.data}`);
|
|
6586
6625
|
});
|
|
6587
6626
|
} catch (error) {
|
|
6588
6627
|
deleteCachedSession(token);
|
|
@@ -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-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/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.1/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../../core/dist/chunk-iVr_oF3V.js","../../../../../core/dist/fs-Parec-wn.js","../../../../../core/dist/transformers-8ju9ixkG.js","../../../../../core/dist/getBarrelFiles-gRyVPFBP.js","../../../../../core/dist/utils.js","../../../../server/types/agent.ts","../../../../server/utils/logger.ts","../../../../server/utils/sessionManager.ts","../../../../server/utils/api.ts","../../../../../core/dist/index.js","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/ws.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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","fsPromises","fsp","_inlineAppConfig","createRadixRouter","__defProp","_b","_options","__privateAdd","__privateGet","__privateSet","pLimit","path","_a","__privateMethod","version","fs","error","process","result","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,
|
|
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-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.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.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/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.1/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../../core/dist/chunk-iVr_oF3V.js","../../../../../core/dist/fs-Parec-wn.js","../../../../../core/dist/transformers-8ju9ixkG.js","../../../../../core/dist/getBarrelFiles-gRyVPFBP.js","../../../../../core/dist/utils.js","../../../../server/types/agent.ts","../../../../server/utils/logger.ts","../../../../server/utils/sessionManager.ts","../../../../server/utils/api.ts","../../../../../core/dist/index.js","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/studioConfig.ts","../../../../server/utils/ws.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.1/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.1/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.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","fsPromises","fsp","_inlineAppConfig","createRadixRouter","__defProp","_b","_options","__privateAdd","__privateGet","__privateSet","pLimit","path","_a","__privateMethod","version","fs","error","process","result","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,47,48,49,50]}
|
package/README.md
CHANGED
|
@@ -54,6 +54,8 @@ The server will be available at `http://localhost:4000`.
|
|
|
54
54
|
- `KUBB_STUDIO_URL` - Studio connection URL (e.g., `http://localhost:3000`)
|
|
55
55
|
- `KUBB_AGENT_TOKEN` - Authentication token for Studio connection
|
|
56
56
|
- `KUBB_AGENT_NO_CACHE` - Disable session caching (set to `true` to skip cache)
|
|
57
|
+
- `KUBB_ALLOW_WRITE` - Allow writing generated files to the filesystem (set to `true` to enable). When `false` (default), no files are written and the config patch is not persisted.
|
|
58
|
+
- `KUBB_ALLOW_ALL` - Grant all permissions including filesystem writes. Implies `KUBB_ALLOW_WRITE=true`.
|
|
57
59
|
|
|
58
60
|
### Automatic .env Loading
|
|
59
61
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.0",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -45,7 +45,20 @@
|
|
|
45
45
|
"picocolors": "^1.1.1",
|
|
46
46
|
"string-argv": "^0.3.2",
|
|
47
47
|
"ws": "^8.19.0",
|
|
48
|
-
"@kubb/core": "4.
|
|
48
|
+
"@kubb/core": "4.27.0",
|
|
49
|
+
"@kubb/plugin-client": "4.27.0",
|
|
50
|
+
"@kubb/plugin-cypress": "4.27.0",
|
|
51
|
+
"@kubb/plugin-faker": "4.27.0",
|
|
52
|
+
"@kubb/plugin-msw": "4.27.0",
|
|
53
|
+
"@kubb/plugin-oas": "4.27.0",
|
|
54
|
+
"@kubb/plugin-react-query": "4.27.0",
|
|
55
|
+
"@kubb/plugin-redoc": "4.27.0",
|
|
56
|
+
"@kubb/plugin-solid-query": "4.27.0",
|
|
57
|
+
"@kubb/plugin-svelte-query": "4.27.0",
|
|
58
|
+
"@kubb/plugin-swr": "4.27.0",
|
|
59
|
+
"@kubb/plugin-ts": "4.27.0",
|
|
60
|
+
"@kubb/plugin-vue-query": "4.27.0",
|
|
61
|
+
"@kubb/plugin-zod": "4.27.0"
|
|
49
62
|
},
|
|
50
63
|
"devDependencies": {
|
|
51
64
|
"@types/ws": "^8.18.1",
|