@sentry/server-utils 11.21.0 → 11.23.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.
Files changed (261) hide show
  1. package/build/THIRD-PARTY-LICENSES.txt +10 -10
  2. package/build/cjs/chunks/config.js +4 -2
  3. package/build/cjs/chunks/config.js.map +1 -1
  4. package/build/cjs/chunks/core.js +0 -1
  5. package/build/cjs/chunks/exports.js +76 -28
  6. package/build/cjs/chunks/exports.js.map +1 -1
  7. package/build/cjs/chunks/module-details-from-path.js +427 -428
  8. package/build/cjs/chunks/module-details-from-path.js.map +1 -1
  9. package/build/cjs/chunks/moduleInjectedTransform.js +419 -421
  10. package/build/cjs/chunks/moduleInjectedTransform.js.map +1 -1
  11. package/build/cjs/chunks/rolldown-runtime.js +8 -6
  12. package/build/cjs/index.js +95 -41
  13. package/build/cjs/index.js.map +1 -1
  14. package/build/cjs/index.request-handler.js +2 -2
  15. package/build/cjs/orchestrion/bundler/bun.js +1 -1
  16. package/build/cjs/orchestrion/bundler/esbuild.js +1 -1
  17. package/build/cjs/orchestrion/bundler/rollup.js +1 -1
  18. package/build/cjs/orchestrion/bundler/vite.js +2 -2
  19. package/build/cjs/orchestrion/bundler/webpack-loader.js +2 -2
  20. package/build/cjs/orchestrion/bundler/webpack.js +4 -4
  21. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/defineProperty.js +1 -1
  22. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/assertClassBrand.js +1 -1
  23. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/checkPrivateRedeclaration.js +1 -1
  24. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/classPrivateFieldGet2.js +1 -1
  25. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/classPrivateFieldInitSpec.js +1 -1
  26. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/classPrivateFieldSet2.js +1 -1
  27. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/classPrivateMethodInitSpec.js +1 -1
  28. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/defineProperty.js +1 -1
  29. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/toPrimitive.js +1 -1
  30. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/toPropertyKey.js +1 -1
  31. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/esm/typeof.js +1 -1
  32. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/toPrimitive.js +1 -1
  33. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/toPropertyKey.js +1 -1
  34. package/build/esm/_virtual/{_@oxc-project_runtime@0.158.0 → _@oxc-project_runtime@0.160.0}/helpers/typeof.js +1 -1
  35. package/build/esm/_virtual/_rolldown/runtime.js +8 -6
  36. package/build/esm/ai/anthropic-ai/index.js +2 -2
  37. package/build/esm/ai/anthropic-ai/streaming.js +11 -2
  38. package/build/esm/ai/anthropic-ai/streaming.js.map +1 -1
  39. package/build/esm/ai/anthropic-ai/tool-runner.js +3 -3
  40. package/build/esm/ai/anthropic-ai/utils.js +2 -2
  41. package/build/esm/ai/core/span-hooks.js +1 -1
  42. package/build/esm/ai/core/time-to-first-chunk.js +1 -1
  43. package/build/esm/ai/core/utils.js +2 -2
  44. package/build/esm/ai/flue/index.js +2 -2
  45. package/build/esm/ai/flue/utils.js +2 -2
  46. package/build/esm/ai/google-genai/decisions.js +1 -1
  47. package/build/esm/ai/google-genai/index.js +2 -2
  48. package/build/esm/ai/google-genai/streaming.js +9 -2
  49. package/build/esm/ai/google-genai/streaming.js.map +1 -1
  50. package/build/esm/ai/google-genai/utils.js +1 -1
  51. package/build/esm/ai/langchain/embeddings.js +3 -3
  52. package/build/esm/ai/langchain/index.js +15 -9
  53. package/build/esm/ai/langchain/index.js.map +1 -1
  54. package/build/esm/ai/langchain/typesafe-classifier.js +2 -2
  55. package/build/esm/ai/langchain/utils.js +3 -4
  56. package/build/esm/ai/langchain/utils.js.map +1 -1
  57. package/build/esm/ai/langgraph/agent-span.js +3 -3
  58. package/build/esm/ai/langgraph/index.js +1 -1
  59. package/build/esm/ai/langgraph/stream.js +2 -2
  60. package/build/esm/ai/langgraph/utils.js +3 -3
  61. package/build/esm/ai/mastra/index.js +2 -2
  62. package/build/esm/ai/mastra/span-registry.js +1 -1
  63. package/build/esm/ai/mastra/utils.js +2 -2
  64. package/build/esm/ai/mistral/index.js +2 -2
  65. package/build/esm/ai/mistral/streaming.js +18 -9
  66. package/build/esm/ai/mistral/streaming.js.map +1 -1
  67. package/build/esm/ai/openai/index.js +2 -2
  68. package/build/esm/ai/openai/mapping.js +1 -1
  69. package/build/esm/ai/openai/streaming.js +15 -2
  70. package/build/esm/ai/openai/streaming.js.map +1 -1
  71. package/build/esm/ai/openai/utils.js +2 -2
  72. package/build/esm/ai/pi-ai/chat.js +12 -4
  73. package/build/esm/ai/pi-ai/chat.js.map +1 -1
  74. package/build/esm/ai/pi-ai/providers.js +1 -1
  75. package/build/esm/ai/pi-ai/recording.js +1 -1
  76. package/build/esm/ai/pi-durable/index.js +2 -2
  77. package/build/esm/ai/pi-durable/runs.js +3 -3
  78. package/build/esm/ai/pi-durable/tools.js +3 -3
  79. package/build/esm/ai/tanstack-ai/index.js +2 -2
  80. package/build/esm/ai/tanstack-ai/utils.js +2 -2
  81. package/build/esm/ai/typesafe/index.js +3 -3
  82. package/build/esm/ai/workers-ai/index.js +2 -2
  83. package/build/esm/ai/workers-ai/streaming.js +7 -5
  84. package/build/esm/ai/workers-ai/streaming.js.map +1 -1
  85. package/build/esm/ai/workers-ai/utils.js +7 -4
  86. package/build/esm/ai/workers-ai/utils.js.map +1 -1
  87. package/build/esm/async-context.js +1 -1
  88. package/build/esm/cron/common.js +1 -1
  89. package/build/esm/cron/cron.js +1 -1
  90. package/build/esm/cron/node-cron.js +1 -1
  91. package/build/esm/cron/node-schedule.js +1 -1
  92. package/build/esm/eve.js +1 -1
  93. package/build/esm/integrations/amqplib.js +3 -3
  94. package/build/esm/integrations/anthropic.js +3 -4
  95. package/build/esm/integrations/anthropic.js.map +1 -1
  96. package/build/esm/integrations/aws-sdk/index.js +3 -3
  97. package/build/esm/integrations/aws-sdk/services/MessageAttributes.js +1 -1
  98. package/build/esm/integrations/aws-sdk/services/bedrock-runtime-content.js +2 -2
  99. package/build/esm/integrations/aws-sdk/services/bedrock-runtime.js +3 -3
  100. package/build/esm/integrations/aws-sdk/services/dynamodb.js +1 -1
  101. package/build/esm/integrations/aws-sdk/services/lambda.js +2 -2
  102. package/build/esm/integrations/aws-sdk/services/sns.js +3 -3
  103. package/build/esm/integrations/aws-sdk/services/sqs.js +2 -2
  104. package/build/esm/integrations/bullmq/meter.js +2 -2
  105. package/build/esm/integrations/bullmq/tracer.js +2 -2
  106. package/build/esm/integrations/clickhouse.js +3 -3
  107. package/build/esm/integrations/cron.js +1 -1
  108. package/build/esm/integrations/dataloader.js +3 -3
  109. package/build/esm/integrations/express/error-handler.js +1 -1
  110. package/build/esm/integrations/express/index.js +1 -1
  111. package/build/esm/integrations/express/instrumentation.js +3 -3
  112. package/build/esm/integrations/fastify/errors.js +1 -1
  113. package/build/esm/integrations/fastify/index.js +1 -1
  114. package/build/esm/integrations/fastify/instrumentation.js +8 -4
  115. package/build/esm/integrations/fastify/instrumentation.js.map +1 -1
  116. package/build/esm/integrations/firebase/firestore.js +2 -2
  117. package/build/esm/integrations/firebase/functions.js +1 -1
  118. package/build/esm/integrations/firebase/index.js +1 -1
  119. package/build/esm/integrations/flue.js +1 -1
  120. package/build/esm/integrations/generic-pool.js +3 -3
  121. package/build/esm/integrations/google-genai.js +2 -2
  122. package/build/esm/integrations/graphql/graphql-dc-subscriber.js +3 -3
  123. package/build/esm/integrations/graphql/index.js +1 -1
  124. package/build/esm/integrations/graphql/resolvers.js +2 -2
  125. package/build/esm/integrations/graphql/spans.js +3 -3
  126. package/build/esm/integrations/groq.js +1 -1
  127. package/build/esm/integrations/hapi/hapi-error-handler.js +1 -1
  128. package/build/esm/integrations/hapi/hapi-utils.js +4 -5
  129. package/build/esm/integrations/hapi/hapi-utils.js.map +1 -1
  130. package/build/esm/integrations/hapi/index.js +1 -1
  131. package/build/esm/integrations/hono/applyPatches.js +1 -1
  132. package/build/esm/integrations/hono/createHonoMiddleware.js +1 -1
  133. package/build/esm/integrations/hono/honoIntegration.js +3 -3
  134. package/build/esm/integrations/hono/matchResult.js +1 -1
  135. package/build/esm/integrations/hono/middlewareHandlers.js +2 -2
  136. package/build/esm/integrations/hono/patchAppRequest.js +3 -3
  137. package/build/esm/integrations/hono/patchAppUse.js +1 -1
  138. package/build/esm/integrations/hono/patchRoute.js +1 -1
  139. package/build/esm/integrations/hono/wrapMiddlewareSpan.js +3 -3
  140. package/build/esm/integrations/kafkajs/consumer.js +2 -2
  141. package/build/esm/integrations/kafkajs/index.js +1 -1
  142. package/build/esm/integrations/kafkajs/spans.js +2 -2
  143. package/build/esm/integrations/knex.js +3 -3
  144. package/build/esm/integrations/koa/index.js +3 -3
  145. package/build/esm/integrations/langchain.js +1 -1
  146. package/build/esm/integrations/langgraph.js +1 -1
  147. package/build/esm/integrations/lru-memoizer.js +1 -1
  148. package/build/esm/integrations/mastra-classifier.js +2 -2
  149. package/build/esm/integrations/mastra.js +4 -4
  150. package/build/esm/integrations/mcp-server.js +2 -2
  151. package/build/esm/integrations/mistral.js +2 -2
  152. package/build/esm/integrations/mongodb/index.js +1 -1
  153. package/build/esm/integrations/mongodb/mongodb-span.js +1 -1
  154. package/build/esm/integrations/mongoose/index.js +1 -1
  155. package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js +3 -3
  156. package/build/esm/integrations/mongoose/mongoose-legacy-span.js +1 -1
  157. package/build/esm/integrations/mysql.js +3 -3
  158. package/build/esm/integrations/mysql2/index.js +1 -1
  159. package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js +3 -3
  160. package/build/esm/integrations/neon.js +13 -5
  161. package/build/esm/integrations/neon.js.map +1 -1
  162. package/build/esm/integrations/nitro/captureStorageEvents.js +3 -3
  163. package/build/esm/integrations/nitro/captureTracingEvents.js +3 -3
  164. package/build/esm/integrations/nitro/index.js +1 -1
  165. package/build/esm/integrations/nitro/setServerTimingHeaders.js +1 -1
  166. package/build/esm/integrations/node-cron.js +1 -1
  167. package/build/esm/integrations/node-schedule.js +1 -1
  168. package/build/esm/integrations/openai-compatible.js +2 -2
  169. package/build/esm/integrations/openai.js +2 -2
  170. package/build/esm/integrations/pg.js +43 -16
  171. package/build/esm/integrations/pg.js.map +1 -1
  172. package/build/esm/integrations/pi-ai.js +1 -1
  173. package/build/esm/integrations/pi-durable.js +1 -1
  174. package/build/esm/integrations/pino.js +1 -1
  175. package/build/esm/integrations/pino.js.map +1 -1
  176. package/build/esm/integrations/postgresjs/index.js +3 -3
  177. package/build/esm/integrations/postgresjs/postgresjs-dc-subscriber.js +3 -3
  178. package/build/esm/integrations/postgresjs-wrapper.js +1 -1
  179. package/build/esm/integrations/prisma/index.js +1 -1
  180. package/build/esm/integrations/prisma/orchestrion.js +8 -12
  181. package/build/esm/integrations/prisma/orchestrion.js.map +1 -1
  182. package/build/esm/integrations/prisma/tracing-helper.js +2 -2
  183. package/build/esm/integrations/redis/index.js +3 -3
  184. package/build/esm/integrations/redis/ioredis-channel-subscriber.js +3 -3
  185. package/build/esm/integrations/redis/redis-cache.js +1 -1
  186. package/build/esm/integrations/redis/redis-dc-subscriber.js +3 -3
  187. package/build/esm/integrations/serveTunnel.js +2 -2
  188. package/build/esm/integrations/tanstack-ai.js +1 -1
  189. package/build/esm/integrations/tedious.js +4 -4
  190. package/build/esm/integrations/together-ai.js +1 -1
  191. package/build/esm/integrations/typesafe.js +1 -1
  192. package/build/esm/integrations/vercel-ai/extract.js +2 -3
  193. package/build/esm/integrations/vercel-ai/extract.js.map +1 -1
  194. package/build/esm/integrations/vercel-ai/index.js +1 -1
  195. package/build/esm/integrations/vercel-ai/util.js +21 -2
  196. package/build/esm/integrations/vercel-ai/util.js.map +1 -1
  197. package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +3 -3
  198. package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +1 -1
  199. package/build/esm/integrations/vercel-ai/vercel-ai-tool-telemetry.js +3 -3
  200. package/build/esm/integrations/winston.js +1 -1
  201. package/build/esm/opentelemetry.js +1 -1
  202. package/build/esm/orchestrion/bundler/esbuild.js +1 -1
  203. package/build/esm/orchestrion/bundler/externalRequire.js +1 -1
  204. package/build/esm/orchestrion/bundler/rollup.js +1 -1
  205. package/build/esm/orchestrion/bundler/webpack-loader.js +1 -1
  206. package/build/esm/orchestrion/bundler/webpack.js +1 -1
  207. package/build/esm/orchestrion/config/index.js +1 -1
  208. package/build/esm/orchestrion/config/mistral.js +1 -1
  209. package/build/esm/orchestrion/config/mistral.js.map +1 -1
  210. package/build/esm/orchestrion/config/prisma.js +2 -0
  211. package/build/esm/orchestrion/config/prisma.js.map +1 -1
  212. package/build/esm/orchestrion/detect.js +1 -1
  213. package/build/esm/orchestrion/instrumentation.js +1 -1
  214. package/build/esm/package.json +1 -1
  215. package/build/esm/tracing-channel.js +1 -2
  216. package/build/esm/tracing-channel.js.map +1 -1
  217. package/build/esm/utils/cronMonitoring.js +1 -1
  218. package/build/esm/utils/diagnosticsChannel.js +1 -1
  219. package/build/esm/utils/module.js +2 -2
  220. package/build/esm/utils/module.js.map +1 -1
  221. package/build/esm/utils/monitorStream.js +1 -1
  222. package/build/esm/utils/serverTimingTraceHeader.js +1 -1
  223. package/build/esm/utils/tunnelServer.js +1 -1
  224. package/build/esm/utils/wrapServerRequestHandler.js +4 -4
  225. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js +3 -3
  226. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js +5 -5
  227. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-BiWIBBjf.js +1 -1
  228. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +1 -1
  229. package/build/esm/vendored/esquery/dist/esquery.min.js +1 -0
  230. package/build/esm/vendored/esquery/dist/esquery.min.js.map +1 -1
  231. package/build/esm/vendored/meriyah/dist/meriyah.js +416 -418
  232. package/build/esm/vendored/meriyah/dist/meriyah.js.map +1 -1
  233. package/build/esm/vendored/meriyah/dist/meriyah2.js +416 -418
  234. package/build/esm/vendored/meriyah/dist/meriyah2.js.map +1 -1
  235. package/build/esm/vendored/source-map/lib/base64-vlq.js +1 -1
  236. package/build/esm/vendored/source-map/lib/base64-vlq.js.map +1 -1
  237. package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -1
  238. package/build/types/ai/anthropic-ai/types.d.ts +1 -0
  239. package/build/types/ai/anthropic-ai/types.d.ts.map +1 -1
  240. package/build/types/ai/google-genai/streaming.d.ts.map +1 -1
  241. package/build/types/ai/langchain/index.d.ts.map +1 -1
  242. package/build/types/ai/mistral/streaming.d.ts.map +1 -1
  243. package/build/types/ai/openai/streaming.d.ts.map +1 -1
  244. package/build/types/ai/pi-ai/chat.d.ts.map +1 -1
  245. package/build/types/ai/workers-ai/streaming.d.ts.map +1 -1
  246. package/build/types/ai/workers-ai/utils.d.ts.map +1 -1
  247. package/build/types/integrations/fastify/instrumentation.d.ts.map +1 -1
  248. package/build/types/integrations/neon.d.ts.map +1 -1
  249. package/build/types/integrations/pg.d.ts +6 -1
  250. package/build/types/integrations/pg.d.ts.map +1 -1
  251. package/build/types/integrations/pino.d.ts.map +1 -1
  252. package/build/types/integrations/vercel-ai/extract.d.ts +2 -5
  253. package/build/types/integrations/vercel-ai/extract.d.ts.map +1 -1
  254. package/build/types/integrations/vercel-ai/util.d.ts.map +1 -1
  255. package/build/types/orchestrion/channels.d.ts +1 -0
  256. package/build/types/orchestrion/channels.d.ts.map +1 -1
  257. package/build/types/orchestrion/config/mistral.d.ts +3 -3
  258. package/build/types/orchestrion/config/prisma.d.ts +2 -1
  259. package/build/types/orchestrion/config/prisma.d.ts.map +1 -1
  260. package/build/types/tracing-channel.d.ts.map +1 -1
  261. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import { isPlainObject } from "@sentry/core";
