File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
packages/tanstackstart-react/src Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 22// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703
33/* eslint-disable import/export */
44import type { TanStackMiddlewareBase } from '../common/types' ;
5+ import type { CreateSentryTunnelRouteOptions } from '../server/tunnelRoute' ;
56
67export * from '@sentry/react' ;
78
@@ -26,3 +27,19 @@ export const sentryGlobalRequestMiddleware: TanStackMiddlewareBase = { '~types':
2627 * The actual implementation is server-only, but this stub is needed to prevent rendering errors.
2728 */
2829export const sentryGlobalFunctionMiddleware : TanStackMiddlewareBase = { '~types' : undefined , options : { } } ;
30+
31+ /**
32+ * No-op stub for client-side builds.
33+ * The actual implementation is server-only, but this stub is needed to prevent rendering errors.
34+ */
35+ export function createSentryTunnelRoute ( _options : CreateSentryTunnelRouteOptions ) : {
36+ handlers : {
37+ POST : ( ) => Promise < Response > ;
38+ } ;
39+ } {
40+ return {
41+ handlers : {
42+ POST : async ( ) => new Response ( null , { status : 500 } ) ,
43+ } ,
44+ } ;
45+ }
Original file line number Diff line number Diff line change @@ -42,3 +42,4 @@ export declare const wrapMiddlewaresWithSentry: typeof serverSdk.wrapMiddlewares
4242export declare const tanstackRouterBrowserTracingIntegration : typeof clientSdk . tanstackRouterBrowserTracingIntegration ;
4343export declare const sentryGlobalRequestMiddleware : typeof serverSdk . sentryGlobalRequestMiddleware ;
4444export declare const sentryGlobalFunctionMiddleware : typeof serverSdk . sentryGlobalFunctionMiddleware ;
45+ export declare const createSentryTunnelRoute : typeof serverSdk . createSentryTunnelRoute ;
You can’t perform that action at this time.
0 commit comments