@kubb/agent 4.31.5 → 4.32.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-03-04T10:27:54.664Z",
2
+ "date": "2026-03-06T09:46:49.415Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -4478,89 +4478,31 @@ const _a2VEEUGb5K4b1gyM9hOmO1Xz0hUJSFuGyIT3cHsvE = defineNitroPlugin((nitro) =>
4478
4478
  });
4479
4479
  });
4480
4480
 
4481
- function getStorage() {
4482
- return useStorage("kubb");
4483
- }
4484
- function isSessionValid(session) {
4485
- try {
4486
- const expiresAt = new Date(session.expiresAt);
4487
- const now = /* @__PURE__ */ new Date();
4488
- return now.getTime() < expiresAt.getTime() - 6e4;
4489
- } catch {
4490
- return false;
4491
- }
4492
- }
4493
- function getSessionKey(token) {
4494
- return `sessions:${createHash("sha512").update(token).digest("hex")}`;
4495
- }
4496
- async function getCachedSession(sessionKey) {
4497
- const storage = getStorage();
4498
- const agentSession = await storage.getItem(sessionKey);
4499
- if (!agentSession) {
4500
- return null;
4501
- }
4502
- if (!isSessionValid(agentSession)) {
4503
- return null;
4504
- }
4505
- return agentSession;
4506
- }
4507
- async function cacheSession({ sessionKey, session }) {
4508
- const storage = getStorage();
4509
- await storage.setItem(sessionKey, { ...session, storedAt: (/* @__PURE__ */ new Date()).toISOString(), configs: [] });
4510
- }
4511
- async function removeCachedSession(sessionKey) {
4512
- const storage = getStorage();
4513
- const maskedSessionKey = maskedString(sessionKey.replace("sessions:", ""));
4514
- logger.info(`[${maskedSessionKey}] Removing expired agent session from cache...`);
4515
- await storage.removeItem(sessionKey);
4516
- logger.success(`[${maskedSessionKey}] Removed expired agent session from cache`);
4517
- }
4518
- async function saveStudioConfigToStorage({ sessionKey, config }) {
4519
- const storage = getStorage();
4520
- const agentSession = await getCachedSession(sessionKey);
4521
- if (!agentSession) {
4522
- throw new Error("No valid session found for retrieving previous configs");
4523
- }
4524
- await storage.setItem(sessionKey, { ...agentSession, configs: [...agentSession.configs, { config, storedAt: (/* @__PURE__ */ new Date()).toISOString() }] });
4525
- }
4526
-
4527
- var _a$5;
4528
4481
  function generateToken() {
4529
4482
  return randomBytes(32).toString("hex");
4530
4483
  }
4531
4484
  function hashToken(input) {
4532
4485
  return createHash("sha256").update(input).digest("hex");
4533
4486
  }
4534
- const machineToken = hashToken((_a$5 = process.env.KUBB_AGENT_SECRET) != null ? _a$5 : generateToken());
4487
+ const _fallbackSecret = generateToken();
4488
+ function getMachineToken() {
4489
+ var _a;
4490
+ return hashToken((_a = process.env.KUBB_AGENT_SECRET) != null ? _a : _fallbackSecret);
4491
+ }
4535
4492
 
