@sentry/cloudflare 10.68.0 → 11.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/build/cjs/dev/baseSdk.js +83 -0
- package/build/cjs/dev/baseSdk.js.map +1 -0
- package/build/cjs/{client.js → dev/client.js} +5 -0
- package/build/cjs/dev/client.js.map +1 -0
- package/build/cjs/dev/debug-build.js.map +1 -0
- package/build/cjs/dev/defineCloudflareOptions.js.map +1 -0
- package/build/cjs/dev/durableobject.js +234 -0
- package/build/cjs/dev/durableobject.js.map +1 -0
- package/build/cjs/dev/flush.js.map +1 -0
- package/build/cjs/{index.js → dev/index.js} +18 -17
- package/build/cjs/{index.js.map → dev/index.js.map} +1 -1
- package/build/cjs/dev/instrument.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/index.js +16 -0
- package/build/cjs/dev/instrumentations/agents/index.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js +52 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js +19 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js +31 -0
- package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/types.js +77 -0
- package/build/cjs/dev/instrumentations/agents/types.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectStorage.js +6 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/instrumentSqlStorage.js +1 -1
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/instrumentWorkerEntrypoint.js +3 -3
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentD1.js +0 -4
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentEmail.js +3 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentEnv.js +3 -4
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentFetch.js +9 -3
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentQueue.js +3 -2
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentScheduled.js +3 -1
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/cjs/{integrations → dev/integrations}/fetch.js +1 -1
- package/build/cjs/dev/integrations/fetch.js.map +1 -0
- package/build/cjs/{integrations → dev/integrations}/httpServer.js +5 -4
- package/build/cjs/dev/integrations/httpServer.js.map +1 -0
- package/build/cjs/dev/integrations/spotlight.js +64 -0
- package/build/cjs/dev/integrations/spotlight.js.map +1 -0
- package/build/cjs/{nodejs_compat → dev}/integrations/tracing/vercelai.js +6 -6
- package/build/cjs/dev/integrations/tracing/vercelai.js.map +1 -0
- package/build/cjs/dev/opentelemetry/tracer.js.map +1 -0
- package/build/cjs/dev/options.js +50 -0
- package/build/cjs/dev/options.js.map +1 -0
- package/build/cjs/{pages-plugin.js → dev/pages-plugin.js} +8 -3
- package/build/cjs/dev/pages-plugin.js.map +1 -0
- package/build/cjs/{request.js → dev/request.js} +23 -12
- package/build/cjs/dev/request.js.map +1 -0
- package/build/cjs/dev/scope-utils.js.map +1 -0
- package/build/cjs/dev/sdk.js +19 -0
- package/build/cjs/dev/sdk.js.map +1 -0
- package/build/cjs/dev/transport.js.map +1 -0
- package/build/cjs/{utils → dev/utils}/instrumentContext.js +8 -13
- package/build/cjs/dev/utils/instrumentContext.js.map +1 -0
- package/build/cjs/dev/utils/internalSqlQuery.js +25 -0
- package/build/cjs/dev/utils/internalSqlQuery.js.map +1 -0
- package/build/cjs/dev/utils/internalStorageKey.js +44 -0
- package/build/cjs/dev/utils/internalStorageKey.js.map +1 -0
- package/build/cjs/dev/utils/invocationScope.js +12 -0
- package/build/cjs/dev/utils/invocationScope.js.map +1 -0
- package/build/cjs/dev/utils/isBinding.js.map +1 -0
- package/build/cjs/dev/utils/isCloudflareClass.js.map +1 -0
- package/build/cjs/{utils → dev/utils}/rpcMeta.js +4 -0
- package/build/cjs/dev/utils/rpcMeta.js.map +1 -0
- package/build/cjs/dev/utils/streaming.js.map +1 -0
- package/build/cjs/dev/utils/traceLinks.js.map +1 -0
- package/build/cjs/dev/vendor/stacktrace.js.map +1 -0
- package/build/cjs/dev/vite/agentClass.js +114 -0
- package/build/cjs/dev/vite/agentClass.js.map +1 -0
- package/build/cjs/{vite → dev/vite}/autoInstrument.js +17 -4
- package/build/cjs/dev/vite/autoInstrument.js.map +1 -0
- package/build/cjs/{vite → dev/vite}/index.js +4 -2
- package/build/cjs/dev/vite/index.js.map +1 -0
- package/build/cjs/dev/vite/instrumentFile.js.map +1 -0
- package/build/cjs/dev/vite/moduleShape.js +231 -0
- package/build/cjs/dev/vite/moduleShape.js.map +1 -0
- package/build/cjs/{vite → dev/vite}/transform.js +6 -1
- package/build/cjs/dev/vite/transform.js.map +1 -0
- package/build/cjs/dev/vite/workerEntrypoint.js.map +1 -0
- package/build/cjs/{vite → dev/vite}/wranglerConfig.js +1 -1
- package/build/cjs/dev/vite/wranglerConfig.js.map +1 -0
- package/build/cjs/{withSentry.js → dev/withSentry.js} +2 -19
- package/build/cjs/dev/withSentry.js.map +1 -0
- package/build/cjs/{workflows.js → dev/workflows.js} +9 -4
- package/build/cjs/dev/workflows.js.map +1 -0
- package/build/cjs/{wrapMethodWithSentry.js → dev/wrapMethodWithSentry.js} +2 -3
- package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -0
- package/build/cjs/{sdk.js → prod/baseSdk.js} +25 -17
- package/build/cjs/prod/baseSdk.js.map +1 -0
- package/build/cjs/prod/client.js +122 -0
- package/build/cjs/prod/client.js.map +1 -0
- package/build/cjs/prod/debug-build.js +6 -0
- package/build/cjs/prod/debug-build.js.map +1 -0
- package/build/cjs/prod/defineCloudflareOptions.js +11 -0
- package/build/cjs/prod/defineCloudflareOptions.js.map +1 -0
- package/build/cjs/prod/durableobject.js +234 -0
- package/build/cjs/prod/durableobject.js.map +1 -0
- package/build/cjs/prod/flush.js +87 -0
- package/build/cjs/prod/flush.js.map +1 -0
- package/build/cjs/{nodejs_compat → prod}/index.js +34 -35
- package/build/cjs/{nodejs_compat → prod}/index.js.map +1 -1
- package/build/cjs/prod/instrument.js +52 -0
- package/build/cjs/prod/instrument.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/index.js +16 -0
- package/build/cjs/prod/instrumentations/agents/index.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js +52 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js +19 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js +31 -0
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/types.js +77 -0
- package/build/cjs/prod/instrumentations/agents/types.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +41 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js +72 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +40 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +42 -0
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +139 -0
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js +161 -0
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +63 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +90 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +54 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js +24 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +82 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js +80 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js +124 -0
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js +29 -0
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +78 -0
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js +60 -0
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/cjs/prod/integrations/fetch.js +119 -0
- package/build/cjs/prod/integrations/fetch.js.map +1 -0
- package/build/cjs/prod/integrations/httpServer.js +36 -0
- package/build/cjs/prod/integrations/httpServer.js.map +1 -0
- package/build/cjs/prod/integrations/spotlight.js +64 -0
- package/build/cjs/prod/integrations/spotlight.js.map +1 -0
- package/build/cjs/{integrations → prod/integrations}/tracing/vercelai.js +5 -5
- package/build/cjs/prod/integrations/tracing/vercelai.js.map +1 -0
- package/build/cjs/prod/opentelemetry/tracer.js +49 -0
- package/build/cjs/prod/opentelemetry/tracer.js.map +1 -0
- package/build/cjs/{options.js → prod/options.js} +5 -1
- package/build/cjs/prod/options.js.map +1 -0
- package/build/cjs/prod/pages-plugin.js +24 -0
- package/build/cjs/prod/pages-plugin.js.map +1 -0
- package/build/cjs/prod/request.js +132 -0
- package/build/cjs/prod/request.js.map +1 -0
- package/build/cjs/prod/scope-utils.js +22 -0
- package/build/cjs/prod/scope-utils.js.map +1 -0
- package/build/cjs/prod/sdk.js +19 -0
- package/build/cjs/prod/sdk.js.map +1 -0
- package/build/cjs/prod/transport.js +75 -0
- package/build/cjs/prod/transport.js.map +1 -0
- package/build/cjs/prod/utils/instrumentContext.js +63 -0
- package/build/cjs/prod/utils/instrumentContext.js.map +1 -0
- package/build/cjs/prod/utils/internalSqlQuery.js +25 -0
- package/build/cjs/prod/utils/internalSqlQuery.js.map +1 -0
- package/build/cjs/prod/utils/internalStorageKey.js +44 -0
- package/build/cjs/prod/utils/internalStorageKey.js.map +1 -0
- package/build/cjs/prod/utils/invocationScope.js +12 -0
- package/build/cjs/prod/utils/invocationScope.js.map +1 -0
- package/build/cjs/prod/utils/isBinding.js +37 -0
- package/build/cjs/prod/utils/isBinding.js.map +1 -0
- package/build/cjs/prod/utils/isCloudflareClass.js +23 -0
- package/build/cjs/prod/utils/isCloudflareClass.js.map +1 -0
- package/build/cjs/prod/utils/rpcMeta.js +39 -0
- package/build/cjs/prod/utils/rpcMeta.js.map +1 -0
- package/build/cjs/prod/utils/streaming.js +16 -0
- package/build/cjs/prod/utils/streaming.js.map +1 -0
- package/build/cjs/prod/utils/traceLinks.js +54 -0
- package/build/cjs/prod/utils/traceLinks.js.map +1 -0
- package/build/cjs/prod/vendor/stacktrace.js +28 -0
- package/build/cjs/prod/vendor/stacktrace.js.map +1 -0
- package/build/cjs/prod/vite/agentClass.js +114 -0
- package/build/cjs/prod/vite/agentClass.js.map +1 -0
- package/build/cjs/prod/vite/autoInstrument.js +94 -0
- package/build/cjs/prod/vite/autoInstrument.js.map +1 -0
- package/build/cjs/prod/vite/index.js +16 -0
- package/build/cjs/prod/vite/index.js.map +1 -0
- package/build/cjs/prod/vite/instrumentFile.js +31 -0
- package/build/cjs/prod/vite/instrumentFile.js.map +1 -0
- package/build/cjs/prod/vite/moduleShape.js +231 -0
- package/build/cjs/prod/vite/moduleShape.js.map +1 -0
- package/build/cjs/prod/vite/transform.js +149 -0
- package/build/cjs/prod/vite/transform.js.map +1 -0
- package/build/cjs/prod/vite/workerEntrypoint.js +66 -0
- package/build/cjs/prod/vite/workerEntrypoint.js.map +1 -0
- package/build/cjs/prod/vite/wranglerConfig.js +54 -0
- package/build/cjs/prod/vite/wranglerConfig.js.map +1 -0
- package/build/cjs/prod/withSentry.js +29 -0
- package/build/cjs/prod/withSentry.js.map +1 -0
- package/build/cjs/prod/workflows.js +139 -0
- package/build/cjs/prod/workflows.js.map +1 -0
- package/build/cjs/prod/wrapMethodWithSentry.js +134 -0
- package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -0
- package/build/esm/dev/baseSdk.js +79 -0
- package/build/esm/dev/baseSdk.js.map +1 -0
- package/build/esm/{client.js → dev/client.js} +6 -1
- package/build/esm/dev/client.js.map +1 -0
- package/build/esm/dev/debug-build.js.map +1 -0
- package/build/esm/dev/defineCloudflareOptions.js.map +1 -0
- package/build/esm/dev/durableobject.js +229 -0
- package/build/esm/dev/durableobject.js.map +1 -0
- package/build/esm/dev/flush.js.map +1 -0
- package/build/esm/dev/index.js +15 -0
- package/build/esm/{index.js.map → dev/index.js.map} +1 -1
- package/build/esm/dev/instrument.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/index.js +14 -0
- package/build/esm/dev/instrumentations/agents/index.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js +50 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js +17 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js +29 -0
- package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/types.js +69 -0
- package/build/esm/dev/instrumentations/agents/types.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectStorage.js +7 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/instrumentSqlStorage.js +1 -1
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/instrumentWorkerEntrypoint.js +2 -2
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentD1.js +1 -4
- package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentEmail.js +3 -1
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentEnv.js +3 -4
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentFetch.js +10 -4
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentQueue.js +4 -3
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentScheduled.js +3 -1
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/fetch.js +1 -1
- package/build/esm/dev/integrations/fetch.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/httpServer.js +5 -4
- package/build/esm/dev/integrations/httpServer.js.map +1 -0
- package/build/esm/dev/integrations/spotlight.js +61 -0
- package/build/esm/dev/integrations/spotlight.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/tracing/vercelai.js +5 -5
- package/build/esm/dev/integrations/tracing/vercelai.js.map +1 -0
- package/build/esm/dev/opentelemetry/tracer.js.map +1 -0
- package/build/esm/dev/options.js +48 -0
- package/build/esm/dev/options.js.map +1 -0
- package/build/esm/dev/package.json +1 -0
- package/build/esm/{pages-plugin.js → dev/pages-plugin.js} +8 -3
- package/build/esm/dev/pages-plugin.js.map +1 -0
- package/build/esm/{request.js → dev/request.js} +24 -14
- package/build/esm/dev/request.js.map +1 -0
- package/build/esm/dev/scope-utils.js.map +1 -0
- package/build/esm/dev/sdk.js +16 -0
- package/build/esm/dev/sdk.js.map +1 -0
- package/build/esm/dev/transport.js.map +1 -0
- package/build/esm/{utils → dev/utils}/instrumentContext.js +8 -13
- package/build/esm/dev/utils/instrumentContext.js.map +1 -0
- package/build/esm/dev/utils/internalSqlQuery.js +23 -0
- package/build/esm/dev/utils/internalSqlQuery.js.map +1 -0
- package/build/esm/dev/utils/internalStorageKey.js +41 -0
- package/build/esm/dev/utils/internalStorageKey.js.map +1 -0
- package/build/esm/dev/utils/invocationScope.js +10 -0
- package/build/esm/dev/utils/invocationScope.js.map +1 -0
- package/build/esm/dev/utils/isBinding.js.map +1 -0
- package/build/esm/dev/utils/isCloudflareClass.js.map +1 -0
- package/build/esm/{utils → dev/utils}/rpcMeta.js +4 -1
- package/build/esm/dev/utils/rpcMeta.js.map +1 -0
- package/build/esm/dev/utils/streaming.js.map +1 -0
- package/build/esm/dev/utils/traceLinks.js.map +1 -0
- package/build/esm/dev/vendor/stacktrace.js.map +1 -0
- package/build/esm/dev/vite/agentClass.js +111 -0
- package/build/esm/dev/vite/agentClass.js.map +1 -0
- package/build/esm/{vite → dev/vite}/autoInstrument.js +17 -4
- package/build/esm/dev/vite/autoInstrument.js.map +1 -0
- package/build/esm/{vite → dev/vite}/index.js +4 -2
- package/build/esm/dev/vite/index.js.map +1 -0
- package/build/esm/dev/vite/instrumentFile.js.map +1 -0
- package/build/esm/dev/vite/moduleShape.js +227 -0
- package/build/esm/dev/vite/moduleShape.js.map +1 -0
- package/build/esm/{vite → dev/vite}/transform.js +6 -1
- package/build/esm/dev/vite/transform.js.map +1 -0
- package/build/esm/dev/vite/workerEntrypoint.js.map +1 -0
- package/build/esm/{vite → dev/vite}/wranglerConfig.js +1 -1
- package/build/esm/dev/vite/wranglerConfig.js.map +1 -0
- package/build/esm/{withSentry.js → dev/withSentry.js} +1 -18
- package/build/esm/dev/withSentry.js.map +1 -0
- package/build/esm/{workflows.js → dev/workflows.js} +9 -4
- package/build/esm/dev/workflows.js.map +1 -0
- package/build/esm/{wrapMethodWithSentry.js → dev/wrapMethodWithSentry.js} +3 -4
- package/build/esm/dev/wrapMethodWithSentry.js.map +1 -0
- package/build/esm/{sdk.js → prod/baseSdk.js} +24 -17
- package/build/esm/prod/baseSdk.js.map +1 -0
- package/build/esm/prod/client.js +120 -0
- package/build/esm/prod/client.js.map +1 -0
- package/build/esm/prod/debug-build.js +4 -0
- package/build/esm/prod/debug-build.js.map +1 -0
- package/build/esm/prod/defineCloudflareOptions.js +9 -0
- package/build/esm/prod/defineCloudflareOptions.js.map +1 -0
- package/build/esm/prod/durableobject.js +229 -0
- package/build/esm/prod/durableobject.js.map +1 -0
- package/build/esm/prod/flush.js +83 -0
- package/build/esm/prod/flush.js.map +1 -0
- package/build/esm/prod/index.js +15 -0
- package/build/esm/{nodejs_compat → prod}/index.js.map +1 -1
- package/build/esm/prod/instrument.js +48 -0
- package/build/esm/prod/instrument.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/index.js +14 -0
- package/build/esm/prod/instrumentations/agents/index.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js +50 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js +17 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js +29 -0
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/types.js +69 -0
- package/build/esm/prod/instrumentations/agents/types.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +38 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js +70 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +38 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js +40 -0
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +137 -0
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentD1.js +159 -0
- package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js +61 -0
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js +88 -0
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js +51 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js +22 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js +79 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js +78 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentR2.js +122 -0
- package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js +27 -0
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +75 -0
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentTail.js +57 -0
- package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/esm/prod/integrations/fetch.js +117 -0
- package/build/esm/prod/integrations/fetch.js.map +1 -0
- package/build/esm/prod/integrations/httpServer.js +33 -0
- package/build/esm/prod/integrations/httpServer.js.map +1 -0
- package/build/esm/prod/integrations/spotlight.js +61 -0
- package/build/esm/prod/integrations/spotlight.js.map +1 -0
- package/build/esm/prod/integrations/tracing/vercelai.js +16 -0
- package/build/esm/prod/integrations/tracing/vercelai.js.map +1 -0
- package/build/esm/prod/opentelemetry/tracer.js +47 -0
- package/build/esm/prod/opentelemetry/tracer.js.map +1 -0
- package/build/esm/{options.js → prod/options.js} +5 -1
- package/build/esm/prod/options.js.map +1 -0
- package/build/esm/prod/package.json +1 -0
- package/build/esm/prod/pages-plugin.js +22 -0
- package/build/esm/prod/pages-plugin.js.map +1 -0
- package/build/esm/prod/request.js +129 -0
- package/build/esm/prod/request.js.map +1 -0
- package/build/esm/prod/scope-utils.js +18 -0
- package/build/esm/prod/scope-utils.js.map +1 -0
- package/build/esm/prod/sdk.js +16 -0
- package/build/esm/prod/sdk.js.map +1 -0
- package/build/esm/prod/transport.js +72 -0
- package/build/esm/prod/transport.js.map +1 -0
- package/build/esm/prod/utils/instrumentContext.js +61 -0
- package/build/esm/prod/utils/instrumentContext.js.map +1 -0
- package/build/esm/prod/utils/internalSqlQuery.js +23 -0
- package/build/esm/prod/utils/internalSqlQuery.js.map +1 -0
- package/build/esm/prod/utils/internalStorageKey.js +41 -0
- package/build/esm/prod/utils/internalStorageKey.js.map +1 -0
- package/build/esm/prod/utils/invocationScope.js +10 -0
- package/build/esm/prod/utils/invocationScope.js.map +1 -0
- package/build/esm/prod/utils/isBinding.js +29 -0
- package/build/esm/prod/utils/isBinding.js.map +1 -0
- package/build/esm/prod/utils/isCloudflareClass.js +21 -0
- package/build/esm/prod/utils/isCloudflareClass.js.map +1 -0
- package/build/esm/prod/utils/rpcMeta.js +35 -0
- package/build/esm/prod/utils/rpcMeta.js.map +1 -0
- package/build/esm/prod/utils/streaming.js +14 -0
- package/build/esm/prod/utils/streaming.js.map +1 -0
- package/build/esm/prod/utils/traceLinks.js +49 -0
- package/build/esm/prod/utils/traceLinks.js.map +1 -0
- package/build/esm/prod/vendor/stacktrace.js +25 -0
- package/build/esm/prod/vendor/stacktrace.js.map +1 -0
- package/build/esm/prod/vite/agentClass.js +111 -0
- package/build/esm/prod/vite/agentClass.js.map +1 -0
- package/build/esm/prod/vite/autoInstrument.js +92 -0
- package/build/esm/prod/vite/autoInstrument.js.map +1 -0
- package/build/esm/prod/vite/index.js +14 -0
- package/build/esm/prod/vite/index.js.map +1 -0
- package/build/esm/prod/vite/instrumentFile.js +27 -0
- package/build/esm/prod/vite/instrumentFile.js.map +1 -0
- package/build/esm/prod/vite/moduleShape.js +227 -0
- package/build/esm/prod/vite/moduleShape.js.map +1 -0
- package/build/esm/prod/vite/transform.js +147 -0
- package/build/esm/prod/vite/transform.js.map +1 -0
- package/build/esm/prod/vite/workerEntrypoint.js +64 -0
- package/build/esm/prod/vite/workerEntrypoint.js.map +1 -0
- package/build/esm/prod/vite/wranglerConfig.js +52 -0
- package/build/esm/prod/vite/wranglerConfig.js.map +1 -0
- package/build/esm/prod/withSentry.js +27 -0
- package/build/esm/prod/withSentry.js.map +1 -0
- package/build/esm/prod/workflows.js +136 -0
- package/build/esm/prod/workflows.js.map +1 -0
- package/build/esm/prod/wrapMethodWithSentry.js +132 -0
- package/build/esm/prod/wrapMethodWithSentry.js.map +1 -0
- package/build/types/baseSdk.d.ts +28 -0
- package/build/types/baseSdk.d.ts.map +1 -0
- package/build/types/client.d.ts +43 -33
- package/build/types/client.d.ts.map +1 -1
- package/build/types/defineCloudflareOptions.d.ts +2 -2
- package/build/types/defineCloudflareOptions.d.ts.map +1 -1
- package/build/types/durableobject.d.ts +93 -2
- package/build/types/durableobject.d.ts.map +1 -1
- package/build/types/flush.d.ts +1 -1
- package/build/types/flush.d.ts.map +1 -1
- package/build/types/index.d.ts +5 -6
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentations/agents/index.d.ts +25 -0
- package/build/types/instrumentations/agents/index.d.ts.map +1 -0
- package/build/types/instrumentations/agents/instrumentAgentCallableRpc.d.ts +14 -0
- package/build/types/instrumentations/agents/instrumentAgentCallableRpc.d.ts.map +1 -0
- package/build/types/instrumentations/agents/instrumentAgentRequestConversation.d.ts +16 -0
- package/build/types/instrumentations/agents/instrumentAgentRequestConversation.d.ts.map +1 -0
- package/build/types/instrumentations/agents/instrumentChatAgentConversation.d.ts +23 -0
- package/build/types/instrumentations/agents/instrumentChatAgentConversation.d.ts.map +1 -0
- package/build/types/instrumentations/agents/types.d.ts +94 -0
- package/build/types/instrumentations/agents/types.d.ts.map +1 -0
- package/build/types/instrumentations/instrumentDurableObjectStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentSqlStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts +2 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentD1.d.ts +0 -16
- package/build/types/instrumentations/worker/instrumentD1.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEmail.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentFetch.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentFetch.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueue.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentTail.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
- package/build/types/integrations/httpServer.d.ts.map +1 -1
- package/build/types/integrations/spotlight.d.ts +22 -0
- package/build/types/integrations/spotlight.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai.d.ts +2 -9
- package/build/types/integrations/tracing/vercelai.d.ts.map +1 -1
- package/build/types/options.d.ts.map +1 -1
- package/build/types/pages-plugin.d.ts +1 -1
- package/build/types/pages-plugin.d.ts.map +1 -1
- package/build/types/request.d.ts +17 -2
- package/build/types/request.d.ts.map +1 -1
- package/build/types/sdk.d.ts +8 -3
- package/build/types/sdk.d.ts.map +1 -1
- package/build/types/transport.d.ts.map +1 -1
- package/build/types/types.d.ts +85 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/utils/instrumentContext.d.ts.map +1 -1
- package/build/types/utils/internalSqlQuery.d.ts +4 -2
- package/build/types/utils/internalSqlQuery.d.ts.map +1 -1
- package/build/types/utils/internalStorageKey.d.ts +22 -0
- package/build/types/utils/internalStorageKey.d.ts.map +1 -0
- package/build/types/utils/invocationScope.d.ts +24 -0
- package/build/types/utils/invocationScope.d.ts.map +1 -0
- package/build/types/utils/isCloudflareClass.d.ts +1 -1
- package/build/types/utils/isCloudflareClass.d.ts.map +1 -1
- package/build/types/utils/rpcMeta.d.ts +8 -0
- package/build/types/utils/rpcMeta.d.ts.map +1 -1
- package/build/types/vite/agentClass.d.ts +41 -0
- package/build/types/vite/agentClass.d.ts.map +1 -0
- package/build/types/vite/autoInstrument.d.ts +7 -6
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +31 -45
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/moduleShape.d.ts +52 -0
- package/build/types/vite/moduleShape.d.ts.map +1 -0
- package/build/types/vite/transform.d.ts +6 -1
- package/build/types/vite/transform.d.ts.map +1 -1
- package/build/types/withSentry.d.ts +2 -2
- package/build/types/withSentry.d.ts.map +1 -1
- package/build/types/workflows.d.ts +5 -4
- package/build/types/workflows.d.ts.map +1 -1
- package/build/types/wrapMethodWithSentry.d.ts +1 -1
- package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
- package/package.json +28 -51
- package/build/cjs/async.js +0 -63
- package/build/cjs/async.js.map +0 -1
- package/build/cjs/client.js.map +0 -1
- package/build/cjs/debug-build.js.map +0 -1
- package/build/cjs/defineCloudflareOptions.js.map +0 -1
- package/build/cjs/durableobject.js +0 -120
- package/build/cjs/durableobject.js.map +0 -1
- package/build/cjs/flush.js.map +0 -1
- package/build/cjs/instrument.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentSqlStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentWorkerEntrypoint.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentD1.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentEmail.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentEnv.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentFetch.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentFetcher.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentQueue.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentQueueProducer.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentR2.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentScheduled.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentTail.js.map +0 -1
- package/build/cjs/integrations/fetch.js.map +0 -1
- package/build/cjs/integrations/hono.js +0 -52
- package/build/cjs/integrations/hono.js.map +0 -1
- package/build/cjs/integrations/httpServer.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai.js.map +0 -1
- package/build/cjs/nodejs_compat/integrations/tracing/vercelai.js.map +0 -1
- package/build/cjs/opentelemetry/tracer.js.map +0 -1
- package/build/cjs/options.js.map +0 -1
- package/build/cjs/pages-plugin.js.map +0 -1
- package/build/cjs/request.js.map +0 -1
- package/build/cjs/scope-utils.js.map +0 -1
- package/build/cjs/sdk.js.map +0 -1
- package/build/cjs/transport.js.map +0 -1
- package/build/cjs/utils/instrumentContext.js.map +0 -1
- package/build/cjs/utils/internalSqlQuery.js +0 -19
- package/build/cjs/utils/internalSqlQuery.js.map +0 -1
- package/build/cjs/utils/isBinding.js.map +0 -1
- package/build/cjs/utils/isCloudflareClass.js.map +0 -1
- package/build/cjs/utils/rpcMeta.js.map +0 -1
- package/build/cjs/utils/rpcOptions.js +0 -26
- package/build/cjs/utils/rpcOptions.js.map +0 -1
- package/build/cjs/utils/streaming.js.map +0 -1
- package/build/cjs/utils/traceLinks.js.map +0 -1
- package/build/cjs/vendor/stacktrace.js.map +0 -1
- package/build/cjs/vite/autoInstrument.js.map +0 -1
- package/build/cjs/vite/index.js.map +0 -1
- package/build/cjs/vite/instrumentFile.js.map +0 -1
- package/build/cjs/vite/transform.js.map +0 -1
- package/build/cjs/vite/workerEntrypoint.js.map +0 -1
- package/build/cjs/vite/wranglerConfig.js.map +0 -1
- package/build/cjs/withSentry.js.map +0 -1
- package/build/cjs/workflows.js.map +0 -1
- package/build/cjs/wrapMethodWithSentry.js.map +0 -1
- package/build/esm/async.js +0 -61
- package/build/esm/async.js.map +0 -1
- package/build/esm/client.js.map +0 -1
- package/build/esm/debug-build.js.map +0 -1
- package/build/esm/defineCloudflareOptions.js.map +0 -1
- package/build/esm/durableobject.js +0 -118
- package/build/esm/durableobject.js.map +0 -1
- package/build/esm/flush.js.map +0 -1
- package/build/esm/index.js +0 -16
- package/build/esm/instrument.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectNamespace.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentSqlStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentWorkerEntrypoint.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentD1.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentEmail.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentEnv.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentFetch.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentFetcher.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentQueue.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentQueueProducer.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentR2.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentScheduled.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentTail.js.map +0 -1
- package/build/esm/integrations/fetch.js.map +0 -1
- package/build/esm/integrations/hono.js +0 -49
- package/build/esm/integrations/hono.js.map +0 -1
- package/build/esm/integrations/httpServer.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/nodejs_compat/index.js +0 -17
- package/build/esm/nodejs_compat/integrations/tracing/vercelai.js +0 -16
- package/build/esm/nodejs_compat/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/opentelemetry/tracer.js.map +0 -1
- package/build/esm/options.js.map +0 -1
- package/build/esm/package.json +0 -1
- package/build/esm/pages-plugin.js.map +0 -1
- package/build/esm/request.js.map +0 -1
- package/build/esm/scope-utils.js.map +0 -1
- package/build/esm/sdk.js.map +0 -1
- package/build/esm/transport.js.map +0 -1
- package/build/esm/utils/instrumentContext.js.map +0 -1
- package/build/esm/utils/internalSqlQuery.js +0 -17
- package/build/esm/utils/internalSqlQuery.js.map +0 -1
- package/build/esm/utils/isBinding.js.map +0 -1
- package/build/esm/utils/isCloudflareClass.js.map +0 -1
- package/build/esm/utils/rpcMeta.js.map +0 -1
- package/build/esm/utils/rpcOptions.js +0 -24
- package/build/esm/utils/rpcOptions.js.map +0 -1
- package/build/esm/utils/streaming.js.map +0 -1
- package/build/esm/utils/traceLinks.js.map +0 -1
- package/build/esm/vendor/stacktrace.js.map +0 -1
- package/build/esm/vite/autoInstrument.js.map +0 -1
- package/build/esm/vite/index.js.map +0 -1
- package/build/esm/vite/instrumentFile.js.map +0 -1
- package/build/esm/vite/transform.js.map +0 -1
- package/build/esm/vite/workerEntrypoint.js.map +0 -1
- package/build/esm/vite/wranglerConfig.js.map +0 -1
- package/build/esm/withSentry.js.map +0 -1
- package/build/esm/workflows.js.map +0 -1
- package/build/esm/wrapMethodWithSentry.js.map +0 -1
- package/build/types/async.d.ts +0 -11
- package/build/types/async.d.ts.map +0 -1
- package/build/types/integrations/hono.d.ts +0 -42
- package/build/types/integrations/hono.d.ts.map +0 -1
- package/build/types/nodejs_compat/index.d.ts +0 -4
- package/build/types/nodejs_compat/index.d.ts.map +0 -1
- package/build/types/nodejs_compat/integrations/tracing/vercelai.d.ts +0 -37
- package/build/types/nodejs_compat/integrations/tracing/vercelai.d.ts.map +0 -1
- package/build/types/utils/rpcOptions.d.ts +0 -13
- package/build/types/utils/rpcOptions.d.ts.map +0 -1
- package/build/types-ts3.8/async.d.ts +0 -11
- package/build/types-ts3.8/client.d.ts +0 -166
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/defineCloudflareOptions.d.ts +0 -38
- package/build/types-ts3.8/durableobject.d.ts +0 -37
- package/build/types-ts3.8/executionContext.d.ts +0 -13
- package/build/types-ts3.8/flush.d.ts +0 -47
- package/build/types-ts3.8/index.d.ts +0 -18
- package/build/types-ts3.8/instrument.d.ts +0 -20
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectNamespace.d.ts +0 -13
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectStorage.d.ts +0 -19
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectSyncKvStorage.d.ts +0 -3
- package/build/types-ts3.8/instrumentations/instrumentSqlStorage.d.ts +0 -9
- package/build/types-ts3.8/instrumentations/instrumentWorkerEntrypoint.d.ts +0 -42
- package/build/types-ts3.8/instrumentations/worker/instrumentD1.d.ts +0 -19
- package/build/types-ts3.8/instrumentations/worker/instrumentEmail.d.ts +0 -8
- package/build/types-ts3.8/instrumentations/worker/instrumentEnv.d.ts +0 -18
- package/build/types-ts3.8/instrumentations/worker/instrumentFetch.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentFetcher.d.ts +0 -10
- package/build/types-ts3.8/instrumentations/worker/instrumentQueue.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentQueueProducer.d.ts +0 -10
- package/build/types-ts3.8/instrumentations/worker/instrumentR2.d.ts +0 -9
- package/build/types-ts3.8/instrumentations/worker/instrumentRateLimit.d.ts +0 -6
- package/build/types-ts3.8/instrumentations/worker/instrumentScheduled.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentTail.d.ts +0 -12
- package/build/types-ts3.8/integrations/fetch.d.ts +0 -19
- package/build/types-ts3.8/integrations/hono.d.ts +0 -42
- package/build/types-ts3.8/integrations/httpServer.d.ts +0 -63
- package/build/types-ts3.8/integrations/tracing/vercelai.d.ts +0 -47
- package/build/types-ts3.8/nodejs_compat/index.d.ts +0 -4
- package/build/types-ts3.8/nodejs_compat/integrations/tracing/vercelai.d.ts +0 -37
- package/build/types-ts3.8/opentelemetry/tracer.d.ts +0 -6
- package/build/types-ts3.8/options.d.ts +0 -17
- package/build/types-ts3.8/pages-plugin.d.ts +0 -34
- package/build/types-ts3.8/request.d.ts +0 -25
- package/build/types-ts3.8/scope-utils.d.ts +0 -15
- package/build/types-ts3.8/sdk.d.ts +0 -10
- package/build/types-ts3.8/transport.d.ts +0 -34
- package/build/types-ts3.8/utils/instrumentContext.d.ts +0 -16
- package/build/types-ts3.8/utils/internalSqlQuery.d.ts +0 -18
- package/build/types-ts3.8/utils/isBinding.d.ts +0 -77
- package/build/types-ts3.8/utils/isCloudflareClass.d.ts +0 -30
- package/build/types-ts3.8/utils/rpcMeta.d.ts +0 -15
- package/build/types-ts3.8/utils/rpcOptions.d.ts +0 -13
- package/build/types-ts3.8/utils/streaming.d.ts +0 -17
- package/build/types-ts3.8/utils/traceLinks.d.ts +0 -28
- package/build/types-ts3.8/vendor/stacktrace.d.ts +0 -11
- package/build/types-ts3.8/vite/autoInstrument.d.ts +0 -21
- package/build/types-ts3.8/vite/index.d.ts +0 -88
- package/build/types-ts3.8/vite/instrumentFile.d.ts +0 -22
- package/build/types-ts3.8/vite/transform.d.ts +0 -60
- package/build/types-ts3.8/vite/workerEntrypoint.d.ts +0 -12
- package/build/types-ts3.8/vite/wranglerConfig.d.ts +0 -43
- package/build/types-ts3.8/withSentry.d.ts +0 -16
- package/build/types-ts3.8/workflows.d.ts +0 -25
- package/build/types-ts3.8/wrapMethodWithSentry.d.ts +0 -43
- /package/build/cjs/{debug-build.js → dev/debug-build.js} +0 -0
- /package/build/cjs/{defineCloudflareOptions.js → dev/defineCloudflareOptions.js} +0 -0
- /package/build/cjs/{flush.js → dev/flush.js} +0 -0
- /package/build/cjs/{instrument.js → dev/instrument.js} +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectNamespace.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectSyncKvStorage.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentFetcher.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentQueueProducer.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentR2.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentRateLimit.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentTail.js +0 -0
- /package/build/cjs/{opentelemetry → dev/opentelemetry}/tracer.js +0 -0
- /package/build/cjs/{scope-utils.js → dev/scope-utils.js} +0 -0
- /package/build/cjs/{transport.js → dev/transport.js} +0 -0
- /package/build/cjs/{utils → dev/utils}/isBinding.js +0 -0
- /package/build/cjs/{utils → dev/utils}/isCloudflareClass.js +0 -0
- /package/build/cjs/{utils → dev/utils}/streaming.js +0 -0
- /package/build/cjs/{utils → dev/utils}/traceLinks.js +0 -0
- /package/build/cjs/{vendor → dev/vendor}/stacktrace.js +0 -0
- /package/build/cjs/{vite → dev/vite}/instrumentFile.js +0 -0
- /package/build/cjs/{vite → dev/vite}/workerEntrypoint.js +0 -0
- /package/build/esm/{debug-build.js → dev/debug-build.js} +0 -0
- /package/build/esm/{defineCloudflareOptions.js → dev/defineCloudflareOptions.js} +0 -0
- /package/build/esm/{flush.js → dev/flush.js} +0 -0
- /package/build/esm/{instrument.js → dev/instrument.js} +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectNamespace.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectSyncKvStorage.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentFetcher.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentQueueProducer.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentR2.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentRateLimit.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentTail.js +0 -0
- /package/build/esm/{opentelemetry → dev/opentelemetry}/tracer.js +0 -0
- /package/build/esm/{scope-utils.js → dev/scope-utils.js} +0 -0
- /package/build/esm/{transport.js → dev/transport.js} +0 -0
- /package/build/esm/{utils → dev/utils}/isBinding.js +0 -0
- /package/build/esm/{utils → dev/utils}/isCloudflareClass.js +0 -0
- /package/build/esm/{utils → dev/utils}/streaming.js +0 -0
- /package/build/esm/{utils → dev/utils}/traceLinks.js +0 -0
- /package/build/esm/{vendor → dev/vendor}/stacktrace.js +0 -0
- /package/build/esm/{vite → dev/vite}/instrumentFile.js +0 -0
- /package/build/esm/{vite → dev/vite}/workerEntrypoint.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAID;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAGzB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAE3D,OAAO,CAAC,cAAc,CAAsD;IAE5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAID;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAGzB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAE3D,OAAO,CAAC,cAAc,CAAsD;IAE5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,YAAmB,WAAW,SAAgC,EAI7D;IAED;;OAEG;IACI,GAAG,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAOnH;IAED;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAyBnD;CACF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,CAkCtF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { env as cloudflareEnv } from 'cloudflare:workers';
|
|
2
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
3
|
+
/**
|
|
4
|
+
* A handler method of an `ExportedHandler` (`fetch`, `scheduled`, `queue`, ...).
|
|
5
|
+
*/
|
|
6
|
+
type AnyHandlerMethod = (event: any, env: any, ctx: any) => any;
|
|
7
|
+
/**
|
|
8
|
+
* Structural version of `ExportedHandler` that accepts every env/message/metadata/props
|
|
9
|
+
* combination. Used as the handler constraint of `withSentry` instead of
|
|
10
|
+
* `ExportedHandler<any, any, any>`: on `@cloudflare/workers-types` v5, `ExportedHandler`
|
|
11
|
+
* has a 4th generic (`ExecutionContext<Props>`) which defaults to `unknown`, so a direct
|
|
12
|
+
* `ExportedHandler<any, any, any>` constraint rejects handlers typed with a concrete
|
|
13
|
+
* `Props`. Referencing the 4th generic is not an option either — it does not exist on v4,
|
|
14
|
+
* which the SDK also supports.
|
|
15
|
+
*/
|
|
16
|
+
export interface AnyExportedHandler {
|
|
17
|
+
fetch?: AnyHandlerMethod;
|
|
18
|
+
scheduled?: AnyHandlerMethod;
|
|
19
|
+
queue?: AnyHandlerMethod;
|
|
20
|
+
email?: AnyHandlerMethod;
|
|
21
|
+
tail?: AnyHandlerMethod;
|
|
22
|
+
trace?: AnyHandlerMethod;
|
|
23
|
+
tailStream?: AnyHandlerMethod;
|
|
24
|
+
connect?: AnyHandlerMethod;
|
|
25
|
+
test?: AnyHandlerMethod;
|
|
26
|
+
}
|
|
27
|
+
type HandlerMethodName = keyof AnyExportedHandler;
|
|
28
|
+
/**
|
|
29
|
+
* Extracts the `Env` type from a handler method signature (its second parameter).
|
|
30
|
+
* `any` methods are skipped: framework app types like Hono's carry a string index
|
|
31
|
+
* signature, which would otherwise make every missing handler method read as `any`
|
|
32
|
+
* and poison the inferred env.
|
|
33
|
+
*/
|
|
34
|
+
type EnvFromMethod<Method> = IsAny<Method> extends true ? never : Method extends (event: any, env: infer Env, ctx: any) => any ? Env : never;
|
|
35
|
+
/**
|
|
36
|
+
* Extracts the `Env` type from an `ExportedHandler`-shaped type.
|
|
37
|
+
*
|
|
38
|
+
* This infers the env from any of the handler methods (`fetch`, `scheduled`, `queue`, ...),
|
|
39
|
+
* so a handler literal with `satisfies ExportedHandler<Env>` or a pre-typed
|
|
40
|
+
* `ExportedHandler<Env>` both yield their `Env`. The structural read (instead of
|
|
41
|
+
* `T extends ExportedHandler<infer Env, ...>`) keeps inference working for
|
|
42
|
+
* `ExecutionContext<Props>`-typed handlers on workers-types v5.
|
|
43
|
+
*/
|
|
44
|
+
type InferEnvFromHandler<T> = T extends AnyExportedHandler ? {
|
|
45
|
+
[K in HandlerMethodName]: K extends keyof T ? EnvFromMethod<T[K]> : never;
|
|
46
|
+
}[HandlerMethodName] : never;
|
|
47
|
+
/**
|
|
48
|
+
* Extracts the `Env` type from a class constructor type (`WorkerEntrypoint`, `DurableObject`
|
|
49
|
+
* or `WorkflowEntrypoint` subclasses). The env is inferred from the second constructor parameter,
|
|
50
|
+
* which carries the user's env type both for explicit constructors and for constructors inherited
|
|
51
|
+
* from a `WorkerEntrypoint<Env>` / `DurableObject<Env>` / `WorkflowEntrypoint<Env>` base class.
|
|
52
|
+
*/
|
|
53
|
+
type InferEnvFromConstructor<T> = T extends new (ctx: any, env: infer Env) => any ? Env : never;
|
|
54
|
+
/**
|
|
55
|
+
* Infers the `Env` type from a handler passed to one of the instrumentation functions.
|
|
56
|
+
* Returns `never` when nothing can be inferred.
|
|
57
|
+
*/
|
|
58
|
+
export type InferEnv<T> = [InferEnvFromHandler<T>] extends [never] ? InferEnvFromConstructor<T> : InferEnvFromHandler<T>;
|
|
59
|
+
/**
|
|
60
|
+
* Removes empty object types (`{}`) from a union. Framework handler types like Hono's
|
|
61
|
+
* `fetch(request, env?: E['Bindings'] | {}, ...)` union the env with `{}`, which would
|
|
62
|
+
* otherwise collapse the inferred env to "empty" — filtering keeps the meaningful member.
|
|
63
|
+
*/
|
|
64
|
+
type FilterEmptyObjects<T> = T extends any ? ([keyof T] extends [never] ? never : T) : never;
|
|
65
|
+
/**
|
|
66
|
+
* Resolves the env type exposed on the options callback of the instrumentation functions.
|
|
67
|
+
*
|
|
68
|
+
* Resolution order:
|
|
69
|
+
* 1. The env inferred from the passed handler (e.g. via `satisfies ExportedHandler<Env>`,
|
|
70
|
+
* a pre-typed handler, or a `WorkerEntrypoint<Env>` subclass).
|
|
71
|
+
* 2. The explicitly provided `Env` generic (e.g. `withSentry<Env>(...)`), which defaults
|
|
72
|
+
* to the wrangler-generated `Cloudflare.Env` (via `typeof cloudflareEnv`).
|
|
73
|
+
* 3. `any` as the last resort, so untyped setups keep compiling instead of failing on
|
|
74
|
+
* an empty `Cloudflare.Env` interface.
|
|
75
|
+
*/
|
|
76
|
+
export type ResolveEnv<Handler, ExplicitEnv> = IsAny<FilterEmptyObjects<InferEnv<Handler>>> extends true ? ExplicitEnv : unknown extends FilterEmptyObjects<InferEnv<Handler>> ? ExplicitEnv : [FilterEmptyObjects<InferEnv<Handler>>] extends [never] ? ExplicitEnv : FilterEmptyObjects<InferEnv<Handler>>;
|
|
77
|
+
/**
|
|
78
|
+
* The default env type when nothing can be inferred and no explicit generic is provided:
|
|
79
|
+
* the wrangler-generated `Cloudflare.Env` (via `cloudflare:workers`), falling back to `any`
|
|
80
|
+
* when the project never ran `wrangler types` (the interface is empty) so property access
|
|
81
|
+
* on `env` does not fail.
|
|
82
|
+
*/
|
|
83
|
+
export type DefaultEnv = [keyof typeof cloudflareEnv] extends [never] ? any : typeof cloudflareEnv;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE/D,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/C;;GAEG;AAEH,KAAK,gBAAgB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED,KAAK,iBAAiB,GAAG,MAAM,kBAAkB,CAAC;AAElD;;;;;GAKG;AAEH,KAAK,aAAa,CAAC,MAAM,IACvB,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,GACtB,KAAK,GAEL,MAAM,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,GAC1D,GAAG,GACH,KAAK,CAAC;AAEd;;;;;;;;GAQG;AACH,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,kBAAkB,GACtD;KACG,CAAC,IAAI,iBAAiB,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAC1E,CAAC,iBAAiB,CAAC,GACpB,KAAK,CAAC;AAEV;;;;;GAKG;AAEH,KAAK,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC;AAEhG;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAC9D,uBAAuB,CAAC,CAAC,CAAC,GAC1B,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAE3B;;;;GAIG;AAEH,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AAE7F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,WAAW,IACzC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GACrD,WAAW,GACX,OAAO,SAAS,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GACnD,WAAW,GACX,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACrD,WAAW,GACX,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,GAEjE,GAAG,GACH,OAAO,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentContext.d.ts","sourceRoot":"","sources":["../../../src/utils/instrumentContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA6B,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGtH,KAAK,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAGzD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"instrumentContext.d.ts","sourceRoot":"","sources":["../../../src/utils/instrumentContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA6B,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGtH,KAAK,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAGzD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CA6ClE"}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
*
|
|
13
13
|
* The check operates on the query summary produced by `getSqlQuerySummary` (`{operation} {table} ...`,
|
|
14
14
|
* the same value used as the span name), so table targets are already isolated from the rest of the
|
|
15
|
-
* query.
|
|
15
|
+
* query. The one exception is `CREATE INDEX`: its summary carries the index name, not the indexed
|
|
16
|
+
* table (upstream OTel convention), so the `cf_` target only appears in the ON clause of the full
|
|
17
|
+
* statement, which `queryText` is needed for.
|
|
16
18
|
*/
|
|
17
|
-
export declare function targetsCloudflareInternalTable(querySummary: string | undefined, allowlist?: Array<string | RegExp
|
|
19
|
+
export declare function targetsCloudflareInternalTable(querySummary: string | undefined, allowlist?: Array<string | RegExp>, queryText?: string): boolean;
|
|
18
20
|
//# sourceMappingURL=internalSqlQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalSqlQuery.d.ts","sourceRoot":"","sources":["../../../src/utils/internalSqlQuery.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"internalSqlQuery.d.ts","sourceRoot":"","sources":["../../../src/utils/internalSqlQuery.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAClC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAaT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare frameworks that build on Durable Objects (`agents`, `partyserver`, ...) also manage
|
|
3
|
+
* their own internal KV entries alongside their internal SQLite tables, namespaced with a reserved
|
|
4
|
+
* prefix — e.g. `cf_agents_state`, `cf_agents_mcp_servers`, `__ps_name`. Reads/writes of these
|
|
5
|
+
* (message persistence, MCP connection bookkeeping, name hydration) are framework implementation
|
|
6
|
+
* details that otherwise flood traces with dozens of zero-signal `durable_object_storage_*` spans
|
|
7
|
+
* per request, so we match the reserved prefixes rather than an enumerated list. This mirrors the
|
|
8
|
+
* `cf_` convention used for internal SQL tables (see `targetsCloudflareInternalTable`).
|
|
9
|
+
*
|
|
10
|
+
* The prefixes are a reserved convention for framework-managed entries, so user keys should not use
|
|
11
|
+
* them. In case a user key does collide, the `durableObjectStorageSpanAllowlist` option lets them
|
|
12
|
+
* opt those keys back into instrumentation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function targetsCloudflareInternalKey(key: string | undefined, allowlist?: Array<string | RegExp>): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Extracts the KV keys a Durable Object storage call targets, so the caller can decide whether the
|
|
17
|
+
* operation only touches framework-internal entries. Returns `undefined` when the keys can't be
|
|
18
|
+
* determined from the arguments (e.g. `list()` without a prefix), in which case the call is treated
|
|
19
|
+
* as user work and stays instrumented.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getStorageKeys(methodName: string, args: unknown[]): string[] | undefined;
|
|
22
|
+
//# sourceMappingURL=internalStorageKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalStorageKey.d.ts","sourceRoot":"","sources":["../../../src/utils/internalStorageKey.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAsBjH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAgCxF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Scope } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Runs `callback` on the isolation scope for the current invocation.
|
|
4
|
+
*
|
|
5
|
+
* An instrumented handler is either the entry point of an invocation or reentrant — reached from
|
|
6
|
+
* another instrumented handler already serving the same invocation (a Durable Object method calling
|
|
7
|
+
* its own `fetch`, an RPC method reaching a sibling method). Only the entry point may fork:
|
|
8
|
+
*
|
|
9
|
+
* - Forking at the entry point is mandatory. `setUser`/`setTag` write to the isolation scope, and a
|
|
10
|
+
* Durable Object's isolation scope outlives the invocation that touched it, so without a fork one
|
|
11
|
+
* invocation's user and tags reappear on the next invocation's events in the same isolate.
|
|
12
|
+
* Forking clones, so request data set by an enclosing wrapper is still inherited.
|
|
13
|
+
* - Forking again when reentrant would be wrong. Everything below the entry point is one logical
|
|
14
|
+
* unit of work: a nested call must see what the caller set and be able to add to it, the way it
|
|
15
|
+
* would if the SDK were not wrapping it at all.
|
|
16
|
+
*
|
|
17
|
+
* The AsyncLocalStorage strategy hands the default isolation scope back whenever no invocation is in
|
|
18
|
+
* flight, and a forked one while inside `withIsolationScope`. Reference-comparing against the default
|
|
19
|
+
* is therefore enough to tell the two cases apart. The stack fallback does not fork, so it reports the
|
|
20
|
+
* default scope even inside an invocation; there the fork degrades to a no-op, which the stack strategy
|
|
21
|
+
* tolerates. This matches the approach used by `patchEventHandler` in Nuxt.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withInvocationIsolationScope<T>(callback: (scope: Scope) => T): T;
|
|
24
|
+
//# sourceMappingURL=invocationScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocationScope.d.ts","sourceRoot":"","sources":["../../../src/utils/invocationScope.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,KAAK,EAAsB,MAAM,cAAc,CAAC;AAE3G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAMhF"}
|
|
@@ -24,7 +24,7 @@ import type { WorkerEntrypointConstructor } from '../instrumentations/instrument
|
|
|
24
24
|
* isCloudflareClass(MyDO, 'DurableObject') // true if MyDO extends DurableObject
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare function isCloudflareClass(value: unknown, className: 'WorkerEntrypoint'): value is WorkerEntrypointConstructor
|
|
27
|
+
export declare function isCloudflareClass(value: unknown, className: 'WorkerEntrypoint'): value is WorkerEntrypointConstructor<any, any>;
|
|
28
28
|
export declare function isCloudflareClass(value: unknown, className: 'DurableObject'): value is new (...args: unknown[]) => DurableObject;
|
|
29
29
|
export declare function isCloudflareClass(value: unknown, className: 'WorkflowEntrypoint'): value is new (...args: unknown[]) => WorkflowEntrypoint;
|
|
30
30
|
//# sourceMappingURL=isCloudflareClass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCloudflareClass.d.ts","sourceRoot":"","sources":["../../../src/utils/isCloudflareClass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAGlG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"isCloudflareClass.d.ts","sourceRoot":"","sources":["../../../src/utils/isCloudflareClass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAGlG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,kBAAkB,GAE5B,KAAK,IAAI,2BAA2B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAClD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,eAAe,GACzB,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAAC;AACtD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,oBAAoB,GAC9B,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,14 @@ import { type SerializedTraceData } from '@sentry/core';
|
|
|
4
4
|
* If no active trace exists, returns the original args unchanged.
|
|
5
5
|
*/
|
|
6
6
|
export declare function appendRpcMeta(args: unknown[]): unknown[];
|
|
7
|
+
/**
|
|
8
|
+
* Whether the trailing argument carries Sentry RPC metadata.
|
|
9
|
+
*
|
|
10
|
+
* Separate from {@link extractRpcMeta} because the RPC method wrappers run this check on every
|
|
11
|
+
* call — including the instance's own internal method calls, which never carry metadata — and
|
|
12
|
+
* must not allocate on that path.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hasRpcMeta(args: unknown[]): boolean;
|
|
7
15
|
/**
|
|
8
16
|
* Extracts Sentry RPC metadata from the trailing argument of an args array.
|
|
9
17
|
* Returns cleaned args (without meta) and the extracted trace data if found.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpcMeta.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAoBpF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAQxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAAE,EAChD,IAAI,EAAE,CAAC,GACN;IACD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAcA"}
|
|
1
|
+
{"version":3,"file":"rpcMeta.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAoBpF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAQxD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAEnD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAAE,EAChD,IAAI,EAAE,CAAC,GACN;IACD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAcA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ProgramBody } from './transform';
|
|
2
|
+
/**
|
|
3
|
+
* The subset of the Vite/Rollup plugin context needed to walk the module graph.
|
|
4
|
+
*
|
|
5
|
+
* `resolve` is optional: without it detection still works, but only for base-class chains declared
|
|
6
|
+
* inside the entry module itself. `readFile` is injectable for tests and defaults to reading disk.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately **no `load`**: awaiting the plugin context's `load()` from inside a `transform` hook
|
|
9
|
+
* deadlocks the build — the module cannot finish loading while its own transform is still pending
|
|
10
|
+
* (Rollup documents this hazard, and Vite's Rolldown pipeline is stricter still). Sibling modules
|
|
11
|
+
* are therefore read straight off disk; see {@link getModuleShape}.
|
|
12
|
+
*/
|
|
13
|
+
export interface ModuleResolver {
|
|
14
|
+
parse(code: string): ProgramBody;
|
|
15
|
+
resolve?(source: string, importer: string): Promise<{
|
|
16
|
+
id: string;
|
|
17
|
+
} | null | undefined>;
|
|
18
|
+
readFile?(id: string): string | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Find which of `candidates` (top-level class names in the entry module) are Cloudflare
|
|
22
|
+
* [`agents`](https://www.npmjs.com/package/agents) Agents.
|
|
23
|
+
*
|
|
24
|
+
* An Agent is a Durable Object under the hood, so wrangler configures it as one and the transform
|
|
25
|
+
* would otherwise reach for `instrumentDurableObjectWithSentry`. Detecting the Agent base chain lets
|
|
26
|
+
* it pick `instrumentAgentWithSentry` instead, which adds the Agent-specific telemetry on top.
|
|
27
|
+
*
|
|
28
|
+
* Unlike `WorkerEntrypoint` detection, the chain is followed *across* modules: base classes commonly
|
|
29
|
+
* live in their own file (`import { MyBase } from './base'`), and there is no runtime fallback that
|
|
30
|
+
* would catch a missed one. Resolution stops at package boundaries — a base class imported from
|
|
31
|
+
* `node_modules` is only recognized when it is one of {@link AGENT_BASE_CLASSES}.
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectAgentClasses(ast: ProgramBody, entryId: string, candidates: Iterable<string>, resolver: ModuleResolver): Promise<Set<string>>;
|
|
34
|
+
/**
|
|
35
|
+
* The local class names in the entry that a configured class name could refer to — either declared
|
|
36
|
+
* under that name directly, or aliased to it by an `export { Local as Configured }` specifier.
|
|
37
|
+
*
|
|
38
|
+
* Keeps detection (which reads and scans other modules) off classes that no binding points at.
|
|
39
|
+
*/
|
|
40
|
+
export declare function collectAgentCandidates(ast: ProgramBody, configuredNames: Iterable<string>): Set<string>;
|
|
41
|
+
//# sourceMappingURL=agentClass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentClass.d.ts","sourceRoot":"","sources":["../../../src/vite/agentClass.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvF,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC3C;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CActB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAevG"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function sentryCloudflareAutoInstrumentPlugin(
|
|
1
|
+
import { type ModuleResolver } from './agentClass';
|
|
2
|
+
export declare function sentryCloudflareAutoInstrumentPlugin(options?: {
|
|
3
|
+
wranglerConfigPath?: string;
|
|
4
|
+
}): {
|
|
3
5
|
name: string;
|
|
4
6
|
configResolved(config: {
|
|
5
7
|
root: string;
|
|
@@ -7,15 +9,14 @@ export declare function sentryCloudflareAutoInstrumentPlugin(): {
|
|
|
7
9
|
warn(msg: string): void;
|
|
8
10
|
};
|
|
9
11
|
}): void;
|
|
10
|
-
transform(this: {
|
|
11
|
-
parse(code: string): ProgramBody;
|
|
12
|
+
transform(this: ModuleResolver & {
|
|
12
13
|
warn?(msg: string): void;
|
|
13
14
|
environment?: {
|
|
14
15
|
name?: string;
|
|
15
16
|
};
|
|
16
|
-
}, code: string, id: string): {
|
|
17
|
+
}, code: string, id: string): Promise<{
|
|
17
18
|
code: string;
|
|
18
19
|
map: unknown;
|
|
19
|
-
} | undefined
|
|
20
|
+
} | undefined>;
|
|
20
21
|
};
|
|
21
22
|
//# sourceMappingURL=autoInstrument.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAgB/F,wBAAgB,oCAAoC,CAAC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO;IAQ9F,IAAI;IAEJ,cAAc,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;IAiC9E,SAAS,OACP,cAAc,GAAG;QAAE,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,QAC9E,MAAM,MACR,MAAM,GACT,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;EAiFzD"}
|
|
@@ -2,25 +2,35 @@
|
|
|
2
2
|
* Options for {@link sentryCloudflareVitePlugin}.
|
|
3
3
|
*/
|
|
4
4
|
export interface SentryCloudflareVitePluginOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Path to the wrangler config, relative to the Vite root (or absolute).
|
|
7
|
+
* Set this when your config doesn't use a default name — e.g. when you
|
|
8
|
+
* pass `configPath: './wrangler.agent.jsonc'` to `@cloudflare/vite-plugin`,
|
|
9
|
+
* which the Sentry plugin cannot see. When set, only this file is read
|
|
10
|
+
* (no default-name probing), and a warning is emitted if it is missing or
|
|
11
|
+
* unparseable.
|
|
12
|
+
*
|
|
13
|
+
* @default undefined (probes `wrangler.json`, `wrangler.jsonc`, `wrangler.toml` at the Vite root)
|
|
14
|
+
*/
|
|
15
|
+
wranglerConfigPath?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Build-time automatic instrumentation of supported dependencies (e.g.
|
|
18
|
+
* database clients like `mysql`) so the Sentry Cloudflare SDK can trace them
|
|
19
|
+
* without monkey-patching, which wouldn't work in workerd anyway.
|
|
20
|
+
*
|
|
21
|
+
* When enabled, the plugin injects `diagnostics_channel.tracingChannel` calls
|
|
22
|
+
* into the bundled packages and, next to each, a snippet that registers the
|
|
23
|
+
* matching Sentry channel-subscriber factory on the global marker, which the
|
|
24
|
+
* SDK picks up in `Sentry.withSentry()`. Both `vite build` and `vite dev` are
|
|
25
|
+
* instrumented. Set to `false` to opt out.
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
buildTimeInstrumentation?: boolean;
|
|
5
30
|
/**
|
|
6
31
|
* Experimental options that may change or be removed without notice.
|
|
7
32
|
*/
|
|
8
33
|
_experimental?: {
|
|
9
|
-
/**
|
|
10
|
-
* Enables build-time automatic instrumentation of supported dependencies
|
|
11
|
-
* (e.g. database clients like `mysql`) so the Sentry Cloudflare SDK can
|
|
12
|
-
* trace them without monkey-patching, which wouldn't work in workerd anyway.
|
|
13
|
-
*
|
|
14
|
-
* When enabled, the plugin injects `diagnostics_channel.tracingChannel`
|
|
15
|
-
* calls into the bundled packages and, next to each, a snippet that
|
|
16
|
-
* registers the matching Sentry channel-subscriber factory on the global
|
|
17
|
-
* marker, which the SDK picks up in `Sentry.withSentry()`. Both `vite build`
|
|
18
|
-
* and `vite dev` are instrumented.
|
|
19
|
-
*
|
|
20
|
-
* @default false
|
|
21
|
-
* @experimental May change or be removed in any release.
|
|
22
|
-
*/
|
|
23
|
-
useDiagnosticsChannelInjection?: boolean;
|
|
24
34
|
/**
|
|
25
35
|
* Automatically wraps your Worker at build time so you don't have to edit
|
|
26
36
|
* your entry: the plugin reads your wrangler config, wraps the default
|
|
@@ -42,10 +52,9 @@ export interface SentryCloudflareVitePluginOptions {
|
|
|
42
52
|
* instrumentation for Cloudflare Workers built with Vite. Configure the Sentry
|
|
43
53
|
* SDK in your Worker as usual with `Sentry.withSentry()`.
|
|
44
54
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* code. Without it, the plugin is a no-op.
|
|
55
|
+
* By default, the plugin build-time instruments supported dependencies (such as
|
|
56
|
+
* database clients) so they are traced without changing your application code.
|
|
57
|
+
* Opt out with `buildTimeInstrumentation: false`.
|
|
49
58
|
*
|
|
50
59
|
* @example
|
|
51
60
|
* ```ts
|
|
@@ -55,34 +64,11 @@ export interface SentryCloudflareVitePluginOptions {
|
|
|
55
64
|
* import { defineConfig } from 'vite';
|
|
56
65
|
*
|
|
57
66
|
* export default defineConfig({
|
|
58
|
-
* plugins: [
|
|
59
|
-
* cloudflare(),
|
|
60
|
-
* sentryCloudflareVitePlugin({
|
|
61
|
-
* _experimental: {
|
|
62
|
-
* useDiagnosticsChannelInjection: true,
|
|
63
|
-
* },
|
|
64
|
-
* }),
|
|
65
|
-
* ],
|
|
67
|
+
* plugins: [cloudflare(), sentryCloudflareVitePlugin()],
|
|
66
68
|
* });
|
|
67
69
|
* ```
|
|
68
70
|
*/
|
|
69
|
-
export declare function sentryCloudflareVitePlugin(options?: SentryCloudflareVitePluginOptions):
|
|
71
|
+
export declare function sentryCloudflareVitePlugin(options?: SentryCloudflareVitePluginOptions): Array<{
|
|
70
72
|
name: string;
|
|
71
|
-
|
|
72
|
-
root: string;
|
|
73
|
-
logger?: {
|
|
74
|
-
warn(msg: string): void;
|
|
75
|
-
};
|
|
76
|
-
}): void;
|
|
77
|
-
transform(this: {
|
|
78
|
-
parse(code: string): import("./transform").ProgramBody;
|
|
79
|
-
warn?(msg: string): void;
|
|
80
|
-
environment?: {
|
|
81
|
-
name?: string;
|
|
82
|
-
};
|
|
83
|
-
}, code: string, id: string): {
|
|
84
|
-
code: string;
|
|
85
|
-
map: unknown;
|
|
86
|
-
} | undefined;
|
|
87
|
-
} | import("vite").Plugin<any>)[];
|
|
73
|
+
}>;
|
|
88
74
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE;QACd;;;;;;;;;;WAUG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,iCAAsC,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CASnH"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ProgramBody } from './transform';
|
|
2
|
+
/** Binding name used for a module's default export. */
|
|
3
|
+
export declare const DEFAULT_EXPORT = "default";
|
|
4
|
+
/** A resolved superclass reference: a bare identifier or a `ns.Member` expression. */
|
|
5
|
+
export type SuperRef = {
|
|
6
|
+
kind: 'identifier';
|
|
7
|
+
name: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'member';
|
|
10
|
+
object: string;
|
|
11
|
+
property: string;
|
|
12
|
+
};
|
|
13
|
+
/** The declarations of a single module that binding resolution needs. */
|
|
14
|
+
export interface ModuleShape {
|
|
15
|
+
/** Top-level class names → their superclass reference (absent when the class has no `extends`). */
|
|
16
|
+
classes: Map<string, SuperRef | undefined>;
|
|
17
|
+
/** Local binding name → the import it came from (`imported` is `default` for a default import). */
|
|
18
|
+
imports: Map<string, {
|
|
19
|
+
source: string;
|
|
20
|
+
imported: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Local binding name → module specifier, for `import * as ns from '...'`. */
|
|
23
|
+
namespaces: Map<string, string>;
|
|
24
|
+
/** Exported name → the re-export it came from, for `export { x as y } from '...'`. */
|
|
25
|
+
reexports: Map<string, {
|
|
26
|
+
source: string;
|
|
27
|
+
imported: string;
|
|
28
|
+
}>;
|
|
29
|
+
/** Exported name → local binding name, for `export { x as y }` without a source. */
|
|
30
|
+
localExports: Map<string, string>;
|
|
31
|
+
/** Module specifiers of bare `export * from '...'` declarations. */
|
|
32
|
+
starExports: string[];
|
|
33
|
+
/** `export default <Identifier>` — the local name it refers to. */
|
|
34
|
+
defaultExportName?: string;
|
|
35
|
+
/** True when the module's default export is a class declaration/expression. */
|
|
36
|
+
defaultExportIsClass?: boolean;
|
|
37
|
+
/** Superclass of an anonymous `export default class extends X`. */
|
|
38
|
+
defaultExportSuper?: SuperRef;
|
|
39
|
+
}
|
|
40
|
+
/** Collect the shape of a module from its parsed AST — used for the already-parsed entry module. */
|
|
41
|
+
export declare function shapeFromAst(ast: ProgramBody): ModuleShape;
|
|
42
|
+
/**
|
|
43
|
+
* Extract the module shape from **unprocessed source**.
|
|
44
|
+
*
|
|
45
|
+
* Sibling modules are read straight from disk (the plugin context's `load()` would deadlock inside a
|
|
46
|
+
* transform hook), so they may still be TypeScript — which no JS parser will accept. Only
|
|
47
|
+
* import/export statements and `class X extends Y` headers matter here, and those are
|
|
48
|
+
* declaration-level syntax a scan can pick out reliably; class bodies, type annotations and generics
|
|
49
|
+
* are irrelevant and simply skipped.
|
|
50
|
+
*/
|
|
51
|
+
export declare function shapeFromSource(rawCode: string): ModuleShape;
|
|
52
|
+
//# sourceMappingURL=moduleShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleShape.d.ts","sourceRoot":"","sources":["../../../src/vite/moduleShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,WAAW,EAAE,MAAM,aAAa,CAAC;AAoDzD,uDAAuD;AACvD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,sFAAsF;AACtF,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,mGAAmG;IACnG,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;IAC3C,mGAAmG;IACnG,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,8EAA8E;IAC9E,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,sFAAsF;IACtF,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,oFAAoF;IACpF,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,oEAAoE;IACpE,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,QAAQ,CAAC;CAC/B;AAiBD,oGAAoG;AACpG,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAqC1D;AAiED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAgD5D"}
|
|
@@ -18,7 +18,7 @@ export interface ProgramBody {
|
|
|
18
18
|
* config providing only a fallback for self-bound entrypoints whose base class
|
|
19
19
|
* lives in another module.
|
|
20
20
|
*/
|
|
21
|
-
export type ClassWrapperKind = 'durableObject' | 'workflow' | 'workerEntrypoint';
|
|
21
|
+
export type ClassWrapperKind = 'durableObject' | 'agent' | 'workflow' | 'workerEntrypoint';
|
|
22
22
|
export interface TransformContext {
|
|
23
23
|
/**
|
|
24
24
|
* Exported class name → the kind of Sentry wrapper to apply. Populated from
|
|
@@ -26,6 +26,11 @@ export interface TransformContext {
|
|
|
26
26
|
* each class's base type.
|
|
27
27
|
*/
|
|
28
28
|
classWrappers: Map<string, ClassWrapperKind>;
|
|
29
|
+
/**
|
|
30
|
+
* Local class names detected as `agents` Agents. An Agent is configured as a Durable Object in
|
|
31
|
+
* wrangler, so this upgrades those entries from `durableObject` to `agent`.
|
|
32
|
+
*/
|
|
33
|
+
agentClasses?: ReadonlySet<string>;
|
|
29
34
|
optionsFn: string;
|
|
30
35
|
/** Import statement prepended when `optionsFn` references a separate module. */
|
|
31
36
|
optionsImport?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AAOvC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAuDD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,UAAU,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AAOvC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAuDD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAc3F,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C;;;;OAIG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,gBAAgB,GACpB,eAAe,GAAG,SAAS,CA8C7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { env as cloudflareEnv } from 'cloudflare:workers';
|
|
2
1
|
import type { CloudflareOptions } from './client';
|
|
2
|
+
import type { AnyExportedHandler, DefaultEnv, ResolveEnv } from './types';
|
|
3
3
|
import { type WorkerEntrypointConstructor } from './instrumentations/instrumentWorkerEntrypoint';
|
|
4
4
|
/**
|
|
5
5
|
* Wrapper for Cloudflare handlers.
|
|
@@ -12,5 +12,5 @@ import { type WorkerEntrypointConstructor } from './instrumentations/instrumentW
|
|
|
12
12
|
* @param handler {ExportedHandler} The handler to wrap.
|
|
13
13
|
* @returns The wrapped handler.
|
|
14
14
|
*/
|
|
15
|
-
export declare function withSentry<Env =
|
|
15
|
+
export declare function withSentry<Env = DefaultEnv, QueueHandlerMessage = unknown, CfHostMetadata = unknown, T extends AnyExportedHandler | WorkerEntrypointConstructor<any, any> = ExportedHandler<Env, QueueHandlerMessage, CfHostMetadata> | WorkerEntrypointConstructor<Env>>(optionsCallback: (env: ResolveEnv<T, Env>) => CloudflareOptions | undefined, handler: T): T;
|
|
16
16
|
//# sourceMappingURL=withSentry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../src/withSentry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../src/withSentry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,+CAA+C,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,GAAG,GAAG,UAAU,EAChB,mBAAmB,GAAG,OAAO,EAC7B,cAAc,GAAG,OAAO,EAExB,CAAC,SAAS,kBAAkB,GAAG,2BAA2B,CAAC,GAAG,EAAE,GAAG,CAAC,GAChE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,GACzD,2BAA2B,CAAC,GAAG,CAAC,EACpC,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,iBAAiB,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAyB5F"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
2
2
|
import type { CloudflareOptions } from './client';
|
|
3
|
+
import type { DefaultEnv, ResolveEnv } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* Hashes a string to a UUID using SHA-1.
|
|
5
6
|
*/
|
|
@@ -21,8 +22,8 @@ export declare function deterministicTraceIdFromInstanceId(instanceId: string):
|
|
|
21
22
|
* @param WorkflowClass - The workflow class to instrument
|
|
22
23
|
* @returns Instrumented workflow class with the same interface
|
|
23
24
|
*/
|
|
24
|
-
export declare function instrumentWorkflowWithSentry<E, // Environment type
|
|
25
|
-
P, // Payload type
|
|
26
|
-
T extends WorkflowEntrypoint<E, P>, // WorkflowEntrypoint type
|
|
27
|
-
C extends new (ctx: ExecutionContext, env:
|
|
25
|
+
export declare function instrumentWorkflowWithSentry<E = DefaultEnv, // Environment type
|
|
26
|
+
P = unknown, // Payload type
|
|
27
|
+
T extends WorkflowEntrypoint<any, any> = WorkflowEntrypoint<E, P>, // WorkflowEntrypoint type
|
|
28
|
+
C extends new (ctx: ExecutionContext, env: any) => WorkflowEntrypoint<any, any> = new (ctx: ExecutionContext, env: any) => T>(optionsCallback: (env: ResolveEnv<C, E>) => CloudflareOptions, WorkFlowClass: C): C;
|
|
28
29
|
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,kBAAkB,EASnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAMlD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAItD;;GAEG;AACH,wBAAsB,kCAAkC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS5F;AAuID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,CAAC,GAAG,UAAU,EAAE,mBAAmB;AACnC,CAAC,GAAG,OAAO,EAAE,eAAe;AAE5B,CAAC,SAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,0BAA0B;AAM7F,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAChF,GAAG,EAAE,gBAAgB,EAErB,GAAG,EAAE,GAAG,KACL,CAAC,EACN,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,iBAAiB,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CA6CpF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DurableObjectStorage } from '@cloudflare/workers-types';
|
|
2
2
|
import type { CloudflareOptions } from './client';
|
|
3
3
|
/** Extended DurableObjectState with originalStorage exposed by instrumentContext */
|
|
4
|
-
interface InstrumentedDurableObjectState extends DurableObjectState {
|
|
4
|
+
export interface InstrumentedDurableObjectState extends DurableObjectState {
|
|
5
5
|
originalStorage?: DurableObjectStorage;
|
|
6
6
|
}
|
|
7
7
|
type MethodWrapperOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapMethodWithSentry.d.ts","sourceRoot":"","sources":["../../src/wrapMethodWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"wrapMethodWithSentry.d.ts","sourceRoot":"","sources":["../../src/wrapMethodWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAatE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AASlD,oFAAoF;AACpF,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACxC;AAyBD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,gBAAgB,GAAG,8BAA8B,CAAC;IAC3D;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,KAAK,cAAc,GAAG,eAAe,CAAC;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,cAAc,EAC3D,cAAc,EAAE,oBAAoB,EACpC,OAAO,EAAE,CAAC,EACV,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,MAAM,CAAC,EAAE,IAAI,GACZ,CAAC,CAqJH"}
|