2
+ import { readFileSync } from "node:fs";
2
3
  import { createRequire, isBuiltin } from "node:module";
3
4
  import { isAbsolute } from "node:path";
4
- import { readFileSync } from "node:fs";
5
5
  // src/orchestrion/bundler/externalRequire.ts
6
6
  const NODE_MODULES = "/node_modules/";
7
7
  /**
@@ -1,9 +1,9 @@
1
+ import { isBuiltin } from "node:module";
1
2
  import "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup.js";
2
3
  import { t as codeTransformerRollup } from "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-CzqrjlS4.js";
3
4
  import { instrumentedModuleNames } from "../config/index.js";
4
5
  import { externalEntryMatchesModule, externalizedModulesWarning, orchestrionTransformOptions } from "./options.js";
5
6
  import { resolveOrchestrionRuntimeRequest } from "./resolve.js";
6
- import { isBuiltin } from "node:module";
7
7
  // src/orchestrion/bundler/rollup.ts
8
8
  /**
9
9
  * Whether a raw (un-normalized) `external` input option marks `name` as
@@ -1,6 +1,6 @@
1
1
  import { createLoader } from "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js";
2
- import { moduleInjectedTransforms } from "./moduleInjectedTransform.js";
3
2
  import { dirname, relative } from "node:path";
3
+ import { moduleInjectedTransforms } from "./moduleInjectedTransform.js";
4
4
  // src/orchestrion/bundler/webpack-loader.ts
5
5
  let currentImportSpecifier;
6
6
  const factoryLoader = createLoader({ customTransforms: moduleInjectedTransforms(() => currentImportSpecifier) });
@@ -1,10 +1,10 @@
1
+ import { SDK_VERSION } from "@sentry/core";
1
2
  import { SENTRY_INSTRUMENTATIONS, instrumentedModuleNames } from "../config/index.js";
2
3
  import codeTransformerWebpack from "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js";
3
4
  import { SNIPPET_IMPORT_SPECIFIER, getOrchestrionLoaderPath, resolveOrchestrionRuntimeRequest } from "./resolve.js";
4
5
  import { n as serializeInstrumentations$1 } from "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js";
5
6
  import "../../vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core.js";
6
7
  import { externalEntryMatchesModule, externalizedModulesWarning, orchestrionTransformOptions } from "./options.js";
7
- import { SDK_VERSION } from "@sentry/core";
8
8
  // src/orchestrion/bundler/webpack.ts
9
9
  const serializeInstrumentations = serializeInstrumentations$1;
10
10
  /** The central instrumentation config, to pass as the loader's `instrumentations` option. */
@@ -1,3 +1,4 @@
1
+ import { uniq } from "@sentry/core";
1
2
  import { awsSdkConfig } from "./aws-sdk.js";
2
3
  import { amqplibConfig } from "./amqplib.js";
3
4
  import { anthropicAiConfig } from "./anthropic-ai.js";
@@ -46,7 +47,6 @@ import { tediousConfig } from "./tedious.js";
46
47
  import { togetherAiConfig } from "./together-ai.js";