4536
- async function createAgentSession({ token, studioUrl, noCache, cacheKey }) {
4537
- const sessionKey = cacheKey != null ? cacheKey : getSessionKey(token);
4538
- const maskedSessionKey = maskedString(sessionKey.replace("sessions:", ""));
4539
- const connectUrl = `${studioUrl}/api/agent/session/create`;
4540
- const canCache = !noCache;
4541
- if (canCache) {
4542
- const cachedSession = await getCachedSession(sessionKey);
4543
- if (cachedSession) {
4544
- logger.success(`[${maskedSessionKey}] Using cached agent session`);
4545
- return cachedSession;
4546
- }
4547
- await removeCachedSession(sessionKey);
4548
- }
4493
+ async function createAgentSession({ token, studioUrl }) {
4494
+ const url = `${studioUrl}/api/agent/session/create`;
4549
4495
  try {
4550
- logger.info(`[${maskedSessionKey}] Creating agent session with Studio...`);
4551
- const data = await $fetch(connectUrl, {
4496
+ logger.info("Creating agent session with Studio...");
4497
+ const data = await $fetch(url, {
4552
4498
  method: "POST",
4553
4499
  headers: { Authorization: `Bearer ${token}` },
4554
- body: { machineToken }
4500
+ body: { machineToken: getMachineToken() }
4555
4501
  });
4556
4502
  if (!data) {
4557
4503
  throw new Error("No data available for agent session");
4558
4504
  }
4559
- if (canCache) {
4560
- await cacheSession({ sessionKey, session: { ...data, storedAt: (/* @__PURE__ */ new Date()).toISOString(), configs: [] } });
4561
- logger.success(`[${maskedSessionKey}] Saved agent session to cache`);
4562
- }
4563
- logger.info(`[${maskedSessionKey}] Created agent session with Studio`);
4505
+ logger.info("Created agent session with Studio");
4564
4506
  return data;
4565
4507
  } catch (error) {
4566
4508
  throw new Error("Failed to get agent session from Kubb Studio", { cause: error });
@@ -4568,15 +4510,15 @@ async function createAgentSession({ token, studioUrl, noCache, cacheKey }) {
4568
4510
  }
4569
4511
  async function registerAgent({ token, studioUrl, poolSize }) {
4570
4512
  var _a, _b;
4571
- const registerUrl = `${studioUrl}/api/agent/register`;
4513
+ const url = `${studioUrl}/api/agent/connect`;
4572
4514
  try {
4573
4515
  logger.info("Registering agent with Studio...");
4574
- await $fetch(registerUrl, {
4516
+ await $fetch(url, {
4575
4517
  method: "POST",
4576
4518
  headers: {
4577
4519
  Authorization: `Bearer ${token}`
4578
4520
  },
4579
- body: { machineToken, poolSize }
4521
+ body: { machineToken: getMachineToken(), poolSize }
4580
4522
  });
4581
4523
  logger.success(`Agent registered with Studio with token ${maskedString(token)}`);
4582
4524
  } catch (error) {
@@ -4584,11 +4526,11 @@ async function registerAgent({ token, studioUrl, poolSize }) {
4584
4526
  }
4585
4527
  }
4586
4528
  async function disconnect({ sessionId, token, studioUrl }) {
4587
- const disconnectUrl = `${studioUrl}/api/agent/session/${sessionId}/disconnect`;
4529
+ const url = `${studioUrl}/api/agent/session/${sessionId}/disconnect`;
4588
4530
  const maskedSessionKey = maskedString(sessionId);
4589
4531
  try {
4590
4532
  logger.info(`[${maskedSessionKey}] Disconnecting from Studio...`);
4591
- await $fetch(disconnectUrl, {
4533
+ await $fetch(url, {
4592
4534
  method: "POST",
4593
4535
  headers: {
4594
4536
  Authorization: `Bearer ${token}`
@@ -6073,7 +6015,7 @@ function tokenize(command) {
6073
6015
  return args;
6074
6016
  }
6075
6017
 
6076
- var version = "4.31.5";
6018
+ var version = "4.32.0";
6077
6019
 
6078
6020
  function isCommandMessage(msg) {
6079
6021
  return msg.type === "command";
@@ -6088,6 +6030,24 @@ function isPublishCommandMessage(msg) {
6088
6030
  return msg.type === "command" && msg.command === "publish";
6089
6031
  }
6090
6032
 
6033
+ function getStorage() {
6034
+ return useStorage("kubb");
6035
+ }
6036
+ async function saveStudioConfigToStorage({ sessionId, config }) {
6037
+ var _a;
6038
+ const storage = getStorage();
6039
+ const key = `configs:${sessionId}`;
6040
+ const existing = (_a = await storage.getItem(key)) != null ? _a : [];
6041
+ await storage.setItem(key, [...existing, { config, storedAt: (/* @__PURE__ */ new Date()).toISOString() }]);
6042
+ }
6043
+ async function getLatestStudioConfigFromStorage({ sessionId }) {
6044
+ const storage = getStorage();
6045
+ const key = `configs:${sessionId}`;
6046
+ const existing = await storage.getItem(key);
6047
+ if (!(existing == null ? void 0 : existing.length)) return null;
6048
+ return existing[existing.length - 1].config;
6049
+ }
6050
+
6091
6051
  var __typeError$3 = (msg) => {
6092
6052
  throw TypeError(msg);
6093
6053
  };
@@ -6121,7 +6081,7 @@ var BaseGenerator = (_a$3 = class {
6121
6081
  function isInputPath(config) {
6122
6082
  return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
6123
6083
  }
6124
- var version$1 = "4.31.5";
6084
+ var version$1 = "4.32.0";
6125
6085
  function getDiagnosticInfo() {
6126
6086
  return {
6127
6087
  nodeVersion: version$2,
@@ -12655,6 +12615,18 @@ function withRequiredRequestBodySchema(operationSchema) {
12655
12615
  }
12656
12616
  };
12657
12617
  }
12618
+ function resolveServerUrl(server, overrides) {
12619
+ var _a2, _b2;
12620
+ if (!server.variables) return server.url;
12621
+ let url = server.url;
12622
+ for (const [key, variable] of Object.entries(server.variables)) {
12623
+ const value = (_a2 = overrides == null ? void 0 : overrides[key]) != null ? _a2 : variable.default != null ? String(variable.default) : void 0;
12624
+ if (value === void 0) continue;
12625
+ if (((_b2 = variable.enum) == null ? void 0 : _b2.length) && !variable.enum.some((e) => String(e) === value)) throw new Error(`Invalid server variable value '${value}' for '${key}' when resolving ${server.url}. Valid values are: ${variable.enum.join(", ")}.`);
12626
+ url = url.replaceAll(`{${key}}`, value);
12627
+ }
12628
+ return url;
12629
+ }
12658
12630
 
12659
12631
  function getDefaultBanner({ title, description, version, config }) {
12660
12632
  try {
@@ -13575,7 +13547,7 @@ var OperationGenerator = (_a = class extends BaseGenerator {
13575
13547
  }, _a);
13576
13548
  const pluginOasName = "plugin-oas";
13577
13549
  const pluginOas = definePlugin((options) => {
13578
- const { output = { path: "schemas" }, group, validate = true, generators = [jsonGenerator], serverIndex, contentType, oasClass, discriminator = "strict", collisionDetection = false } = options;
13550
+ const { output = { path: "schemas" }, group, validate = true, generators = [jsonGenerator], serverIndex, serverVariables, contentType, oasClass, discriminator = "strict", collisionDetection = false } = options;
13579
13551
  const getOas = async ({ validate: validate2, config, events }) => {
13580
13552
  const oas = await parseFromConfig(config, oasClass);
13581
13553
  oas.setOptions({
@@ -13619,13 +13591,16 @@ const pluginOas = definePlugin((options) => {
13619
13591
  return oas;
13620
13592
  },
13621
13593
  async getBaseURL() {
13622
- var _a2, _b;
13594
+ var _a2;
13623
13595
  const oas2 = await getOas({
13624
13596
  config,
13625
13597
  events,
13626
13598
  validate: false
13627
13599
  });
13628
- if (serverIndex !== void 0) return (_b = (_a2 = oas2.api.servers) == null ? void 0 : _a2.at(serverIndex)) == null ? void 0 : _b.url;
13600
+ if (serverIndex === void 0) return;
13601
+ const server = (_a2 = oas2.api.servers) == null ? void 0 : _a2.at(serverIndex);
13602
+ if (!(server == null ? void 0 : server.url)) return;
13603
+ return resolveServerUrl(server, serverVariables);
13629
13604
  }
13630
13605
  };
13631
13606
  },
@@ -212419,6 +212394,7 @@ function createEnumDeclaration({ type = "enum", name, typeName, enums, enumKeyCa
212419
212394
  }
212420
212395
  }).filter(Boolean))];
212421
212396
  const identifierName = name;
212397
+ if (enums.length === 0) return [void 0, factory.createTypeAliasDeclaration([factory.createToken(ts.SyntaxKind.ExportKeyword)], factory.createIdentifier(typeName), void 0, factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword))];
212422
212398
  return [factory.createVariableStatement([factory.createToken(ts.SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([factory.createVariableDeclaration(factory.createIdentifier(identifierName), void 0, void 0, factory.createAsExpression(factory.createObjectLiteralExpression(enums.map(([key, value]) => {
212423
212399
  let initializer = factory.createStringLiteral(value == null ? void 0 : value.toString());
212424
212400
  if (isNumber(value)) if (value < 0) initializer = factory.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, factory.createNumericLiteral(Math.abs(value)));
@@ -213629,6 +213605,7 @@ const zodGenerator = createReactGenerator({
213629
213605
  }),
213630
213606
  typed && version === "3" && /* @__PURE__ */ jsx(File.Import, {
213631
213607
  name: ["ToZod"],
213608
+ isTypeOnly: true,
213632
213609
  root: file.path,
213633
213610
  path: path$2.resolve(config.root, config.output.path, ".kubb/ToZod.ts")
213634
213611
  }),
@@ -215144,6 +215121,7 @@ function Faker({ tree, description, name, typeName, seed, regexGenerator, canOve
215144
215121
  dateParser
215145
215122
  })).filter(Boolean));
215146
215123
  const isArray = fakerText.startsWith("faker.helpers.arrayElements") || fakerText.startsWith("faker.helpers.multiple");
215124
+ const isRefToArray = tree.some((s) => isKeyword(s, schemaKeywords.schema) && s.args.type === "array");
215147
215125
  const isObject = fakerText.startsWith("{");
215148
215126
  const isTuple = fakerText.startsWith("faker.helpers.arrayElement");
215149
215127
  const isSimpleString = name === "string";
@@ -215164,6 +215142,7 @@ function Faker({ tree, description, name, typeName, seed, regexGenerator, canOve
215164
215142
  if (canOverride && isSimpleFloat) fakerTextWithOverride = "data ?? faker.number.float()";
215165
215143
  let type = `Partial<${typeName}>`;
215166
215144
  if (isArray) type = typeName;
215145
+ if (isRefToArray) type = typeName;
215167
215146
  if (isSimpleString) type = name;
215168
215147
  if (isSimpleInt || isSimpleFloat) type = "number";
215169
215148
  const params = FunctionParams.factory({ data: {
@@ -223921,12 +223900,20 @@ function mergePlugins(diskPlugins, studioPlugins) {
223921
223900
  if (!studioPlugins) return diskPlugins;
223922
223901
  const resolvedStudio = resolvePlugins(studioPlugins);
223923
223902
  if (!diskPlugins) return resolvedStudio;
223924
- const studioByName = new Map(resolvedStudio.map((p) => [p.name, p]));
223903
+ const studioEntryByResolvedName = /* @__PURE__ */ new Map();
223904
+ resolvedStudio.forEach((resolved, i) => {
223905
+ const entry = studioPlugins[i];
223906
+ if (entry) {
223907
+ studioEntryByResolvedName.set(resolved.name, entry);
223908
+ }
223909
+ });
223925
223910
  const diskNames = new Set(diskPlugins.map((p) => p.name));
223926
223911
  const mergedDisk = diskPlugins.map((diskPlugin) => {
223927
- const studioPlugin = studioByName.get(diskPlugin.name);
223928
- if (!studioPlugin) return diskPlugin;
223929
- return { ...diskPlugin, options: mergeDeep(diskPlugin.options, studioPlugin.options) };
223912
+ var _a;
223913
+ const studioEntry = studioEntryByResolvedName.get(diskPlugin.name);
223914
+ if (!studioEntry) return diskPlugin;
223915
+ const mergedOptions = mergeDeep(diskPlugin.options, studioEntry.options);
223916
+ return (_a = resolvePlugins([{ name: studioEntry.name, options: mergedOptions }])[0]) != null ? _a : diskPlugin;
223930
223917
  });
223931
223918
  const studioOnly = resolvedStudio.filter((p) => !diskNames.has(p.name));
223932
223919
  return [...mergedDisk, ...studioOnly];
@@ -224127,7 +224114,6 @@ async function connectToStudio(options) {
224127
224114
  studioUrl,
224128
224115
  configPath,
224129
224116
  resolvedConfigPath,
224130
- noCache,
224131
224117
  allowAll,
224132
224118
  allowWrite,
224133
224119
  allowPublish,
@@ -224135,27 +224121,20 @@ async function connectToStudio(options) {
224135
224121
  retryInterval,
224136
224122
  heartbeatInterval = 3e4,
224137
224123
  initialSession,
224138
- sessionKey,
224139
224124
  nitro
224140
224125
  } = options;
224141
224126
  const events = new AsyncEventEmitter();
224142
224127
  let currentSource;
224143
- const maskedSessionKey = maskedString(sessionKey.replace("sessions:", ""));
224144
- async function removeSession() {
224145
- if (!noCache) {
224146
- await removeCachedSession(sessionKey);
224147
- }
224148
- }
224149
224128
  async function reconnect() {
224150
- logger.info(`[${maskedSessionKey}] Retrying connection in ${formatMs(retryInterval)} to Kubb Studio ...`);
224151
- await removeSession();
224129
+ logger.info(`Retrying connection in ${formatMs(retryInterval)} to Kubb Studio ...`);
224152
224130
  setTimeout(() => connectToStudio({ ...options, initialSession: void 0 }), retryInterval);
224153
224131
  }
224154
224132
  try {
224155
224133
  setupHookListener(events, root);
224156
- const { sessionId, wsUrl, isSandbox } = initialSession != null ? initialSession : await createAgentSession({ noCache, token, studioUrl, cacheKey: sessionKey });
224134
+ const { sessionId, wsUrl, isSandbox } = initialSession != null ? initialSession : await createAgentSession({ token, studioUrl });
224157
224135
  const ws = createWebsocket(wsUrl, { headers: { Authorization: `Bearer ${token}` } });
224158
224136
  const maskedWsUrl = maskedString(wsUrl);
224137
+ const maskedSessionId = maskedString(sessionId);
224159
224138
  const effectiveAllowAll = isSandbox ? false : allowAll;
224160
224139
  const effectiveWrite = isSandbox ? false : allowWrite;
224161
224140
  const effectivePublish = isSandbox ? false : allowPublish;
@@ -224174,7 +224153,7 @@ async function connectToStudio(options) {
224174
224153
  }
224175
224154
  }
224176
224155
  const onOpen = () => {
224177
- logger.success(`[${maskedSessionKey}] Connected to Kubb Studio on "${maskedWsUrl}"`);
224156
+ logger.success(`[${maskedSessionId}] Connected to Kubb Studio on "${maskedWsUrl}"`);
224178
224157
  };
224179
224158
  const onClose = async () => {
224180
224159
  if (serverDisconnected) {
@@ -224187,8 +224166,10 @@ async function connectToStudio(options) {
224187
224166
  await reconnect();
224188
224167
  };
224189
224168
  const onError = async () => {
224190
- logger.error(`[${maskedSessionKey}] Failed to connect to Kubb Studio on "${maskedWsUrl}"`);
224169
+ logger.error(`[${maskedSessionId}] Failed to connect to Kubb Studio on "${maskedWsUrl}"`);
224191
224170
  await cleanup();
224171
+ await disconnect({ sessionId, studioUrl, token }).catch(() => {
224172
+ });
224192
224173
  await reconnect();
224193
224174
  };
224194
224175
  ws.addEventListener("open", onOpen);
@@ -224202,18 +224183,17 @@ async function connectToStudio(options) {
224202
224183
  heartbeatTimer = setInterval(() => sendAgentMessage(ws, { type: "ping" }), heartbeatInterval);
224203
224184
  setupEventsStream(ws, events, () => currentSource);
224204
224185
  ws.addEventListener("message", async (message) => {
224205
- var _a2, _b, _c, _d, _e;
224186
+ var _a2, _b, _c, _d, _e, _f, _g;
224206
224187
  try {
224207
224188
  const data = JSON.parse(message.data);
224208
- logger.info(`[${maskedSessionKey}] Received "${data.type}" from Studio`);
224189
+ logger.info(`[${maskedSessionId}] Received "${data.type}" from Studio`);
224209
224190
  if (isPongMessage(data)) {
224210
224191
  return;
224211
224192
  }
224212
224193
  if (isDisconnectMessage(data)) {
224213
- logger.warn(`[${maskedSessionKey}] Agent session disconnected by Studio with reason: ${data.reason}`);
224194
+ logger.warn(`[${maskedSessionId}] Agent session disconnected by Studio with reason: ${data.reason}`);
224214
224195
  if (data.reason === "revoked") {
224215
224196
  await cleanup(`session_${data.reason}`);
224216
- await removeSession();
224217
224197
  return;
224218
224198
  }
224219
224199
  if (data.reason === "expired") {
@@ -224227,18 +224207,19 @@ async function connectToStudio(options) {
224227
224207
  if (data.command === "generate") {
224228
224208
  currentSource = "generate";
224229
224209
  const config = await loadConfig(resolvedConfigPath);
224230
- const patch = data.payload;
224210
+ const storedConfig = data.payload ? null : await getLatestStudioConfigFromStorage({ sessionId }).catch(() => null);
224211
+ const patch = (_b = (_a2 = data.payload) != null ? _a2 : storedConfig) != null ? _b : void 0;
224231
224212
  const plugins = mergePlugins(config.plugins, patch == null ? void 0 : patch.plugins);
224232
- const inputOverride = isSandbox ? { data: (_a2 = patch == null ? void 0 : patch.input) != null ? _a2 : "" } : void 0;
224213
+ const inputOverride = isSandbox ? { data: (_c = patch == null ? void 0 : patch.input) != null ? _c : "" } : void 0;
224233
224214
  if (allowWrite && isSandbox) {
224234
- logger.warn(`[${maskedSessionKey}] Agent is running in a sandbox environment, write will be disabled`);
224215
+ logger.warn(`[${maskedSessionId}] Agent is running in a sandbox environment, write will be disabled`);
224235
224216
  }
224236
224217
  if ((patch == null ? void 0 : patch.input) && !isSandbox) {
224237
- logger.warn(`[${maskedSessionKey}] Input override via payload is only supported in sandbox mode and will be ignored`);
224218
+ logger.warn(`[${maskedSessionId}] Input override via payload is only supported in sandbox mode and will be ignored`);
224238
224219
  }
224239
224220
  if (data.payload && effectiveWrite) {
224240
- await saveStudioConfigToStorage({ sessionKey, config: data.payload }).catch((err) => {
224241
- logger.warn(`[${maskedSessionKey}] Failed to save studio config: ${err == null ? void 0 : err.message}`);
224221
+ await saveStudioConfigToStorage({ sessionId, config: data.payload }).catch((err) => {
224222
+ logger.warn(`[${maskedSessionId}] Failed to save studio config: ${err == null ? void 0 : err.message}`);
224242
224223
  });
224243
224224
  }
224244
224225
  await generate({
@@ -224251,7 +224232,7 @@ async function connectToStudio(options) {
224251
224232
  },
224252
224233
  events
224253
224234
  });
224254
- logger.success(`[${maskedSessionKey}] Completed "${data.type}" from Studio`);
224235
+ logger.success(`[${maskedSessionId}] Completed "${data.type}" from Studio`);
224255
224236
  currentSource = void 0;
224256
224237
  return;
224257
224238
  }
@@ -224264,38 +224245,38 @@ async function connectToStudio(options) {
224264
224245
  configPath,
224265
224246
  permissions: { allowAll: effectiveAllowAll, allowWrite: effectiveWrite, allowPublish: effectivePublish },
224266
224247
  config: {
224267
- plugins: (_b = config.plugins) == null ? void 0 : _b.map((plugin) => ({
224248
+ plugins: (_d = config.plugins) == null ? void 0 : _d.map((plugin) => ({
224268
224249
  name: `@kubb/${plugin.name}`,
224269
224250
  options: serializePluginOptions(plugin.options)
224270
224251
  }))
224271
224252
  }
224272
224253
  }
224273
224254
  });
224274
- logger.success(`[${maskedSessionKey}] Completed "${data.type}" from Studio`);
224255
+ logger.success(`[${maskedSessionId}] Completed "${data.type}" from Studio`);
224275
224256
  return;
224276
224257
  }
224277
224258
  if (isPublishCommandMessage(data)) {
224278
224259
  if (!effectivePublish) {
224279
- logger.warn(`[${maskedSessionKey}] Publish command rejected \u2014 KUBB_AGENT_ALLOW_PUBLISH is not enabled`);
224260
+ logger.warn(`[${maskedSessionId}] Publish command rejected \u2014 KUBB_AGENT_ALLOW_PUBLISH is not enabled`);
224280
224261
  return;
224281
224262
  }
224282
224263
  currentSource = "publish";
224283
224264
  const config = await loadConfig(resolvedConfigPath);
224284
- const resolvedCommand = (_d = (_c = data.payload.command) != null ? _c : process.env.KUBB_AGENT_PUBLISH_COMMAND) != null ? _d : "npm publish";
224265
+ const resolvedCommand = (_f = (_e = data.payload.command) != null ? _e : process.env.KUBB_AGENT_PUBLISH_COMMAND) != null ? _f : "npm publish";
224285
224266
  await publish({
224286
224267
  command: resolvedCommand,
224287
224268
  outputPath: config.output.path,
224288
224269
  root,
224289
224270
  events
224290
224271
  });
224291
- logger.success(`[${maskedSessionKey}] Completed "${data.command}" from Studio`);
224272
+ logger.success(`[${maskedSessionId}] Completed "${data.command}" from Studio`);
224292
224273
  currentSource = void 0;
224293
224274
  return;
224294
224275
  }
224295
224276
  }
224296
- logger.warn(`[${maskedSessionKey}] Unknown message type from Kubb Studio: ${message.data}`);
224277
+ logger.warn(`[${maskedSessionId}] Unknown message type from Kubb Studio: ${message.data}`);
224297
224278
  } catch (error) {
224298
- logger.error(`[${maskedSessionKey}] [unhandledRejection] ${(_e = error == null ? void 0 : error.message) != null ? _e : error}`);
224279
+ logger.error(`[${maskedSessionId}] [unhandledRejection] ${(_g = error == null ? void 0 : error.message) != null ? _g : error}`);
224299
224280
  }
224300
224281
  });
224301
224282
  } catch (error) {
@@ -224307,7 +224288,6 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
224307
224288
  const studioUrl = process$1.env.KUBB_STUDIO_URL || "https://studio.kubb.dev";
224308
224289
  const token = process$1.env.KUBB_AGENT_TOKEN;
224309
224290
  const configPath = process$1.env.KUBB_AGENT_CONFIG || "kubb.config.ts";
224310
- const noCache = process$1.env.KUBB_AGENT_NO_CACHE === "true";
224311
224291
  const retryInterval = process$1.env.KUBB_AGENT_RETRY_TIMEOUT ? Number.parseInt(process$1.env.KUBB_AGENT_RETRY_TIMEOUT, 10) : 3e4;
224312
224292
  const heartbeatInterval = process$1.env.KUBB_AGENT_HEARTBEAT_INTERVAL ? Number.parseInt(process$1.env.KUBB_AGENT_HEARTBEAT_INTERVAL, 10) : 3e4;
224313
224293
  const root = process$1.env.KUBB_AGENT_ROOT || process$1.cwd();
@@ -224323,9 +224303,7 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
224323
224303
  logger.warn("KUBB_AGENT_SECRET not set", "secret should be set");
224324
224304
  }
224325
224305
  const resolvedConfigPath = path$2.isAbsolute(configPath) ? configPath : path$2.resolve(root, configPath);
224326
- const storage = useStorage("kubb");
224327
- const sessionKey = getSessionKey(token);
224328
- const maskedSessionKey = maskedString(sessionKey.replace("sessions:", ""));
224306
+ const maskedToken = maskedString(token);
224329
224307
  try {
224330
224308
  await registerAgent({ token, studioUrl, poolSize });
224331
224309
  const baseOptions = {
@@ -224333,38 +224311,31 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
224333
224311
  studioUrl,
224334
224312
  configPath,
224335
224313
  resolvedConfigPath,
224336
- noCache,
224337
224314
  allowAll,
224338
224315
  allowWrite,
224339
224316
  allowPublish,
224340
224317
  root,
224341
224318
  retryInterval,
224342
224319
  heartbeatInterval,
224343
- storage,
224344
- sessionKey,
224345
224320
  nitro
224346
224321
  };
224347
- logger.info(`[${maskedSessionKey}] Starting session pool of ${poolSize} connection(s)`);
224322
+ logger.info(`[${maskedToken}] Starting session pool of ${poolSize} connection(s)`);
224348
224323
  const sessions = /* @__PURE__ */ new Map();
224349
- for (const index2 of Array.from({ length: poolSize }, (_, i) => i)) {
224350
- const cacheKey = `${sessionKey}-${index2}`;
224351
- const maskedSessionKey2 = maskedString(cacheKey);
224352
- const session = await createAgentSession({ noCache, token, studioUrl, cacheKey }).catch((err) => {
224353
- logger.warn(`[${maskedSessionKey2}] Failed to pre-create pool session:`, err == null ? void 0 : err.message);
224324
+ for (const index of Array.from({ length: poolSize }, (_, i) => i)) {
224325
+ const session = await createAgentSession({ token, studioUrl }).catch((err) => {
224326
+ logger.warn(`[${maskedToken}] Failed to pre-create pool session ${index}:`, err == null ? void 0 : err.message);
224354
224327
  return null;
224355
224328
  });
224356
- sessions.set(cacheKey, session);
224329
+ sessions.set(index, session);
224357
224330
  }
224358
- let index = 0;
224359
- for (const [cacheKey, session] of sessions) {
224360
- index++;
224331
+ for (const [index, session] of sessions.entries()) {
224361
224332
  if (!session) {
224362
224333
  continue;
224363
224334
  }
224364
- const maskedSessionKey2 = maskedString(session.sessionId);
224365
- logger.info(`[${maskedSessionKey2}] Connecting session ${index}/${sessions.size}`);
224366
- await connectToStudio({ ...baseOptions, initialSession: session, sessionKey: cacheKey }).catch((err) => {
224367
- logger.warn(`[${maskedSessionKey2}] Session ${index} failed to connect:`, err == null ? void 0 : err.message);
224335
+ const maskedSessionId = maskedString(session.sessionId);
224336
+ logger.info(`[${maskedSessionId}] Connecting session ${index + 1}/${sessions.size}`);
224337
+ await connectToStudio({ ...baseOptions, initialSession: session }).catch((err) => {
224338
+ logger.warn(`[${maskedSessionId}] Session ${index + 1} failed to connect:`, err == null ? void 0 : err.message);
224368
224339
  });
224369
224340
  }
224370
224341
  } catch (error) {
@@ -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.6/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.6/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.6/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.6/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.6/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.6/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.6/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.6/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.6/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.6/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.6/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../server/utils/maskedString.ts","../../../../server/plugins/heartbeat.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../core/dist/write-pEo2oQGI.js","../../../../../core/dist/toRegExp-DdJ1Kgbf.js","../../../../../core/dist/packageManager-B6NiaZeW.js","../../../../../core/dist/utils.js","../../../../server/types/agent.ts","../../../../../core/dist/index.js","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk-DKWOrOAv.js","../../../../../plugin-oas/dist/SchemaMapper-eQhTeFim.js","../../../../../core/dist/transformers.js","../../../../../oas/dist/chunk-Dxrv8gPv.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-TvbgNwYq.js","../../../../../plugin-oas/dist/getFooter-_DD1dfMI.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-DGIMTS_f.js","../../../../../plugin-oas/dist/jsonGenerator-Df2dxdof.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/Zod-GzH2I46C.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/Type-BoBgmIn8.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-DxNrETHn.js","../../../../../plugin-zod/dist/zodGenerator-DomjELrZ.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/staticClassClientGenerator-BUGBMkNO.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/Request-DOzOQGgb.js","../../../../../plugin-cypress/dist/cypressGenerator-D7trA-II.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/Faker-DNAO-21W.js","../../../../../plugin-faker/dist/fakerGenerator-1hLpeTbP.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-D45Pl-Hd.js","../../../../../plugin-mcp/dist/serverGenerator-TERvEwnw.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/Response-rq32ZXGn.js","../../../../../plugin-msw/dist/mswGenerator-Tg2NjhsD.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-react-query/dist/SuspenseQuery-BJRjCVPn.js","../../../../../plugin-react-query/dist/suspenseQueryGenerator-X-e7npGw.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-solid-query/dist/Query-D_dWu7Ln.js","../../../../../plugin-solid-query/dist/queryGenerator-fZ_tgape.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-svelte-query/dist/Query-BDLjTz45.js","../../../../../plugin-svelte-query/dist/queryGenerator-C19QRAQW.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk-DKWOrOAv.js","../../../../../plugin-swr/dist/Query-DDIFmxNc.js","../../../../../plugin-swr/dist/queryGenerator-96wr4Uxr.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-vue-query/dist/Query-DVuOyLhX.js","../../../../../plugin-vue-query/dist/queryGenerator-CHpHlXsx.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.6/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.6/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.6/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.6/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","process","_a","readFile","writeFile","value","_head","_tail","_size","_options","_b","Node","__publicField","Queue","__privateAdd","__privateGet","__privateSet","__privateWrapper","pLimit","validateConcurrency","path","__privateMethod","performance","_c","_d","_e","_f","item","trimExtName","version","build","os","error","__defProp","__name","v","d","b","__assign","o","exports","Kind","YAMLException","string","ScalarType","Comments","isPlainObject","fs","parse","schema","schemas","transformers","normalizedSchema","name","min","max","getParams$1","Function","getParams","Operations","validate","oas","options","Type","siblings","require","global","modifiers","questionToken","propertyName","operationsGenerator","source","baseURL","source$2","Response","getTransformer$1","QueryKey","getParams$9","QueryOptions","getParams$8","InfiniteQuery","getParams$7","InfiniteQueryOptions","getParams$6","getTransformer","MutationKey","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","params","generics","index","maskedSessionKey","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,60,113,114,115,116]}
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.7/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.7/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.7/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.7/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.7/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.7/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.7/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.7/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.7/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.7/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.7/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../server/utils/maskedString.ts","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../core/dist/write-pEo2oQGI.js","../../../../../core/dist/toRegExp-DdJ1Kgbf.js","../../../../../core/dist/packageManager-B6NiaZeW.js","../../../../../core/dist/utils.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../../core/dist/index.js","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk-DKWOrOAv.js","../../../../../plugin-oas/dist/SchemaMapper-eQhTeFim.js","../../../../../core/dist/transformers.js","../../../../../oas/dist/chunk-Dxrv8gPv.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/resolveServerUrl-D-P-Dovy.js","../../../../../plugin-oas/dist/getFooter-_DD1dfMI.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-DGIMTS_f.js","../../../../../plugin-oas/dist/jsonGenerator-Df2dxdof.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/Zod-GzH2I46C.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/Type-kXKUz-Sn.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-nOUZk0S4.js","../../../../../plugin-zod/dist/zodGenerator--tgD2hL9.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/staticClassClientGenerator-BUGBMkNO.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/Request-DOzOQGgb.js","../../../../../plugin-cypress/dist/cypressGenerator-D7trA-II.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/Faker-eDce4Xeu.js","../../../../../plugin-faker/dist/fakerGenerator-C68x1Nq-.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-D45Pl-Hd.js","../../../../../plugin-mcp/dist/serverGenerator-TERvEwnw.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/Response-rq32ZXGn.js","../../../../../plugin-msw/dist/mswGenerator-Tg2NjhsD.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-react-query/dist/SuspenseQuery-BJRjCVPn.js","../../../../../plugin-react-query/dist/suspenseQueryGenerator-X-e7npGw.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-solid-query/dist/Query-D_dWu7Ln.js","../../../../../plugin-solid-query/dist/queryGenerator-fZ_tgape.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-svelte-query/dist/Query-BDLjTz45.js","../../../../../plugin-svelte-query/dist/queryGenerator-C19QRAQW.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk-DKWOrOAv.js","../../../../../plugin-swr/dist/Query-DDIFmxNc.js","../../../../../plugin-swr/dist/queryGenerator-96wr4Uxr.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk-DKWOrOAv.js","../../../../../plugin-vue-query/dist/Query-DVuOyLhX.js","../../../../../plugin-vue-query/dist/queryGenerator-CHpHlXsx.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.7/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.7/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.7/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.7/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","process","readFile","writeFile","value","_head","_tail","_size","_a","_options","_b","Node","__publicField","Queue","__privateAdd","__privateGet","__privateSet","__privateWrapper","pLimit","validateConcurrency","path","__privateMethod","performance","_c","_d","_e","_f","item","trimExtName","version","build","os","error","__defProp","__name","v","d","b","__assign","o","exports","Kind","YAMLException","string","ScalarType","Comments","isPlainObject","fs","parse","schema","schemas","transformers","normalizedSchema","name","min","max","getParams$1","Function","getParams","Operations","validate","oas","options","Type","siblings","require","global","modifiers","questionToken","propertyName","operationsGenerator","source","baseURL","source$2","Response","getTransformer$1","QueryKey","getParams$9","QueryOptions","getParams$8","InfiniteQuery","getParams$7","InfiniteQueryOptions","getParams$6","getTransformer","MutationKey","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","params","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,60,113,114,115,116]}