File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,15 @@ export {
128
128
129
129
import { Integrations as CoreIntegrations } from '@sentry/core' ;
130
130
import { Integrations as NodeIntegrations } from '@sentry/node' ;
131
-
132
- import * as BunIntegrations from './integrations' ;
131
+ import { BunServer } from './integrations/bunserver' ;
132
+ export { bunServerIntegration } from './integrations/bunserver ' ;
133
133
134
134
const INTEGRATIONS = {
135
135
// eslint-disable-next-line deprecation/deprecation
136
136
...CoreIntegrations ,
137
137
// eslint-disable-next-line deprecation/deprecation
138
138
...NodeIntegrations ,
139
- ... BunIntegrations ,
139
+ BunServer ,
140
140
} ;
141
141
142
142
export { INTEGRATIONS as Integrations } ;
Original file line number Diff line number Diff line change 5
5
captureException ,
6
6
continueTrace ,
7
7
convertIntegrationFnToClass ,
8
+ defineIntegration ,
8
9
getCurrentScope ,
9
10
runWithAsyncContext ,
10
11
setHttpStatus ,
@@ -15,7 +16,7 @@ import { getSanitizedUrlString, parseUrl } from '@sentry/utils';
15
16
16
17
const INTEGRATION_NAME = 'BunServer' ;
17
18
18
- const bunServerIntegration = ( ( ) => {
19
+ const _bunServerIntegration = ( ( ) => {
19
20
return {
20
21
name : INTEGRATION_NAME ,
21
22
setupOnce ( ) {
@@ -24,8 +25,12 @@ const bunServerIntegration = (() => {
24
25
} ;
25
26
} ) satisfies IntegrationFn ;
26
27
28
+ export const bunServerIntegration = defineIntegration ( _bunServerIntegration ) ;
29
+
27
30
/**
28
31
* Instruments `Bun.serve` to automatically create transactions and capture errors.
32
+ *
33
+ * @deprecated Use `bunServerIntegration()` instead.
29
34
*/
30
35
// eslint-disable-next-line deprecation/deprecation
31
36
export const BunServer = convertIntegrationFnToClass ( INTEGRATION_NAME , bunServerIntegration ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
17
17
import type { Integration , Options } from '@sentry/types' ;
18
18
19
19
import { BunClient } from './client' ;
20
- import { BunServer } from './integrations' ;
20
+ import { bunServerIntegration } from './integrations/bunserver ' ;
21
21
import { makeFetchTransport } from './transports' ;
22
22
import type { BunOptions } from './types' ;
23
23
@@ -41,7 +41,7 @@ export const defaultIntegrations = [
41
41
nodeContextIntegration ( ) ,
42
42
modulesIntegration ( ) ,
43
43
// Bun Specific
44
- new BunServer ( ) ,
44
+ bunServerIntegration ( ) ,
45
45
] ;
46
46
47
47
/** Get the default integrations for the Bun SDK. */
You can’t perform that action at this time.
0 commit comments