47
48
  import { typesafeConfig } from "./typesafe.js";
48
49
  import { vercelAiConfig } from "./vercel-ai.js";
49
- import { uniq } from "@sentry/core";
50
50
  // src/orchestrion/config/index.ts
51
51
  /**
52
52
  * The orchestrion code-transform configs. Every instrumentable library is here
@@ -2,7 +2,7 @@ import { getModuleNames } from "./module-names.js";
2
2
  // src/orchestrion/config/mistral.ts
3
3
  const MODULE = {
4
4
  name: "@mistralai/mistralai",
5
- versionRange: ">=2.0.0 <4"
5
+ versionRange: ">=2.0.0 <5"
6
6
  };
7
7
  const CHAT_FILE = {
8
8
  ...MODULE,
@@ -1 +1 @@
1
- {"version":3,"file":"mistral.js","names":[],"sources":["../../../../src/orchestrion/config/mistral.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\n\nimport { getModuleNames } from './module-names';\n\n// `@mistralai/mistralai` v2+ is ESM-only, so there is a single built file per resource (no dual CJS/ESM\n// variants). Each SDK resource class exposes async methods that return a thenable, so `kind: 'Auto'`\n// resolves to `wrapPromise`; the `.stream` methods resolve to an async-iterable `EventStream`.\nconst MODULE = { name: '@mistralai/mistralai', versionRange: '>=2.0.0 <4' } as const;\n\nconst CHAT_FILE = { ...MODULE, filePath: 'esm/sdk/chat.js' } as const;\nconst AGENTS_FILE = { ...MODULE, filePath: 'esm/sdk/agents.js' } as const;\n\n// Streaming methods get their own channel so both the span attributes and the stream handling can be\n// driven by the method that fired, instead of duck-typing the resolved value.\nexport const mistralConfig = [\n {\n channelName: 'chat',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'complete', kind: 'Auto' as const },\n },\n {\n channelName: 'chat',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'parse', kind: 'Auto' as const },\n },\n {\n channelName: 'chat-stream',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'stream', kind: 'Auto' as const },\n },\n {\n channelName: 'chat-stream',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'parseStream', kind: 'Auto' as const },\n },\n {\n channelName: 'embeddings',\n module: { ...MODULE, filePath: 'esm/sdk/embeddings.js' },\n functionQuery: { className: 'Embeddings', methodName: 'create', kind: 'Auto' as const },\n },\n {\n channelName: 'agents',\n module: AGENTS_FILE,\n functionQuery: { className: 'Agents', methodName: 'complete', kind: 'Auto' as const },\n },\n {\n channelName: 'agents-stream',\n module: AGENTS_FILE,\n functionQuery: { className: 'Agents', methodName: 'stream', kind: 'Auto' as const },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mistralModuleNames = getModuleNames(mistralConfig);\n\nexport const mistralChannels = {\n MISTRAL_CHAT: 'orchestrion:@mistralai/mistralai:chat',\n MISTRAL_CHAT_STREAM: 'orchestrion:@mistralai/mistralai:chat-stream',\n MISTRAL_EMBEDDINGS: 'orchestrion:@mistralai/mistralai:embeddings',\n MISTRAL_AGENTS: 'orchestrion:@mistralai/mistralai:agents',\n MISTRAL_AGENTS_STREAM: 'orchestrion:@mistralai/mistralai:agents-stream',\n} as const;\n"],"mappings":";;AAOA,MAAM,SAAS;CAAE,MAAM;CAAwB,cAAc;AAAa;AAE1E,MAAM,YAAY;CAAE,GAAG;CAAQ,UAAU;AAAkB;AAC3D,MAAM,cAAc;CAAE,GAAG;CAAQ,UAAU;AAAoB;AAI/D,MAAa,gBAAgB;CAC3B;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAY,MAAM;EAAgB;CACpF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAS,MAAM;EAAgB;CACjF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAU,MAAM;EAAgB;CAClF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAe,MAAM;EAAgB;CACvF;CACA;EACE,aAAa;EACb,QAAQ;GAAE,GAAG;GAAQ,UAAU;EAAwB;EACvD,eAAe;GAAE,WAAW;GAAc,YAAY;GAAU,MAAM;EAAgB;CACxF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAU,YAAY;GAAY,MAAM;EAAgB;CACtF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAU,YAAY;GAAU,MAAM;EAAgB;CACpF;AACF;AAEA,MAAa,qBAAqB,eAAe,aAAa;AAE9D,MAAa,kBAAkB;CAC7B,cAAc;CACd,qBAAqB;CACrB,oBAAoB;CACpB,gBAAgB;CAChB,uBAAuB;AACzB"}
1
+ {"version":3,"file":"mistral.js","names":[],"sources":["../../../../src/orchestrion/config/mistral.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\n\nimport { getModuleNames } from './module-names';\n\n// `@mistralai/mistralai` v2+ is ESM-only, so there is a single built file per resource (no dual CJS/ESM\n// variants). Each SDK resource class exposes async methods that return a thenable, so `kind: 'Auto'`\n// resolves to `wrapPromise`; the `.stream` methods resolve to an async-iterable `EventStream`.\nconst MODULE = { name: '@mistralai/mistralai', versionRange: '>=2.0.0 <5' } as const;\n\nconst CHAT_FILE = { ...MODULE, filePath: 'esm/sdk/chat.js' } as const;\nconst AGENTS_FILE = { ...MODULE, filePath: 'esm/sdk/agents.js' } as const;\n\n// Streaming methods get their own channel so both the span attributes and the stream handling can be\n// driven by the method that fired, instead of duck-typing the resolved value.\nexport const mistralConfig = [\n {\n channelName: 'chat',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'complete', kind: 'Auto' as const },\n },\n {\n channelName: 'chat',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'parse', kind: 'Auto' as const },\n },\n {\n channelName: 'chat-stream',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'stream', kind: 'Auto' as const },\n },\n {\n channelName: 'chat-stream',\n module: CHAT_FILE,\n functionQuery: { className: 'Chat', methodName: 'parseStream', kind: 'Auto' as const },\n },\n {\n channelName: 'embeddings',\n module: { ...MODULE, filePath: 'esm/sdk/embeddings.js' },\n functionQuery: { className: 'Embeddings', methodName: 'create', kind: 'Auto' as const },\n },\n {\n channelName: 'agents',\n module: AGENTS_FILE,\n functionQuery: { className: 'Agents', methodName: 'complete', kind: 'Auto' as const },\n },\n {\n channelName: 'agents-stream',\n module: AGENTS_FILE,\n functionQuery: { className: 'Agents', methodName: 'stream', kind: 'Auto' as const },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mistralModuleNames = getModuleNames(mistralConfig);\n\nexport const mistralChannels = {\n MISTRAL_CHAT: 'orchestrion:@mistralai/mistralai:chat',\n MISTRAL_CHAT_STREAM: 'orchestrion:@mistralai/mistralai:chat-stream',\n MISTRAL_EMBEDDINGS: 'orchestrion:@mistralai/mistralai:embeddings',\n MISTRAL_AGENTS: 'orchestrion:@mistralai/mistralai:agents',\n MISTRAL_AGENTS_STREAM: 'orchestrion:@mistralai/mistralai:agents-stream',\n} as const;\n"],"mappings":";;AAOA,MAAM,SAAS;CAAE,MAAM;CAAwB,cAAc;AAAa;AAE1E,MAAM,YAAY;CAAE,GAAG;CAAQ,UAAU;AAAkB;AAC3D,MAAM,cAAc;CAAE,GAAG;CAAQ,UAAU;AAAoB;AAI/D,MAAa,gBAAgB;CAC3B;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAY,MAAM;EAAgB;CACpF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAS,MAAM;EAAgB;CACjF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAU,MAAM;EAAgB;CAClF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAQ,YAAY;GAAe,MAAM;EAAgB;CACvF;CACA;EACE,aAAa;EACb,QAAQ;GAAE,GAAG;GAAQ,UAAU;EAAwB;EACvD,eAAe;GAAE,WAAW;GAAc,YAAY;GAAU,MAAM;EAAgB;CACxF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAU,YAAY;GAAY,MAAM;EAAgB;CACtF;CACA;EACE,aAAa;EACb,QAAQ;EACR,eAAe;GAAE,WAAW;GAAU,YAAY;GAAU,MAAM;EAAgB;CACpF;AACF;AAEA,MAAa,qBAAqB,eAAe,aAAa;AAE9D,MAAa,kBAAkB;CAC7B,cAAc;CACd,qBAAqB;CACrB,oBAAoB;CACpB,gBAAgB;CAChB,uBAAuB;AACzB"}
@@ -6,6 +6,7 @@ const VERSION_RANGE = ">=8.0.0-rc.15 <9";
6
6
  const PRISMA_ASYNC_TERMINALS = [
7
7
  "aggregate",
8
8
  "first",
9
+ "firstOrThrow",
9
10
  "create",
10
11
  "createAndCount",
11
12
  "upsert",
@@ -40,6 +41,7 @@ const prismaModuleNames = getModuleNames(prismaConfig);
40
41
  const prismaChannels = {
41
42
  PRISMA_AGGREGATE: "orchestrion:@prisma/orm-family-sql:aggregate",
42
43
  PRISMA_FIRST: "orchestrion:@prisma/orm-family-sql:first",
44
+ PRISMA_FIRST_OR_THROW: "orchestrion:@prisma/orm-family-sql:firstOrThrow",
43
45
  PRISMA_CREATE: "orchestrion:@prisma/orm-family-sql:create",
44
46
  PRISMA_CREATE_AND_COUNT: "orchestrion:@prisma/orm-family-sql:createAndCount",
45
47
  PRISMA_UPSERT: "orchestrion:@prisma/orm-family-sql:upsert",
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.js","names":[],"sources":["../../../../src/orchestrion/config/prisma.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\nimport { getModuleNames } from './module-names';\n\n// Prisma 8 has no tracing surface, so its ORM terminals are wrapped directly. Apps install\n// `@prisma/orm-postgres`, but `CollectionBase` lives in the transitive `@prisma/orm-family-sql`.\nconst MODULE_NAME = '@prisma/orm-family-sql';\nconst ORM_CLIENT_FILE = 'dist/orm-client.mjs';\n\nconst VERSION_RANGE = '>=8.0.0-rc.15 <9';\n\nexport const PRISMA_ASYNC_TERMINALS = [\n 'aggregate',\n 'first',\n 'create',\n 'createAndCount',\n 'upsert',\n 'update',\n 'updateAndCount',\n 'delete',\n 'deleteAndCount',\n] as const;\n\n// These return a single-use thenable whose query runs on consumption. `Sync` on purpose: the `Async`/`Auto`\n// wrapper calls `.then()` on non-native thenables and would consume the result before the app does.\nexport const PRISMA_LAZY_TERMINALS = ['all', 'createAll', 'updateAll', 'deleteAll'] as const;\n\ntype PrismaTerminal = (typeof PRISMA_ASYNC_TERMINALS)[number] | (typeof PRISMA_LAZY_TERMINALS)[number];\n\nfunction terminalConfig(methodName: PrismaTerminal, kind: 'Async' | 'Sync'): InstrumentationConfig {\n return {\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: ORM_CLIENT_FILE },\n functionQuery: { className: 'CollectionBase', methodName, kind },\n };\n}\n\nexport const prismaConfig: InstrumentationConfig[] = [\n ...PRISMA_ASYNC_TERMINALS.map(methodName => terminalConfig(methodName, 'Async')),\n ...PRISMA_LAZY_TERMINALS.map(methodName => terminalConfig(methodName, 'Sync')),\n];\n\nexport const prismaModuleNames = getModuleNames(prismaConfig);\n\nexport const prismaChannels = {\n PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate',\n PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first',\n PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create',\n PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount',\n PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert',\n PRISMA_UPDATE: 'orchestrion:@prisma/orm-family-sql:update',\n PRISMA_UPDATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:updateAndCount',\n PRISMA_DELETE: 'orchestrion:@prisma/orm-family-sql:delete',\n PRISMA_DELETE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:deleteAndCount',\n PRISMA_ALL: 'orchestrion:@prisma/orm-family-sql:all',\n PRISMA_CREATE_ALL: 'orchestrion:@prisma/orm-family-sql:createAll',\n PRISMA_UPDATE_ALL: 'orchestrion:@prisma/orm-family-sql:updateAll',\n PRISMA_DELETE_ALL: 'orchestrion:@prisma/orm-family-sql:deleteAll',\n} as const;\n"],"mappings":";;AAKA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAEtB,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,wBAAwB;CAAC;CAAO;CAAa;CAAa;AAAW;AAIlF,SAAS,eAAe,YAA4B,MAA+C;CACjG,OAAO;EACL,aAAa;EACb,QAAQ;GAAE,MAAM;GAAa,cAAc;GAAe,UAAU;EAAgB;EACpF,eAAe;GAAE,WAAW;GAAkB;GAAY;EAAK;CACjE;AACF;AAEA,MAAa,eAAwC,CACnD,GAAG,uBAAuB,KAAI,eAAc,eAAe,YAAY,OAAO,CAAC,GAC/E,GAAG,sBAAsB,KAAI,eAAc,eAAe,YAAY,MAAM,CAAC,CAC/E;AAEA,MAAa,oBAAoB,eAAe,YAAY;AAE5D,MAAa,iBAAiB;CAC5B,kBAAkB;CAClB,cAAc;CACd,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,yBAAyB;CACzB,YAAY;CACZ,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB"}
1
+ {"version":3,"file":"prisma.js","names":[],"sources":["../../../../src/orchestrion/config/prisma.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\nimport { getModuleNames } from './module-names';\n\n// Prisma 8 has no tracing surface, so its ORM terminals are wrapped directly. Apps install\n// `@prisma/orm-postgres`, but `CollectionBase` lives in the transitive `@prisma/orm-family-sql`.\nconst MODULE_NAME = '@prisma/orm-family-sql';\nconst ORM_CLIENT_FILE = 'dist/orm-client.mjs';\n\nconst VERSION_RANGE = '>=8.0.0-rc.15 <9';\n\nexport const PRISMA_ASYNC_TERMINALS = [\n 'aggregate',\n 'first',\n // Added in rc.18. orchestrion's range check can't order RC numbers, so older RCs get its constructor fallback:\n // every collection gains an own async `firstOrThrow` that rejects when called, and a custom collection's own\n // `firstOrThrow` is wrapped as async. We only support the latest RC.\n 'firstOrThrow',\n 'create',\n 'createAndCount',\n 'upsert',\n 'update',\n 'updateAndCount',\n 'delete',\n 'deleteAndCount',\n] as const;\n\n// These return a single-use thenable whose query runs on consumption. `Sync` on purpose: the `Async`/`Auto`\n// wrapper calls `.then()` on non-native thenables and would consume the result before the app does.\nexport const PRISMA_LAZY_TERMINALS = ['all', 'createAll', 'updateAll', 'deleteAll'] as const;\n\ntype PrismaTerminal = (typeof PRISMA_ASYNC_TERMINALS)[number] | (typeof PRISMA_LAZY_TERMINALS)[number];\n\nfunction terminalConfig(methodName: PrismaTerminal, kind: 'Async' | 'Sync'): InstrumentationConfig {\n return {\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: ORM_CLIENT_FILE },\n functionQuery: { className: 'CollectionBase', methodName, kind },\n };\n}\n\nexport const prismaConfig: InstrumentationConfig[] = [\n ...PRISMA_ASYNC_TERMINALS.map(methodName => terminalConfig(methodName, 'Async')),\n ...PRISMA_LAZY_TERMINALS.map(methodName => terminalConfig(methodName, 'Sync')),\n];\n\nexport const prismaModuleNames = getModuleNames(prismaConfig);\n\nexport const prismaChannels = {\n PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate',\n PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first',\n PRISMA_FIRST_OR_THROW: 'orchestrion:@prisma/orm-family-sql:firstOrThrow',\n PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create',\n PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount',\n PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert',\n PRISMA_UPDATE: 'orchestrion:@prisma/orm-family-sql:update',\n PRISMA_UPDATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:updateAndCount',\n PRISMA_DELETE: 'orchestrion:@prisma/orm-family-sql:delete',\n PRISMA_DELETE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:deleteAndCount',\n PRISMA_ALL: 'orchestrion:@prisma/orm-family-sql:all',\n PRISMA_CREATE_ALL: 'orchestrion:@prisma/orm-family-sql:createAll',\n PRISMA_UPDATE_ALL: 'orchestrion:@prisma/orm-family-sql:updateAll',\n PRISMA_DELETE_ALL: 'orchestrion:@prisma/orm-family-sql:deleteAll',\n} as const;\n"],"mappings":";;AAKA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAEtB,MAAa,yBAAyB;CACpC;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,wBAAwB;CAAC;CAAO;CAAa;CAAa;AAAW;AAIlF,SAAS,eAAe,YAA4B,MAA+C;CACjG,OAAO;EACL,aAAa;EACb,QAAQ;GAAE,MAAM;GAAa,cAAc;GAAe,UAAU;EAAgB;EACpF,eAAe;GAAE,WAAW;GAAkB;GAAY;EAAK;CACjE;AACF;AAEA,MAAa,eAAwC,CACnD,GAAG,uBAAuB,KAAI,eAAc,eAAe,YAAY,OAAO,CAAC,GAC/E,GAAG,sBAAsB,KAAI,eAAc,eAAe,YAAY,MAAM,CAAC,CAC/E;AAEA,MAAa,oBAAoB,eAAe,YAAY;AAE5D,MAAa,iBAAiB;CAC5B,kBAAkB;CAClB,cAAc;CACd,uBAAuB;CACvB,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,yBAAyB;CACzB,YAAY;CACZ,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB"}
@@ -1,5 +1,5 @@
1
- import { isBun } from "../utils/runtime.js";
2
1
  import { GLOBAL_OBJ, consoleSandbox, debug } from "@sentry/core";
2
+ import { isBun } from "../utils/runtime.js";
3
3
  // src/orchestrion/detect.ts
4
4
  /**
5
5
  * The module names (e.g. `mysql`, `@hapi/hapi`) orchestrion has already injected
@@ -1,8 +1,8 @@
1
1
  import { tracingChannel } from "../utils/diagnosticsChannel.js";
2
+ import { GLOBAL_OBJ, addNonEnumerableProperty, debug, waitForTracingChannelBinding } from "@sentry/core";
2
3
  import { DEBUG_BUILD } from "../debug-build.js";
3
4
  import { isBun, isCloudflareWorkers, isDeno } from "../utils/runtime.js";
4
5
  import { getOrchestrionInjectedModules } from "./detect.js";
5
- import { GLOBAL_OBJ, addNonEnumerableProperty, debug, waitForTracingChannelBinding } from "@sentry/core";
6
6
  // src/orchestrion/instrumentation.ts
7
7
  const INSTRUMENTED = Symbol.for("SentryOrchestrionInstrumented");
8
8
  const warnedMissingCloudflarePlugin = /* @__PURE__ */ new Set();
