@@ -9,15 +9,16 @@ import {
9
9
} from '@sentry/core' ;
10
10
import type { EventEnvelopeHeaders , Span } from '@sentry/core' ;
11
11
import { NodeClient , setCurrentClient } from '@sentry/node' ;
12
- import * as SentryNode from '@sentry/node ' ;
12
+ import * as SentryCore from '@sentry/core ' ;
13
13
import type { Handle } from '@sveltejs/kit' ;
14
14
import { redirect } from '@sveltejs/kit' ;
15
15
import { vi } from 'vitest' ;
16
16
17
- import { FETCH_PROXY_SCRIPT , addSentryCodeToPage , isFetchProxyRequired , sentryHandle } from '../../src/server/handle' ;
17
+ import { FETCH_PROXY_SCRIPT , addSentryCodeToPage , isFetchProxyRequired } from '../../src/server-common/handle' ;
18
+ import { sentryHandle } from '../../src/server-common/handle' ;
18
19
import { getDefaultNodeClientOptions } from '../utils' ;
19
20
20
- const mockCaptureException = vi . spyOn ( SentryNode , 'captureException' ) . mockImplementation ( ( ) => 'xx' ) ;
21
+ const mockCaptureException = vi . spyOn ( SentryCore , 'captureException' ) . mockImplementation ( ( ) => 'xx' ) ;
21
22
22
23
function mockEvent ( override : Record < string , unknown > = { } ) : Parameters < Handle > [ 0 ] [ 'event' ] {
23
24
const event : Parameters < Handle > [ 0 ] [ 'event' ] = {
@@ -443,7 +444,7 @@ describe('addSentryCodeToPage', () => {
443
444
444
445
it ( 'adds meta tags and the fetch proxy script if there is an active transaction' , ( ) => {
445
446
const transformPageChunk = addSentryCodeToPage ( { injectFetchProxyScript : true } ) ;
446
- SentryNode . startSpan ( { name : 'test' } , ( ) => {
447
+ SentryCore . startSpan ( { name : 'test' } , ( ) => {
447
448
const transformed = transformPageChunk ( { html, done : true } ) as string ;
448
449
449
450
expect ( transformed ) . toContain ( '<meta name="sentry-trace"' ) ;
0 commit comments