@kubb/agent 4.31.4 → 4.31.6

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-04T09:04:07.426Z",
2
+ "date": "2026-03-05T20:04:22.112Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -4524,14 +4524,17 @@ async function saveStudioConfigToStorage({ sessionKey, config }) {
4524
4524
  await storage.setItem(sessionKey, { ...agentSession, configs: [...agentSession.configs, { config, storedAt: (/* @__PURE__ */ new Date()).toISOString() }] });
4525
4525
  }
4526
4526
 
4527
- var _a$5;
4528
4527
  function generateToken() {
4529
4528
  return randomBytes(32).toString("hex");
4530
4529
  }
4531
4530
  function hashToken(input) {
4532
4531
  return createHash("sha256").update(input).digest("hex");
4533
4532
  }
4534
- const machineToken = hashToken((_a$5 = process.env.KUBB_AGENT_SECRET) != null ? _a$5 : generateToken());
4533
+ const _fallbackSecret = generateToken();
4534
+ function getMachineToken() {
4535
+ var _a;
4536
+ return hashToken((_a = process.env.KUBB_AGENT_SECRET) != null ? _a : _fallbackSecret);
4537
+ }
4535
4538
 
4536
4539
  async function createAgentSession({ token, studioUrl, noCache, cacheKey }) {
4537
4540
  const sessionKey = cacheKey != null ? cacheKey : getSessionKey(token);
@@ -4551,7 +4554,7 @@ async function createAgentSession({ token, studioUrl, noCache, cacheKey }) {
4551
4554
  const data = await $fetch(connectUrl, {
4552
4555
  method: "POST",
4553
4556
  headers: { Authorization: `Bearer ${token}` },
4554
- body: { machineToken }
4557
+ body: { machineToken: getMachineToken() }
4555
4558
  });
4556
4559
  if (!data) {
4557
4560
  throw new Error("No data available for agent session");
@@ -4576,7 +4579,7 @@ async function registerAgent({ token, studioUrl, poolSize }) {
4576
4579
  headers: {
4577
4580
  Authorization: `Bearer ${token}`
4578
4581
  },
4579
- body: { machineToken, poolSize }
4582
+ body: { machineToken: getMachineToken(), poolSize }
4580
4583
  });
4581
4584
  logger.success(`Agent registered with Studio with token ${maskedString(token)}`);
4582
4585
  } catch (error) {
@@ -6073,7 +6076,7 @@ function tokenize(command) {
6073
6076
  return args;
6074
6077
  }
6075
6078
 
6076
- var version = "4.31.4";
6079
+ var version = "4.31.6";
6077
6080
 
6078
6081
  function isCommandMessage(msg) {
6079
6082
  return msg.type === "command";
@@ -6121,7 +6124,7 @@ var BaseGenerator = (_a$3 = class {
6121
6124
  function isInputPath(config) {
6122
6125
  return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
6123
6126
  }
6124
- var version$1 = "4.31.4";
6127
+ var version$1 = "4.31.6";
6125
6128
  function getDiagnosticInfo() {
6126
6129
  return {
6127
6130
  nodeVersion: version$2,
@@ -12582,8 +12585,13 @@ parseSchemaObject_fn = function({ schema: _schemaObject, name, parentName, rootN
12582
12585
  const schemaTasks = schemaEntries.map(([name, schemaObject]) => schemaLimit(async () => {
12583
12586
  var _a2, _b2;
12584
12587
  const options = __privateMethod$1(this, _SchemaGenerator_instances, getOptions_fn).call(this, name);
12588
+ let resolvedSchemaObject = schemaObject;
12589
+ if (isReference(schemaObject)) {
12590
+ const resolved = this.context.oas.get(schemaObject.$ref);
12591
+ if (resolved && !isReference(resolved)) resolvedSchemaObject = resolved;
12592
+ }
12585
12593
  const tree = this.parse({
12586
- schema: schemaObject,
12594
+ schema: resolvedSchemaObject,
12587
12595
  name,
12588
12596
  parentName: null,
12589
12597
  rootName: name
@@ -12591,7 +12599,7 @@ parseSchemaObject_fn = function({ schema: _schemaObject, name, parentName, rootN
12591
12599
  if (generator.type === "react") {
12592
12600
  await buildSchema({
12593
12601
  name,
12594
- value: schemaObject,
12602
+ value: resolvedSchemaObject,
12595
12603
  tree
12596
12604
  }, {
12597
12605
  config: this.context.pluginManager.config,
@@ -12613,7 +12621,7 @@ parseSchemaObject_fn = function({ schema: _schemaObject, name, parentName, rootN
12613
12621
  generator: this,
12614
12622
  schema: {
12615
12623
  name,
12616
- value: schemaObject,
12624
+ value: resolvedSchemaObject,
12617
12625
  tree
12618
12626
  },
12619
12627
  plugin: {
@@ -212414,6 +212422,7 @@ function createEnumDeclaration({ type = "enum", name, typeName, enums, enumKeyCa
212414
212422
  }
212415
212423
  }).filter(Boolean))];
212416
212424
  const identifierName = name;
212425
+ if (enums.length === 0) return [void 0, factory.createTypeAliasDeclaration([factory.createToken(ts.SyntaxKind.ExportKeyword)], factory.createIdentifier(typeName), void 0, factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword))];
212417
212426
  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]) => {
212418
212427
  let initializer = factory.createStringLiteral(value == null ? void 0 : value.toString());
212419
212428
  if (isNumber(value)) if (value < 0) initializer = factory.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, factory.createNumericLiteral(Math.abs(value)));
@@ -213624,6 +213633,7 @@ const zodGenerator = createReactGenerator({
213624
213633
  }),
213625
213634
  typed && version === "3" && /* @__PURE__ */ jsx(File.Import, {
213626
213635
  name: ["ToZod"],
213636
+ isTypeOnly: true,
213627
213637
  root: file.path,
213628
213638
  path: path$2.resolve(config.root, config.output.path, ".kubb/ToZod.ts")
213629
213639
  }),
@@ -215139,6 +215149,7 @@ function Faker({ tree, description, name, typeName, seed, regexGenerator, canOve
215139
215149
  dateParser
215140
215150
  })).filter(Boolean));
215141
215151
  const isArray = fakerText.startsWith("faker.helpers.arrayElements") || fakerText.startsWith("faker.helpers.multiple");
215152
+ const isRefToArray = tree.some((s) => isKeyword(s, schemaKeywords.schema) && s.args.type === "array");
215142
215153
  const isObject = fakerText.startsWith("{");
215143
215154
  const isTuple = fakerText.startsWith("faker.helpers.arrayElement");
215144
215155
  const isSimpleString = name === "string";
@@ -215159,6 +215170,7 @@ function Faker({ tree, description, name, typeName, seed, regexGenerator, canOve
215159
215170
  if (canOverride && isSimpleFloat) fakerTextWithOverride = "data ?? faker.number.float()";
215160
215171
  let type = `Partial<${typeName}>`;
215161
215172
  if (isArray) type = typeName;
215173
+ if (isRefToArray) type = typeName;
215162
215174
  if (isSimpleString) type = name;
215163
215175
  if (isSimpleInt || isSimpleFloat) type = "number";
215164
215176
  const params = FunctionParams.factory({ data: {
@@ -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-CJhU4lwJ.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/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-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","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]}
@@ -42,6 +42,8 @@ const defaultOptions = {
42
42
  sendLogsToBetterStack: true,
43
43
  // Function to be used to calculate size of logs in bytes (to evaluate batchSizeLimitKiB)
44
44
  calculateLogSizeBytes: tools_1.calculateJsonLogSizeBytes,
45
+ // If true, stack context (file, line, method) will be captured on each log entry
46
+ captureStackContext: true,
45
47
  };
46
48
  /**
47
49
  * Logtail core class for logging to the Better Stack service
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtail/core",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Better Stack logging core (formerly Logtail)",
5
5
  "keywords": [
6
6
  "Better Stack",
@@ -37,9 +37,9 @@
37
37
  "url": "https://github.com/logtail/logtail-js/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@logtail/tools": "^0.5.6",
41
- "@logtail/types": "^0.5.6",
40
+ "@logtail/tools": "^0.5.8",
41
+ "@logtail/types": "^0.5.8",
42
42
  "serialize-error": "8.1.0"
43
43
  },
44
- "gitHead": "6901c2b90af7cf9dda3e7c8be7c145d4d83e72a8"
44
+ "gitHead": "0f816cacc21b352576a5707741f9151aa1481041"
45
45
  }
@@ -67,8 +67,10 @@ class Node extends core_1.Base {
67
67
  * @returns Promise<ILogtailLog> after syncing
68
68
  */
69
69
  async log(message, level, context = {}, stackContextHint) {
70
- // Process/sync the log, per `Base` logic
71
- context = Object.assign(Object.assign({}, (0, context_1.getStackContext)(this, stackContextHint)), context);
70
+ // Only capture stack context if enabled (default: true)
71
+ if (this._options.captureStackContext !== false) {
72
+ context = Object.assign(Object.assign({}, (0, context_1.getStackContext)(this, stackContextHint)), context);
73
+ }
72
74
  const processedLog = await super.log(message, level, context);
73
75
  // Push the processed log to the stream, for piping
74
76
  if (this._writeStream) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtail/node",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Better Stack Node.js logger (formerly Logtail)",
5
5
  "keywords": [
6
6
  "Better Stack",
@@ -42,12 +42,12 @@
42
42
  "nock": "^14.0.1"
43
43
  },
44
44
  "dependencies": {
45
- "@logtail/core": "^0.5.6",
46
- "@logtail/types": "^0.5.6",
45
+ "@logtail/core": "^0.5.8",
46
+ "@logtail/types": "^0.5.8",
47
47
  "@msgpack/msgpack": "^2.5.1",
48
48
  "@types/stack-trace": "^0.0.33",
49
49
  "minimatch": "^9.0.5",
50
50
  "stack-trace": "0.0.10"
51
51
  },
52
- "gitHead": "6901c2b90af7cf9dda3e7c8be7c145d4d83e72a8"
52
+ "gitHead": "0f816cacc21b352576a5707741f9151aa1481041"
53
53
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtail/tools",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Better Stack JavaScript logging tools (formerly Logtail)",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es6/index.js",
@@ -33,7 +33,7 @@
33
33
  "nock": "^14.0.1"
34
34
  },
35
35
  "dependencies": {
36
- "@logtail/types": "^0.5.6"
36
+ "@logtail/types": "^0.5.8"
37
37
  },
38
- "gitHead": "6901c2b90af7cf9dda3e7c8be7c145d4d83e72a8"
38
+ "gitHead": "0f816cacc21b352576a5707741f9151aa1481041"
39
39
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtail/types",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Better Stack Typescript types (formerly Logtail)",
5
5
  "keywords": [
6
6
  "Better Stack",
@@ -41,5 +41,5 @@
41
41
  "devDependencies": {
42
42
  "npm-run-all": "^4.1.5"
43
43
  },
44
- "gitHead": "6901c2b90af7cf9dda3e7c8be7c145d4d83e72a8"
44
+ "gitHead": "0f816cacc21b352576a5707741f9151aa1481041"
45
45
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent-prod",
3
- "version": "4.31.4",
3
+ "version": "4.31.6",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -13,10 +13,10 @@
13
13
  "@humanwhocodes/momoa": "2.0.4",
14
14
  "@kubb/fabric-core": "0.13.3",
15
15
  "@kubb/react-fabric": "0.13.3",
16
- "@logtail/core": "0.5.6",
17
- "@logtail/node": "0.5.6",
18
- "@logtail/tools": "0.5.6",
19
- "@logtail/types": "0.5.6",
16
+ "@logtail/core": "0.5.8",
17
+ "@logtail/node": "0.5.8",
18
+ "@logtail/tools": "0.5.8",
19
+ "@logtail/types": "0.5.8",
20
20
  "@msgpack/msgpack": "2.8.0",
21
21
  "@readme/better-ajv-errors": "2.4.0",
22
22
  "@readme/http-status-codes": "7.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/agent",
3
- "version": "4.31.4",
3
+ "version": "4.31.6",
4
4
  "description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
5
5
  "keywords": [
6
6
  "agent",
@@ -33,28 +33,28 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@kubb/fabric-core": "0.13.3",
36
- "@logtail/node": "^0.5.6",
36
+ "@logtail/node": "^0.5.8",
37
37
  "consola": "^3.4.2",
38
38
  "jiti": "2.5.1",
39
39
  "remeda": "^2.33.6",
40
40
  "tinyexec": "^1.0.2",
41
41
  "unstorage": "^1.17.4",
42
42
  "ws": "^8.19.0",
43
- "@kubb/core": "4.31.4",
44
- "@kubb/plugin-client": "4.31.4",
45
- "@kubb/plugin-cypress": "4.31.4",
46
- "@kubb/plugin-faker": "4.31.4",
47
- "@kubb/plugin-mcp": "4.31.4",
48
- "@kubb/plugin-msw": "4.31.4",
49
- "@kubb/plugin-oas": "4.31.4",
50
- "@kubb/plugin-react-query": "4.31.4",
51
- "@kubb/plugin-redoc": "4.31.4",
52
- "@kubb/plugin-solid-query": "4.31.4",
53
- "@kubb/plugin-svelte-query": "4.31.4",
54
- "@kubb/plugin-swr": "4.31.4",
55
- "@kubb/plugin-ts": "4.31.4",
56
- "@kubb/plugin-vue-query": "4.31.4",
57
- "@kubb/plugin-zod": "4.31.4"
43
+ "@kubb/core": "4.31.6",
44
+ "@kubb/plugin-client": "4.31.6",
45
+ "@kubb/plugin-cypress": "4.31.6",
46
+ "@kubb/plugin-faker": "4.31.6",
47
+ "@kubb/plugin-mcp": "4.31.6",
48
+ "@kubb/plugin-msw": "4.31.6",
49
+ "@kubb/plugin-oas": "4.31.6",
50
+ "@kubb/plugin-react-query": "4.31.6",
51
+ "@kubb/plugin-redoc": "4.31.6",
52
+ "@kubb/plugin-solid-query": "4.31.6",
53
+ "@kubb/plugin-svelte-query": "4.31.6",
54
+ "@kubb/plugin-swr": "4.31.6",
55
+ "@kubb/plugin-ts": "4.31.6",
56
+ "@kubb/plugin-vue-query": "4.31.6",
57
+ "@kubb/plugin-zod": "4.31.6"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/ws": "^8.18.1",