/** * orchestrion code-transform plugin for Bun's bundler (`bun build`). * * Usage: * * ```ts * import { sentryBunPlugin } from '@sentry/bun/plugin'; * await Bun.build({ * entrypoints: ['./app.ts'], * plugins: [sentryBunPlugin()], * }); * ``` * * This is BUILD-ONLY. Runtime instrumentation (`bun run`) is intentionally not * offered: a module returned by a runtime `onLoad` plugin in Bun loses its * CommonJS named exports. * * When https://github.com/oven-sh/bun/pull/31770 lands, we can revisit. * * Until then, Bun apps must bundle to get orchestrion instrumentation. In dev * (ie, `bun run`) there is simply no instrumentation, which is clearer than * partial/inconsistent coverage. * * Shipped as both ESM and CJS (via the `@sentry/bun/plugin` subpath) so a user's * `bun build` script can be authored in either module system. It's a plain * library import here (not a `--import`/`--preload` hook), so CJS is fine; Bun * resolves the underlying ESM-only transformer in either module system. * * @module */ type UnknownPlugin = any; /** * Returns the orchestrion code-transform plugin for Bun's bundler, configured * with the central `SENTRY_INSTRUMENTATIONS`. The plugin injects * `diagnostics_channel.tracingChannel` calls into the instrumented libraries as * `bun build` bundles them, and injects a banner that sets * `globalThis.__SENTRY_ORCHESTRION__.bundler = true` when the bundle boots * * Pass the result to `Bun.build({ plugins: [...] })`. * * @example * ```ts * import { sentryBunPlugin } from '@sentry/bun/plugin'; * await Bun.build({ entrypoints: ['./app.ts'], plugins: [sentryBunPlugin()] }); * ``` */ export declare function sentryBunPlugin(): UnknownPlugin; export {}; //# sourceMappingURL=plugin.d.ts.map