Skip to content

Commit fee1d2b

Browse files
committed
cleanup
1 parent 189aa5c commit fee1d2b

File tree

11 files changed

+32
-74
lines changed

11 files changed

+32
-74
lines changed
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
{
2-
"name": "sveltekit-cloudflare-pages",
3-
"private": true,
4-
"version": "0.0.1",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite dev",
8-
"build": "vite build",
9-
"preview": "wrangler pages dev ./.svelte-kit/cloudflare --port 4173",
10-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12-
"test:e2e": "playwright test",
13-
"test": "npm run test:e2e",
2+
"name": "sveltekit-cloudflare-pages",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "wrangler pages dev ./.svelte-kit/cloudflare --port 4173",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12+
"test:e2e": "playwright test",
13+
"test": "npm run test:e2e",
1414
"test:build": "pnpm install && pnpm build",
1515
"test:assert": "npm run test:e2e"
16-
},
16+
},
1717
"dependencies": {
1818
"@sentry/sveltekit": "latest || *"
1919
},
20-
"devDependencies": {
21-
"@playwright/test": "^1.45.3",
22-
"@sveltejs/adapter-cloudflare": "^4.8.0",
23-
"@sveltejs/kit": "^2.9.0",
24-
"@sveltejs/vite-plugin-svelte": "^5.0.0",
25-
"svelte": "^5.0.0",
26-
"svelte-check": "^4.0.0",
27-
"typescript": "^5.0.0",
28-
"vite": "^6.0.0",
29-
"wrangler": "^3"
30-
}
20+
"devDependencies": {
21+
"@playwright/test": "^1.45.3",
22+
"@sveltejs/adapter-cloudflare": "^4.8.0",
23+
"@sveltejs/kit": "^2.16.0",
24+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
25+
"svelte": "^5.0.0",
26+
"svelte-check": "^4.0.0",
27+
"typescript": "^5.0.0",
28+
"vite": "^6.0.0",
29+
"wrangler": "^3"
30+
}
3131
}

dev-packages/e2e-tests/test-applications/sveltekit-cloudflare-pages/src/hooks.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const handleError = handleErrorWithSentry();
77
export const handle = sequence(
88
initCloudflareSentryHandle({
99
dsn: E2E_TEST_DSN,
10+
tracesSampleRate: 1.0,
1011
}),
1112
sentryHandle(),
1213
);

dev-packages/e2e-tests/test-applications/sveltekit-cloudflare-pages/src/lib/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/sveltekit/src/common/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { HttpError, Redirect } from '@sveltejs/kit';
22

3+
export const WRAPPED_MODULE_SUFFIX = '?sentry-auto-wrap';
4+
35
export type SentryWrappedFlag = {
46
/**
57
* If this flag is set, we know that the load event was already wrapped once

packages/sveltekit/src/server-common/rewriteFramesIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
join,
88
rewriteFramesIntegration as originalRewriteFramesIntegration,
99
} from '@sentry/core';
10-
import { WRAPPED_MODULE_SUFFIX } from '../vite/constants';
1110
import type { GlobalWithSentryValues } from '../vite/injectGlobalValues';
11+
import { WRAPPED_MODULE_SUFFIX } from '../common/utils';
1212

1313
type StackFrameIteratee = (frame: StackFrame) => StackFrame;
1414
interface RewriteFramesOptions {

packages/sveltekit/src/server/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { init as initNodeSdk } from '@sentry/node';
66
import { rewriteFramesIntegration } from '../server-common/rewriteFramesIntegration';
77

88
/**
9-
*
9+
* Initialize the Server-side Sentry SDK
1010
* @param options
1111
*/
1212
export function init(options: NodeOptions): NodeClient | undefined {

packages/sveltekit/src/vite/autoInstrument.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import * as path from 'path';
33
import type { ExportNamedDeclaration } from '@babel/types';
44
import { parseModule } from 'magicast';
55
import type { Plugin } from 'vite';
6-
7-
import { WRAPPED_MODULE_SUFFIX } from './constants';
6+
import { WRAPPED_MODULE_SUFFIX } from '../common/utils';
87

98
export type AutoInstrumentSelection = {
109
/**

packages/sveltekit/src/vite/constants.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/sveltekit/src/vite/sourceMaps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
99
import type { Plugin, UserConfig } from 'vite';
1010

1111
import MagicString from 'magic-string';
12-
import { WRAPPED_MODULE_SUFFIX } from './constants';
1312
import type { GlobalSentryValues } from './injectGlobalValues';
1413
import { VIRTUAL_GLOBAL_VALUES_FILE, getGlobalValueInjectionCode } from './injectGlobalValues';
1514
import { getAdapterOutputDir, getHooksFileName, loadSvelteConfig } from './svelteConfig';
1615
import type { CustomSentryVitePluginOptions } from './types';
16+
import { WRAPPED_MODULE_SUFFIX } from '../common/utils';
1717

1818
// sorcery has no types, so these are some basic type definitions:
1919
type Chain = {

packages/sveltekit/src/worker/handle.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

packages/sveltekit/src/worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
export { handleErrorWithSentry } from '../server-common/handleError';
1212
export { wrapLoadWithSentry, wrapServerLoadWithSentry } from '../server-common/load';
1313
export { sentryHandle } from '../server-common/handle';
14-
export { initCloudflareSentryHandle } from './handle';
14+
export { initCloudflareSentryHandle } from './cloudflare';
1515
export { wrapServerRouteWithSentry } from '../server-common/serverRoute';
1616

1717
// Re-export some functions from Cloudflare SDK

0 commit comments

Comments
 (0)