import type { AstroConfig } from 'astro'; export type VitePlugin = Extract['plugins']>[number], { name: string; }>; /** * A Vite plugin that suppresses the "Automatically externalized node built-in module" * warnings that Vite emits when bundling for Cloudflare Workers. * * These warnings are expected because `@sentry/astro` re-exports `@sentry/node` on the * server side, and `@sentry/node` (plus OpenTelemetry) import many Node.js built-in * modules. Vite correctly externalizes them, but warns about it. These warnings are * harmless since Cloudflare Workers support Node.js built-ins under the `node:` prefix. */ export declare function sentryCloudflareNodeWarningPlugin(): VitePlugin; export declare const WORKER_ENTRY_IDS: string[]; /** * A Vite plugin that wraps the Worker's default export handler with `@sentry/cloudflare`'s `withSentry` to provide: * - `setAsyncLocalStorageAsyncContextStrategy()` for proper async context * - Per-request isolation scopes via `wrapRequestHandler` * - Trace context propagation * * With `importServerInit`, it also imports the server init at the top of the Worker entry. The wrap inits a client * from the Wrangler bindings on each request, and the isolate keeps the first client it gets. So the user's * `Sentry.init()` has to run before that, or it gets back the bindings-only client and its options are ignored. * This also runs the init for actions and API routes, which `injectScript('page-ssr')` doesn't reach. */ export declare function sentryCloudflareVitePlugin({ importServerInit }?: { importServerInit?: boolean | undefined; }): VitePlugin; //# sourceMappingURL=cloudflare.d.ts.map