@@ -1 +1 @@
1
- {"type":"module","version":"11.21.0","sideEffects":false}
1
+ {"type":"module","version":"11.23.0","sideEffects":false}
@@ -1,6 +1,6 @@
1
+ import { SPAN_STATUS_ERROR, captureException, debug, getAsyncContextStrategy, getMainCarrier, isObjectLike, withActiveSpan } from "@sentry/core";
1
2
  import { DEBUG_BUILD } from "./debug-build.js";
2
3
  import { ERROR_TYPE } from "@sentry/conventions/attributes";
3
- import { SPAN_STATUS_ERROR, captureException, debug, getAsyncContextStrategy, getMainCarrier, getRootSpan, isObjectLike, spanIsIgnored, withActiveSpan } from "@sentry/core";
4
4
  // src/tracing-channel.ts
5
5
  const NOOP = () => {};
6
6
  /** Runs a span-building callback so a throw inside it can never break the user's traced call. */
@@ -146,7 +146,6 @@ function getErrorInfo(error) {
146
146
  };
147
147
  }
148
148
  function getStoreWithActiveSpan(asyncLocalStorage, span) {
149
- if (spanIsIgnored(span) && getRootSpan(span) !== span) return asyncLocalStorage.getStore();
150
149
  return withActiveSpan(span, () => {
151
150
  return asyncLocalStorage.getStore();
152
151
  });
@@ -1 +1 @@
1
- {"version":3,"file":"tracing-channel.js","names":[],"sources":["../../src/tracing-channel.ts"],"sourcesContent":["import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel';\nimport type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';\nimport {\n debug,\n captureException,\n isObjectLike,\n SPAN_STATUS_ERROR,\n getAsyncContextStrategy,\n getMainCarrier,\n spanIsIgnored,\n getRootSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { ERROR_TYPE } from '@sentry/conventions/attributes';\n\nexport type TracingChannelPayloadWithSpan<TData extends object> = TData & {\n /**\n * The current active span for the traced call.\n */\n _sentrySpan?: Span;\n\n /**\n * The context's active store value, used to restore the context for asyncStart continuations for callback-based tracing.\n */\n _sentryCallerStore?: unknown;\n\n /** Set by Node's tracing channel when the traced operation failed. */\n error?: unknown;\n};\n\n/*\n * A type patch so that we don't have to handle all subscription types.\n */\nexport interface SentryTracingChannel<TData extends object = object> extends Omit<\n TracingChannel<TData, TracingChannelPayloadWithSpan<TData>>,\n 'subscribe' | 'unsubscribe'\n> {\n subscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n unsubscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n}\n\nexport interface TracingChannelLifeCycleOptions<TData extends object = object> {\n /**\n * Invoked with the span and the channel context object once the traced operation completes\n * Use it to enrich the span from the result/error (branch on `'error' in data` / `'result' in data`) or to run cleanup.\n */\n beforeSpanEnd?: (span: Span, data: TracingChannelPayloadWithSpan<TData>) => void;\n\n /**\n * Whether a thrown error is captured as a Sentry event. The span is always marked with error status regardless. Defaults to `false`.\n * You can alternatively pass a function that sets the ExclusiveEventHintOrCaptureContext on the captured error.\n * Set `true` for instrumentations that own the error boundary, (e.g: route handlers)\n * For database drivers, it is not recommended to set this at all.\n */\n captureError?: boolean | ((e: unknown) => ExclusiveEventHintOrCaptureContext);\n\n /**\n * Take ownership of *when* the span ends: return `true` and the helper won't end it on\n * `end`/`asyncEnd`. For results that settle out-of-band — e.g. a streamed `EventEmitter` that\n * completes via its own `'end'`/`'error'` events.\n *\n * Call `end` when it settles — `end()` on success, `end(error)` on failure. `end` owns *how* the span\n * ends (error status/attributes, `captureError`, `beforeSpanEnd`) and is idempotent. Default `false`\n * lets the helper end the span as usual.\n */\n deferSpanEnd?: (args: {\n span: Span;\n data: TracingChannelPayloadWithSpan<TData>;\n /** Ends the span: `end()` on success, `end(error)` on failure (which marks `data` as errored). Idempotent. */\n end: (error?: unknown) => void;\n }) => boolean;\n}\n\n/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */\nexport interface TracingChannelBindingHandle<TData extends object = object> {\n /**\n * The tracing channel with the span bound into async context.\n */\n channel: SentryTracingChannel<TData>;\n\n /**\n * Tears down the binding: unsubscribes lifecycle handlers, when present, and unbinds the start store.\n * Idempotent, and a no-op when no async context binding was available.\n */\n unbind: () => void;\n}\n\nconst NOOP = (): void => {};\n\n/** Runs a span-building callback so a throw inside it can never break the user's traced call. */\nexport function safeChannelCallback<T>(fn: () => T): T | undefined {\n try {\n return fn();\n } catch (error) {\n DEBUG_BUILD && debug.warn('[instrumentation] error handling channel event', error);\n return undefined;\n }\n}\n\n/**\n * Bind a span and its lifecycle to a tracing channel so the span becomes the active async context\n * for the traced operation and is ended when the operation completes.\n *\n * `getSpan` may return `undefined` to opt a payload out entirely: nothing is bound, no span is\n * tracked, and the active context is left untouched. Use it for events that ride the same channel\n * but should reuse the enclosing span instead of opening (and ending) their own — e.g. an agent\n * loop's per-step events, where ending a freshly opened span would close the parent prematurely.\n */\nexport function bindTracingChannelToSpan<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n opts?: TracingChannelLifeCycleOptions<TData>,\n): TracingChannelBindingHandle<TData> {\n const handle = bindSpanToChannelStore(channel, getSpan);\n\n const beforeSpanEnd = opts?.beforeSpanEnd;\n const deferSpanEnd = opts?.deferSpanEnd;\n const getErrorHint = (e: unknown): ExclusiveEventHintOrCaptureContext => {\n if (typeof opts?.captureError === 'function') {\n return opts.captureError(e);\n }\n\n return {\n mechanism: {\n type: 'auto.diagnostic_channels.bind_span',\n handled: false,\n },\n };\n };\n\n // Apply Sentry error status + attributes (and capture, if configured) to a span. Shared by the\n // channel `error` lifecycle and the deferred `end` util so the two can't drift.\n const annotateSpanError = (span: Span, error: unknown): void => {\n if (opts?.captureError) {\n captureException(error, getErrorHint(error));\n }\n\n const { message, attributes } = getErrorInfo(error);\n span.setStatus({ code: SPAN_STATUS_ERROR, message });\n span.setAttributes(attributes);\n };\n\n // Creates an end fn for deferred handlers to use, ensures consistent span end behavior\n const makeDeferredEnd = (span: Span, data: TracingChannelPayloadWithSpan<TData>) => {\n let ended = false;\n\n return (error?: unknown): void => {\n if (ended) {\n return;\n }\n\n ended = true;\n if (error !== undefined) {\n annotateSpanError(span, error);\n // Without this the payload still looks successful, so `beforeSpanEnd` enriches the span from\n // a `result` the operation never produced.\n data.error = error;\n }\n\n endBoundSpan(data, beforeSpanEnd);\n };\n };\n\n const subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>> = {\n start: NOOP,\n asyncStart: NOOP,\n end(data) {\n // The operation settled synchronously (returned or threw)\n // Presence checks because caller can return `undefined` result or throw a falsy value.\n if ('error' in data || 'result' in data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n }\n },\n error(data) {\n // No span was bound for this payload (`getSpan` returned undefined), so there is nothing to\n // annotate and no instrumentation that owns capturing this error.\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n\n annotateSpanError(span, data.error);\n },\n asyncEnd(data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n },\n };\n\n handle.channel.subscribe(subscribers);\n\n return {\n channel: handle.channel,\n unbind: () => {\n handle.channel.unsubscribe(subscribers);\n handle.unbind();\n },\n };\n}\n\n/**\n * Bind a span into the channel's async context so it becomes active for the traced operation,\n * without managing its lifecycle. The primitive behind {@link bindTracingChannelToSpan}, which\n * layers span-ending and error handling on top.\n *\n * `getSpan` may return `undefined` to leave the active context untouched for that payload.\n */\nexport function bindSpanToChannelStore<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n): TracingChannelBindingHandle<TData> {\n // Grabs the tracing channel binding defined by the AsyncContext strategy implementation\n const binding = getAsyncContextStrategy(getMainCarrier()).getTracingChannelBinding?.();\n\n // If no binding, then either the implementer doesn't support tracing channels or there is no active strategy\n // Failure mode here means we would still access the channel and potentially subscribe to it, but parenting will be off.\n if (!binding) {\n DEBUG_BUILD && debug.log('[TracingChannel] Could not access async context binding.');\n\n return {\n channel,\n unbind: NOOP,\n };\n }\n\n // Grab the ALS instance, we don't really care what is in it as long as the AsyncContext strategy can use its value to figure out parenting.\n const asyncLocalStorage = binding.asyncLocalStorage as AsyncLocalStorage<TData>;\n\n // bindStore activates the ALS for the traced call; any getStore() inside it returns the value bound for that context.\n // 1. Produce: Binds the span to the active context via withActiveSpan(span), and returns the store for the active context.\n // 2. Bind: the courier hands that opaque value to channel.start.bindStore(asyncLocalStorage, producer), which runs the traced op inside asyncLocalStorage.run(value, …); it never inspects the value.\n // 3. Read: inside the op, Sentry's scope machinery calls getScopes() → asyncStorage.getStore() on that same ALS, so getCurrentScope/getIsolationScope/getActiveSpan resolve to the scope carrying our span.\n // 4. Nest: any child span started in the traced op parents to that active span.\n channel.start.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n // Stash the caller's store before we swap in the span store, so `asyncStart` can restore it for\n // callback-style channels (see `_sentryCallerStore`).\n data._sentryCallerStore = asyncLocalStorage.getStore();\n\n const span = getSpan(data);\n if (!span) {\n // Leave the active context untouched so nested operations keep parenting to the enclosing span.\n return data._sentryCallerStore as TData;\n }\n data._sentrySpan = span;\n\n return getStoreWithActiveSpan(asyncLocalStorage, span) as TData;\n });\n\n // Restore the caller's context for the async continuation. Only callback-style channels `runStores`\n // `asyncStart` (so the callback runs inside this store). promise channels `publish` it, leaving this\n // inert, their continuation already inherits the caller's context natively.\n channel.asyncStart.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n return data._sentryCallerStore as TData;\n });\n\n return {\n channel,\n unbind: () => {\n // Removes the stores\n channel.start.unbindStore(asyncLocalStorage);\n channel.asyncStart.unbindStore(asyncLocalStorage);\n },\n };\n}\n\nfunction endBoundSpan<TData extends object>(\n data: TracingChannelPayloadWithSpan<TData>,\n beforeSpanEnd: TracingChannelLifeCycleOptions<TData>['beforeSpanEnd'],\n): void {\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n beforeSpanEnd?.(span, data);\n span.end();\n}\n\ntype ErrorInfo = {\n message: string | undefined;\n attributes: Record<string, string>;\n};\n\n/**\n * Best-effort message and attribute extraction for thrown/rejected values.\n */\nfunction getErrorInfo(error: unknown): ErrorInfo {\n const errorIsObject = isObjectLike(error);\n const raw = errorIsObject ? ('message' in error ? error.message : undefined) : error;\n\n // Leave the status message unset if not set (e.g. an `AggregateError` from\n // ECONNREFUSED, whose `.message` is empty). Otherwise cast to string.\n const message = raw ? String(raw) : undefined;\n const type = errorIsObject && 'name' in error ? String(error.name) : 'unknown';\n\n return {\n message,\n attributes: {\n [ERROR_TYPE]: type,\n },\n };\n}\n\nfunction getStoreWithActiveSpan(asyncLocalStorage: AsyncLocalStorage<unknown>, span: Span): unknown {\n // Do not make an ignored *child* the active span: no span is emitted for it, so its children and\n // outgoing requests must propagate from the nearest emitted parent instead. An ignored *root* is\n // still activated so its whole subtree is dropped with it. Mirrors core `startSpan` and the OTel\n // context manager (`spanIsIgnored(span) && getRootSpan(span) !== span`).\n if (spanIsIgnored(span) && getRootSpan(span) !== span) {\n return asyncLocalStorage.getStore();\n }\n\n return withActiveSpan(span, () => {\n return asyncLocalStorage.getStore();\n });\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"tracing-channel.js","names":[],"sources":["../../src/tracing-channel.ts"],"sourcesContent":["import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel';\nimport type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';\nimport {\n debug,\n captureException,\n isObjectLike,\n SPAN_STATUS_ERROR,\n getAsyncContextStrategy,\n getMainCarrier,\n withActiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { ERROR_TYPE } from '@sentry/conventions/attributes';\n\nexport type TracingChannelPayloadWithSpan<TData extends object> = TData & {\n /**\n * The current active span for the traced call.\n */\n _sentrySpan?: Span;\n\n /**\n * The context's active store value, used to restore the context for asyncStart continuations for callback-based tracing.\n */\n _sentryCallerStore?: unknown;\n\n /** Set by Node's tracing channel when the traced operation failed. */\n error?: unknown;\n};\n\n/*\n * A type patch so that we don't have to handle all subscription types.\n */\nexport interface SentryTracingChannel<TData extends object = object> extends Omit<\n TracingChannel<TData, TracingChannelPayloadWithSpan<TData>>,\n 'subscribe' | 'unsubscribe'\n> {\n subscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n unsubscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n}\n\nexport interface TracingChannelLifeCycleOptions<TData extends object = object> {\n /**\n * Invoked with the span and the channel context object once the traced operation completes\n * Use it to enrich the span from the result/error (branch on `'error' in data` / `'result' in data`) or to run cleanup.\n */\n beforeSpanEnd?: (span: Span, data: TracingChannelPayloadWithSpan<TData>) => void;\n\n /**\n * Whether a thrown error is captured as a Sentry event. The span is always marked with error status regardless. Defaults to `false`.\n * You can alternatively pass a function that sets the ExclusiveEventHintOrCaptureContext on the captured error.\n * Set `true` for instrumentations that own the error boundary, (e.g: route handlers)\n * For database drivers, it is not recommended to set this at all.\n */\n captureError?: boolean | ((e: unknown) => ExclusiveEventHintOrCaptureContext);\n\n /**\n * Take ownership of *when* the span ends: return `true` and the helper won't end it on\n * `end`/`asyncEnd`. For results that settle out-of-band — e.g. a streamed `EventEmitter` that\n * completes via its own `'end'`/`'error'` events.\n *\n * Call `end` when it settles — `end()` on success, `end(error)` on failure. `end` owns *how* the span\n * ends (error status/attributes, `captureError`, `beforeSpanEnd`) and is idempotent. Default `false`\n * lets the helper end the span as usual.\n */\n deferSpanEnd?: (args: {\n span: Span;\n data: TracingChannelPayloadWithSpan<TData>;\n /** Ends the span: `end()` on success, `end(error)` on failure (which marks `data` as errored). Idempotent. */\n end: (error?: unknown) => void;\n }) => boolean;\n}\n\n/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */\nexport interface TracingChannelBindingHandle<TData extends object = object> {\n /**\n * The tracing channel with the span bound into async context.\n */\n channel: SentryTracingChannel<TData>;\n\n /**\n * Tears down the binding: unsubscribes lifecycle handlers, when present, and unbinds the start store.\n * Idempotent, and a no-op when no async context binding was available.\n */\n unbind: () => void;\n}\n\nconst NOOP = (): void => {};\n\n/** Runs a span-building callback so a throw inside it can never break the user's traced call. */\nexport function safeChannelCallback<T>(fn: () => T): T | undefined {\n try {\n return fn();\n } catch (error) {\n DEBUG_BUILD && debug.warn('[instrumentation] error handling channel event', error);\n return undefined;\n }\n}\n\n/**\n * Bind a span and its lifecycle to a tracing channel so the span becomes the active async context\n * for the traced operation and is ended when the operation completes.\n *\n * `getSpan` may return `undefined` to opt a payload out entirely: nothing is bound, no span is\n * tracked, and the active context is left untouched. Use it for events that ride the same channel\n * but should reuse the enclosing span instead of opening (and ending) their own — e.g. an agent\n * loop's per-step events, where ending a freshly opened span would close the parent prematurely.\n */\nexport function bindTracingChannelToSpan<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n opts?: TracingChannelLifeCycleOptions<TData>,\n): TracingChannelBindingHandle<TData> {\n const handle = bindSpanToChannelStore(channel, getSpan);\n\n const beforeSpanEnd = opts?.beforeSpanEnd;\n const deferSpanEnd = opts?.deferSpanEnd;\n const getErrorHint = (e: unknown): ExclusiveEventHintOrCaptureContext => {\n if (typeof opts?.captureError === 'function') {\n return opts.captureError(e);\n }\n\n return {\n mechanism: {\n type: 'auto.diagnostic_channels.bind_span',\n handled: false,\n },\n };\n };\n\n // Apply Sentry error status + attributes (and capture, if configured) to a span. Shared by the\n // channel `error` lifecycle and the deferred `end` util so the two can't drift.\n const annotateSpanError = (span: Span, error: unknown): void => {\n if (opts?.captureError) {\n // oxlint-disable-next-line sdk/require-exception-mechanism -- hint comes from `getErrorHint`, which sets a mechanism unless `captureError` overrides it\n captureException(error, getErrorHint(error));\n }\n\n const { message, attributes } = getErrorInfo(error);\n span.setStatus({ code: SPAN_STATUS_ERROR, message });\n span.setAttributes(attributes);\n };\n\n // Creates an end fn for deferred handlers to use, ensures consistent span end behavior\n const makeDeferredEnd = (span: Span, data: TracingChannelPayloadWithSpan<TData>) => {\n let ended = false;\n\n return (error?: unknown): void => {\n if (ended) {\n return;\n }\n\n ended = true;\n if (error !== undefined) {\n annotateSpanError(span, error);\n // Without this the payload still looks successful, so `beforeSpanEnd` enriches the span from\n // a `result` the operation never produced.\n data.error = error;\n }\n\n endBoundSpan(data, beforeSpanEnd);\n };\n };\n\n const subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>> = {\n start: NOOP,\n asyncStart: NOOP,\n end(data) {\n // The operation settled synchronously (returned or threw)\n // Presence checks because caller can return `undefined` result or throw a falsy value.\n if ('error' in data || 'result' in data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n }\n },\n error(data) {\n // No span was bound for this payload (`getSpan` returned undefined), so there is nothing to\n // annotate and no instrumentation that owns capturing this error.\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n\n annotateSpanError(span, data.error);\n },\n asyncEnd(data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n },\n };\n\n handle.channel.subscribe(subscribers);\n\n return {\n channel: handle.channel,\n unbind: () => {\n handle.channel.unsubscribe(subscribers);\n handle.unbind();\n },\n };\n}\n\n/**\n * Bind a span into the channel's async context so it becomes active for the traced operation,\n * without managing its lifecycle. The primitive behind {@link bindTracingChannelToSpan}, which\n * layers span-ending and error handling on top.\n *\n * `getSpan` may return `undefined` to leave the active context untouched for that payload.\n */\nexport function bindSpanToChannelStore<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n): TracingChannelBindingHandle<TData> {\n // Grabs the tracing channel binding defined by the AsyncContext strategy implementation\n const binding = getAsyncContextStrategy(getMainCarrier()).getTracingChannelBinding?.();\n\n // If no binding, then either the implementer doesn't support tracing channels or there is no active strategy\n // Failure mode here means we would still access the channel and potentially subscribe to it, but parenting will be off.\n if (!binding) {\n DEBUG_BUILD && debug.log('[TracingChannel] Could not access async context binding.');\n\n return {\n channel,\n unbind: NOOP,\n };\n }\n\n // Grab the ALS instance, we don't really care what is in it as long as the AsyncContext strategy can use its value to figure out parenting.\n const asyncLocalStorage = binding.asyncLocalStorage as AsyncLocalStorage<TData>;\n\n // bindStore activates the ALS for the traced call; any getStore() inside it returns the value bound for that context.\n // 1. Produce: Binds the span to the active context via withActiveSpan(span), and returns the store for the active context.\n // 2. Bind: the courier hands that opaque value to channel.start.bindStore(asyncLocalStorage, producer), which runs the traced op inside asyncLocalStorage.run(value, …); it never inspects the value.\n // 3. Read: inside the op, Sentry's scope machinery calls getScopes() → asyncStorage.getStore() on that same ALS, so getCurrentScope/getIsolationScope/getActiveSpan resolve to the scope carrying our span.\n // 4. Nest: any child span started in the traced op parents to that active span.\n channel.start.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n // Stash the caller's store before we swap in the span store, so `asyncStart` can restore it for\n // callback-style channels (see `_sentryCallerStore`).\n data._sentryCallerStore = asyncLocalStorage.getStore();\n\n const span = getSpan(data);\n if (!span) {\n // Leave the active context untouched so nested operations keep parenting to the enclosing span.\n return data._sentryCallerStore as TData;\n }\n data._sentrySpan = span;\n\n return getStoreWithActiveSpan(asyncLocalStorage, span) as TData;\n });\n\n // Restore the caller's context for the async continuation. Only callback-style channels `runStores`\n // `asyncStart` (so the callback runs inside this store). promise channels `publish` it, leaving this\n // inert, their continuation already inherits the caller's context natively.\n channel.asyncStart.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n return data._sentryCallerStore as TData;\n });\n\n return {\n channel,\n unbind: () => {\n // Removes the stores\n channel.start.unbindStore(asyncLocalStorage);\n channel.asyncStart.unbindStore(asyncLocalStorage);\n },\n };\n}\n\nfunction endBoundSpan<TData extends object>(\n data: TracingChannelPayloadWithSpan<TData>,\n beforeSpanEnd: TracingChannelLifeCycleOptions<TData>['beforeSpanEnd'],\n): void {\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n beforeSpanEnd?.(span, data);\n span.end();\n}\n\ntype ErrorInfo = {\n message: string | undefined;\n attributes: Record<string, string>;\n};\n\n/**\n * Best-effort message and attribute extraction for thrown/rejected values.\n */\nfunction getErrorInfo(error: unknown): ErrorInfo {\n const errorIsObject = isObjectLike(error);\n const raw = errorIsObject ? ('message' in error ? error.message : undefined) : error;\n\n // Leave the status message unset if not set (e.g. an `AggregateError` from\n // ECONNREFUSED, whose `.message` is empty). Otherwise cast to string.\n const message = raw ? String(raw) : undefined;\n const type = errorIsObject && 'name' in error ? String(error.name) : 'unknown';\n\n return {\n message,\n attributes: {\n [ERROR_TYPE]: type,\n },\n };\n}\n\nfunction getStoreWithActiveSpan(asyncLocalStorage: AsyncLocalStorage<unknown>, span: Span): unknown {\n return withActiveSpan(span, () => {\n return asyncLocalStorage.getStore();\n });\n}\n"],"mappings":";;;;AAuFA,MAAM,aAAmB,CAAC;;AAG1B,SAAgB,oBAAuB,IAA4B;CACjE,IAAI;EACF,OAAO,GAAG;CACZ,SAAS,OAAO;EACd,eAAe,MAAM,KAAK,kDAAkD,KAAK;EACjF;CACF;AACF;;;;;;;;;;AAWA,SAAgB,yBACd,SACA,SACA,MACoC;CACpC,MAAM,SAAS,uBAAuB,SAAS,OAAO;CAEtD,MAAM,gBAAgB,MAAM;CAC5B,MAAM,eAAe,MAAM;CAC3B,MAAM,gBAAgB,MAAmD;EACvE,IAAI,OAAO,MAAM,iBAAiB,YAChC,OAAO,KAAK,aAAa,CAAC;EAG5B,OAAO,EACL,WAAW;GACT,MAAM;GACN,SAAS;EACX,EACF;CACF;CAIA,MAAM,qBAAqB,MAAY,UAAyB;EAC9D,IAAI,MAAM,cAER,iBAAiB,OAAO,aAAa,KAAK,CAAC;EAG7C,MAAM,EAAE,SAAS,eAAe,aAAa,KAAK;EAClD,KAAK,UAAU;GAAE,MAAM;GAAmB;EAAQ,CAAC;EACnD,KAAK,cAAc,UAAU;CAC/B;CAGA,MAAM,mBAAmB,MAAY,SAA+C;EAClF,IAAI,QAAQ;EAEZ,QAAQ,UAA0B;GAChC,IAAI,OACF;GAGF,QAAQ;GACR,IAAI,UAAU,KAAA,GAAW;IACvB,kBAAkB,MAAM,KAAK;IAG7B,KAAK,QAAQ;GACf;GAEA,aAAa,MAAM,aAAa;EAClC;CACF;CAEA,MAAM,cAAwF;EAC5F,OAAO;EACP,YAAY;EACZ,IAAI,MAAM;GAGR,IAAI,WAAW,QAAQ,YAAY,MAAM;IACvC,MAAM,OAAO,KAAK;IAClB,IAAI,QAAQ,eAAe;KAAE;KAAM;KAAM,KAAK,gBAAgB,MAAM,IAAI;IAAE,CAAC,GACzE;IAEF,aAAa,MAAM,aAAa;GAClC;EACF;EACA,MAAM,MAAM;GAGV,MAAM,OAAO,KAAK;GAClB,IAAI,CAAC,MACH;GAGF,kBAAkB,MAAM,KAAK,KAAK;EACpC;EACA,SAAS,MAAM;GACb,MAAM,OAAO,KAAK;GAClB,IAAI,QAAQ,eAAe;IAAE;IAAM;IAAM,KAAK,gBAAgB,MAAM,IAAI;GAAE,CAAC,GACzE;GAEF,aAAa,MAAM,aAAa;EAClC;CACF;CAEA,OAAO,QAAQ,UAAU,WAAW;CAEpC,OAAO;EACL,SAAS,OAAO;EAChB,cAAc;GACZ,OAAO,QAAQ,YAAY,WAAW;GACtC,OAAO,OAAO;EAChB;CACF;AACF;;;;;;;;AASA,SAAgB,uBACd,SACA,SACoC;CAEpC,MAAM,UAAU,wBAAwB,eAAe,CAAC,CAAC,CAAC,2BAA2B;CAIrF,IAAI,CAAC,SAAS;EACZ,eAAe,MAAM,IAAI,0DAA0D;EAEnF,OAAO;GACL;GACA,QAAQ;EACV;CACF;CAGA,MAAM,oBAAoB,QAAQ;CAOlC,QAAQ,MAAM,UAAU,oBAAoB,SAA+C;EAGzF,KAAK,qBAAqB,kBAAkB,SAAS;EAErD,MAAM,OAAO,QAAQ,IAAI;EACzB,IAAI,CAAC,MAEH,OAAO,KAAK;EAEd,KAAK,cAAc;EAEnB,OAAO,uBAAuB,mBAAmB,IAAI;CACvD,CAAC;CAKD,QAAQ,WAAW,UAAU,oBAAoB,SAA+C;EAC9F,OAAO,KAAK;CACd,CAAC;CAED,OAAO;EACL;EACA,cAAc;GAEZ,QAAQ,MAAM,YAAY,iBAAiB;GAC3C,QAAQ,WAAW,YAAY,iBAAiB;EAClD;CACF;AACF;AAEA,SAAS,aACP,MACA,eACM;CACN,MAAM,OAAO,KAAK;CAClB,IAAI,CAAC,MACH;CAEF,gBAAgB,MAAM,IAAI;CAC1B,KAAK,IAAI;AACX;;;;AAUA,SAAS,aAAa,OAA2B;CAC/C,MAAM,gBAAgB,aAAa,KAAK;CACxC,MAAM,MAAM,gBAAiB,aAAa,QAAQ,MAAM,UAAU,KAAA,IAAa;CAI/E,MAAM,UAAU,MAAM,OAAO,GAAG,IAAI,KAAA;CACpC,MAAM,OAAO,iBAAiB,UAAU,QAAQ,OAAO,MAAM,IAAI,IAAI;CAErE,OAAO;EACL;EACA,YAAY,GACT,aAAa,KAChB;CACF;AACF;AAEA,SAAS,uBAAuB,mBAA+C,MAAqB;CAClG,OAAO,eAAe,YAAY;EAChC,OAAO,kBAAkB,SAAS;CACpC,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
+ import { addNonEnumerableProperty, captureException, debug, isThenable, startNewTrace, stringMatchesSomePattern, withMonitor } from "@sentry/core";
1
2
  import { DEBUG_BUILD } from "../debug-build.js";
2
3
  import { tracingChannel } from "./diagnosticsChannel.js";
3
- import { addNonEnumerableProperty, captureException, debug, isThenable, startNewTrace, stringMatchesSomePattern, withMonitor } from "@sentry/core";
4
4
  // src/utils/cronMonitoring.ts
5
5
  const MONITORED = Symbol.for("sentry.cron.monitored");
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { isBun } from "./runtime.js";
2
1
  import * as nodeDiagnosticsChannel from "node:diagnostics_channel";
2
+ import { isBun } from "./runtime.js";
3
3
  // src/utils/diagnosticsChannel.ts
4
4
  const keepChannelsReferenced = isBun();
5
5
  const channelsByName = /* @__PURE__ */ new Map();
@@ -1,12 +1,12 @@
1
- import { dirname } from "@sentry/core";
2
1
  import { posix, sep } from "node:path";
2
+ import { dirname as dirname$1 } from "@sentry/core";
3
3
  // src/utils/module.ts
4
4
  /** normalizes Windows paths */
5
5
  function normalizeWindowsPath(path) {
6
6
  return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
7
7
  }
8
8
  /** Creates a function that gets the module name from a filename */
9
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows = sep === "\\") {
9
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname$1(process.argv[1]) : process.cwd(), isWindows = sep === "\\") {
10
10
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
11
11
  return (filename) => {
12
12
  if (!filename) return;
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../../../src/utils/module.ts"],"sourcesContent":["import { posix, sep } from 'node:path';\nimport { dirname } from '@sentry/core';\n\n/** normalizes Windows paths */\nfunction normalizeWindowsPath(path: string): string {\n return path\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/'); // replace all `\\` instances with `/`\n}\n\n/** Creates a function that gets the module name from a filename */\nexport function createGetModuleFromFilename(\n basePath: string = process.argv[1] ? dirname(process.argv[1]) : process.cwd(),\n isWindows: boolean = sep === '\\\\',\n): (filename: string | undefined) => string | undefined {\n const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;\n\n return (filename: string | undefined) => {\n if (!filename) {\n return;\n }\n\n const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;\n\n // eslint-disable-next-line prefer-const\n let { dir, base: file, ext } = posix.parse(normalizedFilename);\n\n if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {\n file = file.slice(0, ext.length * -1);\n }\n\n // The file name might be URI-encoded which we want to decode to\n // the original file name.\n const decodedFile = decodeURIComponent(file);\n\n if (!dir) {\n // No dirname whatsoever\n dir = '.';\n }\n\n const n = dir.lastIndexOf('/node_modules');\n if (n > -1) {\n return `${dir.slice(n + 14).replace(/\\//g, '.')}:${decodedFile}`;\n }\n\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n if (dir.startsWith(normalizedBase)) {\n const moduleName = dir.slice(normalizedBase.length + 1).replace(/\\//g, '.');\n return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;\n }\n\n return decodedFile;\n };\n}\n"],"mappings":";;;;AAIA,SAAS,qBAAqB,MAAsB;CAClD,OAAO,KACJ,QAAQ,WAAW,EAAE,CAAC,CACtB,QAAQ,OAAO,GAAG;AACvB;;AAGA,SAAgB,4BACd,WAAmB,QAAQ,KAAK,KAAK,QAAQ,QAAQ,KAAK,EAAE,IAAI,QAAQ,IAAI,GAC5E,YAAqB,QAAQ,MACyB;CACtD,MAAM,iBAAiB,YAAY,qBAAqB,QAAQ,IAAI;CAEpE,QAAQ,aAAiC;EACvC,IAAI,CAAC,UACH;EAGF,MAAM,qBAAqB,YAAY,qBAAqB,QAAQ,IAAI;EAGxE,IAAI,EAAE,KAAK,MAAM,MAAM,QAAQ,MAAM,MAAM,kBAAkB;EAE7D,IAAI,QAAQ,SAAS,QAAQ,UAAU,QAAQ,QAC7C,OAAO,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;EAKtC,MAAM,cAAc,mBAAmB,IAAI;EAE3C,IAAI,CAAC,KAEH,MAAM;EAGR,MAAM,IAAI,IAAI,YAAY,eAAe;EACzC,IAAI,IAAI,IACN,OAAO,GAAG,IAAI,MAAM,IAAI,EAAE,CAAC,CAAC,QAAQ,OAAO,GAAG,EAAE,GAAG;EAKrD,IAAI,IAAI,WAAW,cAAc,GAAG;GAClC,MAAM,aAAa,IAAI,MAAM,eAAe,SAAS,CAAC,CAAC,CAAC,QAAQ,OAAO,GAAG;GAC1E,OAAO,aAAa,GAAG,WAAW,GAAG,gBAAgB;EACvD;EAEA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"module.js","names":["dirname"],"sources":["../../../src/utils/module.ts"],"sourcesContent":["import { posix, sep } from 'node:path';\nimport { dirname } from '@sentry/core';\n\n/** normalizes Windows paths */\nfunction normalizeWindowsPath(path: string): string {\n return path\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/'); // replace all `\\` instances with `/`\n}\n\n/** Creates a function that gets the module name from a filename */\nexport function createGetModuleFromFilename(\n basePath: string = process.argv[1] ? dirname(process.argv[1]) : process.cwd(),\n isWindows: boolean = sep === '\\\\',\n): (filename: string | undefined) => string | undefined {\n const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;\n\n return (filename: string | undefined) => {\n if (!filename) {\n return;\n }\n\n const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;\n\n // eslint-disable-next-line prefer-const\n let { dir, base: file, ext } = posix.parse(normalizedFilename);\n\n if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {\n file = file.slice(0, ext.length * -1);\n }\n\n // The file name might be URI-encoded which we want to decode to\n // the original file name.\n const decodedFile = decodeURIComponent(file);\n\n if (!dir) {\n // No dirname whatsoever\n dir = '.';\n }\n\n const n = dir.lastIndexOf('/node_modules');\n if (n > -1) {\n return `${dir.slice(n + 14).replace(/\\//g, '.')}:${decodedFile}`;\n }\n\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n if (dir.startsWith(normalizedBase)) {\n const moduleName = dir.slice(normalizedBase.length + 1).replace(/\\//g, '.');\n return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;\n }\n\n return decodedFile;\n };\n}\n"],"mappings":";;;;AAIA,SAAS,qBAAqB,MAAsB;CAClD,OAAO,KACJ,QAAQ,WAAW,EAAE,CAAC,CACtB,QAAQ,OAAO,GAAG;AACvB;;AAGA,SAAgB,4BACd,WAAmB,QAAQ,KAAK,KAAKA,UAAQ,QAAQ,KAAK,EAAE,IAAI,QAAQ,IAAI,GAC5E,YAAqB,QAAQ,MACyB;CACtD,MAAM,iBAAiB,YAAY,qBAAqB,QAAQ,IAAI;CAEpE,QAAQ,aAAiC;EACvC,IAAI,CAAC,UACH;EAGF,MAAM,qBAAqB,YAAY,qBAAqB,QAAQ,IAAI;EAGxE,IAAI,EAAE,KAAK,MAAM,MAAM,QAAQ,MAAM,MAAM,kBAAkB;EAE7D,IAAI,QAAQ,SAAS,QAAQ,UAAU,QAAQ,QAC7C,OAAO,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;EAKtC,MAAM,cAAc,mBAAmB,IAAI;EAE3C,IAAI,CAAC,KAEH,MAAM;EAGR,MAAM,IAAI,IAAI,YAAY,eAAe;EACzC,IAAI,IAAI,IACN,OAAO,GAAG,IAAI,MAAM,IAAI,EAAE,CAAC,CAAC,QAAQ,OAAO,GAAG,EAAE,GAAG;EAKrD,IAAI,IAAI,WAAW,cAAc,GAAG;GAClC,MAAM,aAAa,IAAI,MAAM,eAAe,SAAS,CAAC,CAAC,CAAC,QAAQ,OAAO,GAAG;GAC1E,OAAO,aAAa,GAAG,WAAW,GAAG,gBAAgB;EACvD;EAEA,OAAO;CACT;AACF"}
@@ -1,5 +1,5 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
1
  import { debug, isError } from "@sentry/core";
2
+ import { DEBUG_BUILD } from "../debug-build.js";
3
3
  // src/utils/monitorStream.ts
4
4
  /**
5
5
  * Monitor the source without reading ahead or treating cancellation as a source failure.
@@ -1,5 +1,5 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
1
  import { debug, getTraceServerTimingHeader, isSharedCacheable } from "@sentry/core";
2
+ import { DEBUG_BUILD } from "../debug-build.js";
3
3
  // src/utils/serverTimingTraceHeader.ts
4
4
  const SERVER_TIMING_HEADER = "server-timing";
5
5
  const enabledClients = /* @__PURE__ */ new WeakSet();
@@ -1,6 +1,6 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
1
  import { debug } from "@sentry/core";
3
2
  import { handleServedNodeTunnelRequest, httpServerHandlesTunnel } from "@sentry/core/server";
3
+ import { DEBUG_BUILD } from "../debug-build.js";
4
4
  // src/utils/tunnelServer.ts
5
5
  const tunnelServers = /* @__PURE__ */ new WeakSet();
6
6
  /**
@@ -1,10 +1,10 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
- import { monitorStream } from "./monitorStream.js";
3
- import { withServerTimingTraceHeader } from "./serverTimingTraceHeader.js";
4
1
  import { CLIENT_ADDRESS, CLIENT_PORT, HTTP_REQUEST_BODY_SIZE, NETWORK_PROTOCOL_NAME, SENTRY_KIND, SENTRY_OP, SENTRY_SEGMENT_NAME_SOURCE, USER_AGENT_ORIGINAL } from "@sentry/conventions/attributes";
5
- import { HTTP_SPAN_NAME_FALLBACK, SPAN_STATUS_ERROR, captureBodyFromWinterCGRequest, captureException, continueTrace, getCurrentScope, getHttpSpanDetailsFromUrlObject, hasSpanStreamingEnabled, hasSpansEnabled, httpHeadersToSpanAttributes, parseStringToURLObject, safeCallback, setHttpStatus, startSpanManual, winterCGHeadersToDict, winterCGRequestToRequestData, withIsolationScope, withScope } from "@sentry/core";
6
2
  import { HTTP_SERVER } from "@sentry/conventions/op";
3
+ import { HTTP_SPAN_NAME_FALLBACK, SPAN_STATUS_ERROR, captureBodyFromWinterCGRequest, captureException, continueTrace, getCurrentScope, getHttpSpanDetailsFromUrlObject, hasSpanStreamingEnabled, hasSpansEnabled, httpHeadersToSpanAttributes, parseStringToURLObject, safeCallback, setHttpStatus, startSpanManual, winterCGHeadersToDict, winterCGRequestToRequestData, withIsolationScope, withScope } from "@sentry/core";
7
4
  import { classifyResponseStreaming, getClientIPAddress, isServedTunnelRequest, isStaticAssetRequest, startRequestSession } from "@sentry/core/server";
5
+ import { DEBUG_BUILD } from "../debug-build.js";
6
+ import { monitorStream } from "./monitorStream.js";
7
+ import { withServerTimingTraceHeader } from "./serverTimingTraceHeader.js";
8
8
  // src/utils/wrapServerRequestHandler.ts
9
9
  /**
10
10
  * Wraps a handler of a web `Request`, as used by `Deno.serve`, `Bun.serve` and Cloudflare Workers.
@@ -1,7 +1,7 @@
1
1
  import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
2
- import _classPrivateFieldInitSpec, { init_classPrivateFieldInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js";
3
- import _classPrivateFieldSet2, { init_classPrivateFieldSet2 } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js";
4
- import _classPrivateFieldGet2, { init_classPrivateFieldGet2 } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js";
2
+ import _classPrivateFieldInitSpec, { init_classPrivateFieldInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldInitSpec.js";
3
+ import _classPrivateFieldSet2, { init_classPrivateFieldSet2 } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldSet2.js";
4
+ import _classPrivateFieldGet2, { init_classPrivateFieldGet2 } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldGet2.js";
5
5
  import { require_semifies } from "../../../semifies/index.js";
6
6
  import { require_transformer } from "./transformer.js";
7
7
  // ../../node_modules/.pnpm/@apm-js-collab+code-transformer@0.19.0/node_modules/@apm-js-collab/code-transformer/lib/matcher.js
@@ -1,9 +1,9 @@
1
1
  import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
2
- import _classPrivateMethodInitSpec, { init_classPrivateMethodInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js";
3
- import _classPrivateFieldInitSpec, { init_classPrivateFieldInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js";
4
- import _classPrivateFieldSet2, { init_classPrivateFieldSet2 } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js";
5
- import _classPrivateFieldGet2, { init_classPrivateFieldGet2 } from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js";
6
- import _assertClassBrand from "../../../../_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js";
2
+ import _classPrivateMethodInitSpec, { init_classPrivateMethodInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateMethodInitSpec.js";
3
+ import _classPrivateFieldInitSpec, { init_classPrivateFieldInitSpec } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldInitSpec.js";
4
+ import _classPrivateFieldSet2, { init_classPrivateFieldSet2 } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldSet2.js";
5
+ import _classPrivateFieldGet2, { init_classPrivateFieldGet2 } from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/classPrivateFieldGet2.js";
6
+ import _assertClassBrand from "../../../../_virtual/_@oxc-project_runtime@0.160.0/helpers/esm/assertClassBrand.js";
7
7
  import "../../../esquery/dist/esquery.min.js";
8
8
  import { __cjs as require_esquery_min__cjs } from "../../../../_virtual/_cjs/require_esquery_min.js";
9
9
  import "../../../meriyah/dist/meriyah.js";
@@ -1,8 +1,8 @@
1
1
  import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
2
2
  import { require_code_transformer } from "../../../code-transformer/index.js";
3
- import { require_module_details_from_path } from "../../../../module-details-from-path/index.js";
4
3
  import { extname, join } from "node:path";
5
4
  import { readFileSync } from "node:fs";
5
+ import { require_module_details_from_path } from "../../../../module-details-from-path/index.js";
6
6
  // ../../node_modules/.pnpm/@apm-js-collab+code-transformer-bundler-plugins@0.7.6_esbuild@0.28.1_rollup@4.68.3_vite_ba2d60d9522bfc1375bd8d747d2e3205/node_modules/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-BiWIBBjf.mjs
7
7
  var import_code_transformer = require_code_transformer();
8
8
  var import_module_details_from_path = /* @__PURE__ */ __toESM(require_module_details_from_path(), 1);
@@ -1,9 +1,9 @@
1
1
  import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
2
2
  import { n as serializeInstrumentations, t as deserializeInstrumentations } from "./instrumentation-serde-C-Xxv-jj.js";
3
3
  import { require_code_transformer } from "../../../code-transformer/index.js";
4
- import { require_module_details_from_path } from "../../../../module-details-from-path/index.js";
5
4
  import { extname, join } from "node:path";
6
5
  import { readFileSync } from "node:fs";
6
+ import { require_module_details_from_path } from "../../../../module-details-from-path/index.js";
7
7
  // ../../node_modules/.pnpm/@apm-js-collab+code-transformer-bundler-plugins@0.7.6_esbuild@0.28.1_rollup@4.68.3_vite_ba2d60d9522bfc1375bd8d747d2e3205/node_modules/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.mjs
8
8
  var import_code_transformer = require_code_transformer();
9
9
  var import_module_details_from_path = /* @__PURE__ */ __toESM(require_module_details_from_path(), 1);
@@ -2,6 +2,7 @@ import { __cjs as require_esquery_min__cjs } from "../../../_virtual/_cjs/requir
2
2
  import { __commonJSMin } from "../../../_virtual/_rolldown/runtime.js";
3
3
  // ../../node_modules/.pnpm/esquery@1.7.0/node_modules/esquery/dist/esquery.min.js
4
4
  var require_esquery_min = /* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
5
+ var define;
5
6
  (function(e, t) {
6
7
  "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self).esquery = t();
7
8
  })(this$1, (function() {