@sentry/tanstackstart-react 10.57.0 → 10.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/client/index.js +10 -2
- package/build/cjs/client/index.js.map +1 -1
- package/build/cjs/server/globalMiddleware.js +4 -0
- package/build/cjs/server/globalMiddleware.js.map +1 -1
- package/build/esm/client/index.js +10 -2
- package/build/esm/client/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/globalMiddleware.js +4 -0
- package/build/esm/server/globalMiddleware.js.map +1 -1
- package/build/types/client/index.d.ts +3 -3
- package/build/types/client/index.d.ts.map +1 -1
- package/build/types/common/index.d.ts +1 -1
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/common/types.d.ts +67 -1
- package/build/types/common/types.d.ts.map +1 -1
- package/build/types/server/globalMiddleware.d.ts +3 -3
- package/build/types/server/globalMiddleware.d.ts.map +1 -1
- package/build/types-ts3.8/client/index.d.ts +3 -3
- package/build/types-ts3.8/common/index.d.ts +1 -1
- package/build/types-ts3.8/common/types.d.ts +67 -1
- package/build/types-ts3.8/server/globalMiddleware.d.ts +3 -3
- package/package.json +5 -5
|
@@ -6,8 +6,16 @@ const sdk = require('./sdk.js');
|
|
|
6
6
|
function wrapMiddlewaresWithSentry(middlewares) {
|
|
7
7
|
return Object.values(middlewares);
|
|
8
8
|
}
|
|
9
|
-
const sentryGlobalRequestMiddleware = {
|
|
10
|
-
|
|
9
|
+
const sentryGlobalRequestMiddleware = {
|
|
10
|
+
"~types": void 0,
|
|
11
|
+
_types: void 0,
|
|
12
|
+
options: {}
|
|
13
|
+
};
|
|
14
|
+
const sentryGlobalFunctionMiddleware = {
|
|
15
|
+
"~types": void 0,
|
|
16
|
+
_types: void 0,
|
|
17
|
+
options: {}
|
|
18
|
+
};
|
|
11
19
|
function createSentryTunnelRoute(_options) {
|
|
12
20
|
return {
|
|
13
21
|
handlers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["// import/export got a false positive, and affects most of our index barrel files\n// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703\n/* eslint-disable import/export */\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["// import/export got a false positive, and affects most of our index barrel files\n// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703\n/* eslint-disable import/export */\nimport type {\n SentryGlobalFunctionMiddleware,\n SentryGlobalRequestMiddleware,\n TanStackMiddlewareBase,\n} from '../common/types';\nimport type { CreateSentryTunnelRouteOptions } from '../server/tunnelRoute';\n\nexport * from '@sentry/react';\n\nexport { init } from './sdk';\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent build errors.\n */\nexport function wrapMiddlewaresWithSentry<T extends TanStackMiddlewareBase>(middlewares: Record<string, T>): T[] {\n return Object.values(middlewares);\n}\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware = {\n '~types': undefined as unknown as SentryGlobalRequestMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalRequestMiddleware['_types'],\n options: {},\n};\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware = {\n '~types': undefined as unknown as SentryGlobalFunctionMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalFunctionMiddleware['_types'],\n options: {},\n};\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport function createSentryTunnelRoute(_options: CreateSentryTunnelRouteOptions): {\n handlers: {\n POST: () => Promise<Response>;\n };\n} {\n return {\n handlers: {\n POST: async () => new Response(null, { status: 500 }),\n },\n };\n}\n"],"names":[],"mappings":";;;;;AAkBO,SAAS,0BAA4D,WAAA,EAAqC;AAC/G,EAAA,OAAO,MAAA,CAAO,OAAO,WAAW,CAAA;AAClC;AAMO,MAAM,6BAAA,GAA+D;AAAA,EAC1E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,SAAS;AACX;AAMO,MAAM,8BAAA,GAAiE;AAAA,EAC5E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,SAAS;AACX;AAMO,SAAS,wBAAwB,QAAA,EAItC;AACA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,YAAY,IAAI,QAAA,CAAS,MAAM,EAAE,MAAA,EAAQ,KAAK;AAAA;AACtD,GACF;AACF;;;;;;;;;;;;;;;;;;"}
|
|
@@ -46,14 +46,18 @@ function createSentryFunctionMiddlewareHandler(mechanismType) {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
const sentryGlobalRequestMiddleware = {
|
|
49
|
+
// `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value
|
|
49
50
|
"~types": void 0,
|
|
51
|
+
_types: void 0,
|
|
50
52
|
options: {
|
|
51
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
54
|
server: createSentryMiddlewareHandler("auto.middleware.tanstackstart.request")
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
const sentryGlobalFunctionMiddleware = {
|
|
58
|
+
// `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value
|
|
56
59
|
"~types": void 0,
|
|
60
|
+
_types: void 0,
|
|
57
61
|
options: {
|
|
58
62
|
server: createSentryFunctionMiddlewareHandler("auto.middleware.tanstackstart.server_function")
|
|
59
63
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalMiddleware.js","sources":["../../../src/server/globalMiddleware.ts"],"sourcesContent":["import {\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n addNonEnumerableProperty,\n captureException,\n getActiveSpan,\n spanToJSON,\n updateSpanName,\n} from '@sentry/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"globalMiddleware.js","sources":["../../../src/server/globalMiddleware.ts"],"sourcesContent":["import {\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n addNonEnumerableProperty,\n captureException,\n getActiveSpan,\n spanToJSON,\n updateSpanName,\n} from '@sentry/core';\nimport type { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware } from '../common/types';\nimport { SENTRY_INTERNAL } from './middleware';\n\ntype ServerFnMeta = {\n id?: string;\n name?: string;\n filename?: string;\n};\n\nfunction createSentryMiddlewareHandler(mechanismType: string) {\n return async function sentryMiddlewareHandler({ next }: { next: () => Promise<unknown> }): Promise<unknown> {\n try {\n return await next();\n } catch (e) {\n captureException(e, {\n mechanism: { type: mechanismType, handled: false },\n });\n throw e;\n }\n };\n}\n\nfunction createSentryFunctionMiddlewareHandler(mechanismType: string) {\n return async function sentryFunctionMiddlewareHandler({\n next,\n serverFnMeta,\n }: {\n next: () => Promise<unknown>;\n serverFnMeta?: ServerFnMeta;\n }): Promise<unknown> {\n const activeSpan = getActiveSpan();\n const spanData = activeSpan ? spanToJSON(activeSpan) : undefined;\n if (activeSpan && spanData?.op === 'function.tanstackstart') {\n if (serverFnMeta?.name) {\n const method = spanData.description?.split(' ')[0] || 'GET';\n updateSpanName(activeSpan, `${method} /_serverFn/${serverFnMeta.name}`);\n activeSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n }\n if (serverFnMeta?.id) {\n activeSpan.setAttribute('tanstackstart.function.id', serverFnMeta.id);\n }\n if (serverFnMeta?.filename) {\n activeSpan.setAttribute('tanstackstart.function.filename', serverFnMeta.filename);\n }\n }\n\n try {\n return await next();\n } catch (e) {\n captureException(e, {\n mechanism: { type: mechanismType, handled: false },\n });\n throw e;\n }\n };\n}\n\n/**\n * Global request middleware that captures errors from API route requests.\n * Should be added as the first entry in the `requestMiddleware` array of `createStart()`.\n */\nexport const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware = {\n // `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value\n '~types': undefined as unknown as SentryGlobalRequestMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalRequestMiddleware['_types'],\n\n options: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n server: createSentryMiddlewareHandler('auto.middleware.tanstackstart.request') as (...args: any[]) => any,\n },\n};\n\n/**\n * Global function middleware that captures errors from server function invocations.\n * Should be added as the first entry in the `functionMiddleware` array of `createStart()`.\n */\nexport const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware = {\n // `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value\n '~types': undefined as unknown as SentryGlobalFunctionMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalFunctionMiddleware['_types'],\n\n options: {\n server: createSentryFunctionMiddlewareHandler('auto.middleware.tanstackstart.server_function') as (\n ...args: any[] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) => any, // eslint-disable-line @typescript-eslint/no-explicit-any\n },\n};\n\n// Mark as internal so the Vite auto-instrumentation plugin skips these middleware\naddNonEnumerableProperty(sentryGlobalRequestMiddleware, SENTRY_INTERNAL, true);\naddNonEnumerableProperty(sentryGlobalFunctionMiddleware, SENTRY_INTERNAL, true);\n"],"names":["captureException","getActiveSpan","spanToJSON","updateSpanName","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","addNonEnumerableProperty","SENTRY_INTERNAL"],"mappings":";;;;;AAiBA,SAAS,8BAA8B,aAAA,EAAuB;AAC5D,EAAA,OAAO,eAAe,uBAAA,CAAwB,EAAE,IAAA,EAAK,EAAuD;AAC1G,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,IAAA,EAAK;AAAA,IACpB,SAAS,CAAA,EAAG;AACV,MAAAA,qBAAA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AAA;AACD,MAAA,MAAM,CAAA;AAAA,IACR;AAAA,EACF,CAAA;AACF;AAMO,MAAM,6BAAA,GAA+D;AAAA;AAAA,EAE1E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EAER,OAAA,EAAS;AAAA;AAAA,IAEP,MAAA,EAAQ,8BAA8B,uCAAuC;AAAA;AAEjF;AAMO,MAAM,8BAAA,GAAiE;AAAA;AAAA,EAE5E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EAER,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,sCAAsC,+CAA+C;AAAA;AAAA;AAIjG;AAGAK,6BAAA,CAAyB,6BAAA,EAA+BC,4BAAiB,IAAI,CAAA;AAC7ED,6BAAA,CAAyB,8BAAA,EAAgCC,4BAAiB,IAAI,CAAA;;;;;"}
|
|
@@ -4,8 +4,16 @@ export { init } from './sdk.js';
|
|
|
4
4
|
function wrapMiddlewaresWithSentry(middlewares) {
|
|
5
5
|
return Object.values(middlewares);
|
|
6
6
|
}
|
|
7
|
-
const sentryGlobalRequestMiddleware = {
|
|
8
|
-
|
|
7
|
+
const sentryGlobalRequestMiddleware = {
|
|
8
|
+
"~types": void 0,
|
|
9
|
+
_types: void 0,
|
|
10
|
+
options: {}
|
|
11
|
+
};
|
|
12
|
+
const sentryGlobalFunctionMiddleware = {
|
|
13
|
+
"~types": void 0,
|
|
14
|
+
_types: void 0,
|
|
15
|
+
options: {}
|
|
16
|
+
};
|
|
9
17
|
function createSentryTunnelRoute(_options) {
|
|
10
18
|
return {
|
|
11
19
|
handlers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["// import/export got a false positive, and affects most of our index barrel files\n// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703\n/* eslint-disable import/export */\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["// import/export got a false positive, and affects most of our index barrel files\n// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703\n/* eslint-disable import/export */\nimport type {\n SentryGlobalFunctionMiddleware,\n SentryGlobalRequestMiddleware,\n TanStackMiddlewareBase,\n} from '../common/types';\nimport type { CreateSentryTunnelRouteOptions } from '../server/tunnelRoute';\n\nexport * from '@sentry/react';\n\nexport { init } from './sdk';\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent build errors.\n */\nexport function wrapMiddlewaresWithSentry<T extends TanStackMiddlewareBase>(middlewares: Record<string, T>): T[] {\n return Object.values(middlewares);\n}\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware = {\n '~types': undefined as unknown as SentryGlobalRequestMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalRequestMiddleware['_types'],\n options: {},\n};\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware = {\n '~types': undefined as unknown as SentryGlobalFunctionMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalFunctionMiddleware['_types'],\n options: {},\n};\n\n/**\n * No-op stub for client-side builds.\n * The actual implementation is server-only, but this stub is needed to prevent rendering errors.\n */\nexport function createSentryTunnelRoute(_options: CreateSentryTunnelRouteOptions): {\n handlers: {\n POST: () => Promise<Response>;\n };\n} {\n return {\n handlers: {\n POST: async () => new Response(null, { status: 500 }),\n },\n };\n}\n"],"names":[],"mappings":";;;AAkBO,SAAS,0BAA4D,WAAA,EAAqC;AAC/G,EAAA,OAAO,MAAA,CAAO,OAAO,WAAW,CAAA;AAClC;AAMO,MAAM,6BAAA,GAA+D;AAAA,EAC1E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,SAAS;AACX;AAMO,MAAM,8BAAA,GAAiE;AAAA,EAC5E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,SAAS;AACX;AAMO,SAAS,wBAAwB,QAAA,EAItC;AACA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,YAAY,IAAI,QAAA,CAAS,MAAM,EAAE,MAAA,EAAQ,KAAK;AAAA;AACtD,GACF;AACF;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.
|
|
1
|
+
{"type":"module","version":"10.58.0","sideEffects":false}
|
|
@@ -44,14 +44,18 @@ function createSentryFunctionMiddlewareHandler(mechanismType) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
const sentryGlobalRequestMiddleware = {
|
|
47
|
+
// `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value
|
|
47
48
|
"~types": void 0,
|
|
49
|
+
_types: void 0,
|
|
48
50
|
options: {
|
|
49
51
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
52
|
server: createSentryMiddlewareHandler("auto.middleware.tanstackstart.request")
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
55
|
const sentryGlobalFunctionMiddleware = {
|
|
56
|
+
// `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value
|
|
54
57
|
"~types": void 0,
|
|
58
|
+
_types: void 0,
|
|
55
59
|
options: {
|
|
56
60
|
server: createSentryFunctionMiddlewareHandler("auto.middleware.tanstackstart.server_function")
|
|
57
61
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalMiddleware.js","sources":["../../../src/server/globalMiddleware.ts"],"sourcesContent":["import {\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n addNonEnumerableProperty,\n captureException,\n getActiveSpan,\n spanToJSON,\n updateSpanName,\n} from '@sentry/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"globalMiddleware.js","sources":["../../../src/server/globalMiddleware.ts"],"sourcesContent":["import {\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n addNonEnumerableProperty,\n captureException,\n getActiveSpan,\n spanToJSON,\n updateSpanName,\n} from '@sentry/core';\nimport type { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware } from '../common/types';\nimport { SENTRY_INTERNAL } from './middleware';\n\ntype ServerFnMeta = {\n id?: string;\n name?: string;\n filename?: string;\n};\n\nfunction createSentryMiddlewareHandler(mechanismType: string) {\n return async function sentryMiddlewareHandler({ next }: { next: () => Promise<unknown> }): Promise<unknown> {\n try {\n return await next();\n } catch (e) {\n captureException(e, {\n mechanism: { type: mechanismType, handled: false },\n });\n throw e;\n }\n };\n}\n\nfunction createSentryFunctionMiddlewareHandler(mechanismType: string) {\n return async function sentryFunctionMiddlewareHandler({\n next,\n serverFnMeta,\n }: {\n next: () => Promise<unknown>;\n serverFnMeta?: ServerFnMeta;\n }): Promise<unknown> {\n const activeSpan = getActiveSpan();\n const spanData = activeSpan ? spanToJSON(activeSpan) : undefined;\n if (activeSpan && spanData?.op === 'function.tanstackstart') {\n if (serverFnMeta?.name) {\n const method = spanData.description?.split(' ')[0] || 'GET';\n updateSpanName(activeSpan, `${method} /_serverFn/${serverFnMeta.name}`);\n activeSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n }\n if (serverFnMeta?.id) {\n activeSpan.setAttribute('tanstackstart.function.id', serverFnMeta.id);\n }\n if (serverFnMeta?.filename) {\n activeSpan.setAttribute('tanstackstart.function.filename', serverFnMeta.filename);\n }\n }\n\n try {\n return await next();\n } catch (e) {\n captureException(e, {\n mechanism: { type: mechanismType, handled: false },\n });\n throw e;\n }\n };\n}\n\n/**\n * Global request middleware that captures errors from API route requests.\n * Should be added as the first entry in the `requestMiddleware` array of `createStart()`.\n */\nexport const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware = {\n // `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value\n '~types': undefined as unknown as SentryGlobalRequestMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalRequestMiddleware['_types'],\n\n options: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n server: createSentryMiddlewareHandler('auto.middleware.tanstackstart.request') as (...args: any[]) => any,\n },\n};\n\n/**\n * Global function middleware that captures errors from server function invocations.\n * Should be added as the first entry in the `functionMiddleware` array of `createStart()`.\n */\nexport const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware = {\n // `~types`/`_types` only exist on the type level in TanStack Start middlewares and hold no runtime value\n '~types': undefined as unknown as SentryGlobalFunctionMiddleware['~types'],\n _types: undefined as unknown as SentryGlobalFunctionMiddleware['_types'],\n\n options: {\n server: createSentryFunctionMiddlewareHandler('auto.middleware.tanstackstart.server_function') as (\n ...args: any[] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) => any, // eslint-disable-line @typescript-eslint/no-explicit-any\n },\n};\n\n// Mark as internal so the Vite auto-instrumentation plugin skips these middleware\naddNonEnumerableProperty(sentryGlobalRequestMiddleware, SENTRY_INTERNAL, true);\naddNonEnumerableProperty(sentryGlobalFunctionMiddleware, SENTRY_INTERNAL, true);\n"],"names":[],"mappings":";;;AAiBA,SAAS,8BAA8B,aAAA,EAAuB;AAC5D,EAAA,OAAO,eAAe,uBAAA,CAAwB,EAAE,IAAA,EAAK,EAAuD;AAC1G,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,IAAA,EAAK;AAAA,IACpB,SAAS,CAAA,EAAG;AACV,MAAA,gBAAA,CAAiB,CAAA,EAAG;AAAA,QAClB,SAAA,EAAW,EAAE,IAAA,EAAM,aAAA,EAAe,SAAS,KAAA;AAAM,OAClD,CAAA;AACD,MAAA,MAAM,CAAA;AAAA,IACR;AAAA,EACF,CAAA;AACF;AAEA,SAAS,sCAAsC,aAAA,EAAuB;AACpE,EAAA,OAA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AAuC;AAAA;AAEjF;AAMO,MAAM,8BAAA,GAAiE;AAAA;AAAA,EAE5E,QAAA,EAAU,MAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EAER,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,sCAAsC,+CAA+C;AAAA;AAAA;AAIjG;AAGA,wBAAA,CAAyB,6BAAA,EAA+B,iBAAiB,IAAI,CAAA;AAC7E,wBAAA,CAAyB,8BAAA,EAAgC,iBAAiB,IAAI,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TanStackMiddlewareBase } from '../common/types';
|
|
1
|
+
import type { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware, TanStackMiddlewareBase } from '../common/types';
|
|
2
2
|
import type { CreateSentryTunnelRouteOptions } from '../server/tunnelRoute';
|
|
3
3
|
export * from '@sentry/react';
|
|
4
4
|
export { init } from './sdk';
|
|
@@ -11,12 +11,12 @@ export declare function wrapMiddlewaresWithSentry<T extends TanStackMiddlewareBa
|
|
|
11
11
|
* No-op stub for client-side builds.
|
|
12
12
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
13
13
|
*/
|
|
14
|
-
export declare const sentryGlobalRequestMiddleware:
|
|
14
|
+
export declare const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware;
|
|
15
15
|
/**
|
|
16
16
|
* No-op stub for client-side builds.
|
|
17
17
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
18
18
|
*/
|
|
19
|
-
export declare const sentryGlobalFunctionMiddleware:
|
|
19
|
+
export declare const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware;
|
|
20
20
|
/**
|
|
21
21
|
* No-op stub for client-side builds.
|
|
22
22
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAE5E,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,sBAAsB,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAE/G;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,6BAI3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,8BAI5C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,8BAA8B,GAAG;IACjF,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC/B,CAAC;CACH,CAMA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { TanStackMiddlewareBase, MiddlewareWrapperOptions } from './types';
|
|
1
|
+
export type { TanStackMiddlewareBase, MiddlewareWrapperOptions, SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware, } from './types';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,SAAS,CAAC"}
|
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
export type TanStackMiddlewareBase = {
|
|
2
|
-
'~types':
|
|
2
|
+
'~types': unknown;
|
|
3
|
+
options: {
|
|
4
|
+
server?: (...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Structurally mirrors TanStack Start's `RequestMiddlewareTypes` for a middleware that contributes
|
|
9
|
+
* nothing to the middleware chain. The context-related fields are deliberately typed as `undefined`
|
|
10
|
+
* rather than `any`: TanStack Start merges middleware context types through these fields, so an
|
|
11
|
+
* `any` here would turn the inferred `context` of every subsequent middleware and handler into `any`.
|
|
12
|
+
*/
|
|
13
|
+
type SentryRequestMiddlewareTypes = {
|
|
14
|
+
type: 'request';
|
|
15
|
+
middlewares: undefined;
|
|
16
|
+
allInput: undefined;
|
|
17
|
+
allOutput: undefined;
|
|
18
|
+
serverContext: undefined;
|
|
19
|
+
allServerContext: undefined;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Structurally mirrors TanStack Start's `FunctionMiddlewareTypes` for a middleware that contributes
|
|
23
|
+
* nothing to the middleware chain (see `SentryRequestMiddlewareTypes`).
|
|
24
|
+
*/
|
|
25
|
+
type SentryFunctionMiddlewareTypes = {
|
|
26
|
+
type: 'function';
|
|
27
|
+
middlewares: undefined;
|
|
28
|
+
input: undefined;
|
|
29
|
+
allInput: undefined;
|
|
30
|
+
output: undefined;
|
|
31
|
+
allOutput: undefined;
|
|
32
|
+
clientContext: undefined;
|
|
33
|
+
allClientContextBeforeNext: undefined;
|
|
34
|
+
allClientContextAfterNext: undefined;
|
|
35
|
+
serverContext: undefined;
|
|
36
|
+
serverSendContext: undefined;
|
|
37
|
+
allServerSendContext: undefined;
|
|
38
|
+
allServerContext: undefined;
|
|
39
|
+
clientSendContext: undefined;
|
|
40
|
+
allClientSendContext: undefined;
|
|
41
|
+
validator: undefined;
|
|
42
|
+
inputValidator: undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Type of the `sentryGlobalRequestMiddleware` export.
|
|
46
|
+
*
|
|
47
|
+
* Declares the middleware type information under both `~types` (TanStack Start >=1.143) and
|
|
48
|
+
* `_types` (older versions) so the middleware satisfies `AnyRequestMiddleware` across the
|
|
49
|
+
* supported version range.
|
|
50
|
+
*/
|
|
51
|
+
export type SentryGlobalRequestMiddleware = {
|
|
52
|
+
'~types': SentryRequestMiddlewareTypes;
|
|
53
|
+
_types: SentryRequestMiddlewareTypes;
|
|
54
|
+
options: {
|
|
55
|
+
server?: (...args: any[]) => any;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Type of the `sentryGlobalFunctionMiddleware` export.
|
|
60
|
+
*
|
|
61
|
+
* Declares the middleware type information under both `~types` (TanStack Start >=1.143) and
|
|
62
|
+
* `_types` (older versions) so the middleware satisfies `AnyFunctionMiddleware` across the
|
|
63
|
+
* supported version range.
|
|
64
|
+
*/
|
|
65
|
+
export type SentryGlobalFunctionMiddleware = {
|
|
66
|
+
'~types': SentryFunctionMiddlewareTypes;
|
|
67
|
+
_types: SentryFunctionMiddlewareTypes;
|
|
3
68
|
options: {
|
|
4
69
|
server?: (...args: any[]) => any;
|
|
5
70
|
};
|
|
@@ -7,4 +72,5 @@ export type TanStackMiddlewareBase = {
|
|
|
7
72
|
export type MiddlewareWrapperOptions = {
|
|
8
73
|
name: string;
|
|
9
74
|
};
|
|
75
|
+
export {};
|
|
10
76
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,OAAO,CAAC;IAElB,OA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,QAAQ,EAAE,6BAA6B,CAAC;IACxC,MAAM,EAAE,6BAA6B,CAAC;IAEtC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;KAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware } from '../common/types';
|
|
2
2
|
/**
|
|
3
3
|
* Global request middleware that captures errors from API route requests.
|
|
4
4
|
* Should be added as the first entry in the `requestMiddleware` array of `createStart()`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const sentryGlobalRequestMiddleware:
|
|
6
|
+
export declare const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware;
|
|
7
7
|
/**
|
|
8
8
|
* Global function middleware that captures errors from server function invocations.
|
|
9
9
|
* Should be added as the first entry in the `functionMiddleware` array of `createStart()`.
|
|
10
10
|
*/
|
|
11
|
-
export declare const sentryGlobalFunctionMiddleware:
|
|
11
|
+
export declare const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware;
|
|
12
12
|
//# sourceMappingURL=globalMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalMiddleware.d.ts","sourceRoot":"","sources":["../../../src/server/globalMiddleware.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"globalMiddleware.d.ts","sourceRoot":"","sources":["../../../src/server/globalMiddleware.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAyDrG;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,6BAS3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,8BAU5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TanStackMiddlewareBase } from '../common/types';
|
|
1
|
+
import { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware, TanStackMiddlewareBase } from '../common/types';
|
|
2
2
|
import { CreateSentryTunnelRouteOptions } from '../server/tunnelRoute';
|
|
3
3
|
export * from '@sentry/react';
|
|
4
4
|
export { init } from './sdk';
|
|
@@ -11,12 +11,12 @@ export declare function wrapMiddlewaresWithSentry<T extends TanStackMiddlewareBa
|
|
|
11
11
|
* No-op stub for client-side builds.
|
|
12
12
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
13
13
|
*/
|
|
14
|
-
export declare const sentryGlobalRequestMiddleware:
|
|
14
|
+
export declare const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware;
|
|
15
15
|
/**
|
|
16
16
|
* No-op stub for client-side builds.
|
|
17
17
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
18
18
|
*/
|
|
19
|
-
export declare const sentryGlobalFunctionMiddleware:
|
|
19
|
+
export declare const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware;
|
|
20
20
|
/**
|
|
21
21
|
* No-op stub for client-side builds.
|
|
22
22
|
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TanStackMiddlewareBase, MiddlewareWrapperOptions } from './types';
|
|
1
|
+
export { TanStackMiddlewareBase, MiddlewareWrapperOptions, SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware, } from './types';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
export type TanStackMiddlewareBase = {
|
|
2
|
-
'~types':
|
|
2
|
+
'~types': unknown;
|
|
3
|
+
options: {
|
|
4
|
+
server?: (...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Structurally mirrors TanStack Start's `RequestMiddlewareTypes` for a middleware that contributes
|
|
9
|
+
* nothing to the middleware chain. The context-related fields are deliberately typed as `undefined`
|
|
10
|
+
* rather than `any`: TanStack Start merges middleware context types through these fields, so an
|
|
11
|
+
* `any` here would turn the inferred `context` of every subsequent middleware and handler into `any`.
|
|
12
|
+
*/
|
|
13
|
+
type SentryRequestMiddlewareTypes = {
|
|
14
|
+
type: 'request';
|
|
15
|
+
middlewares: undefined;
|
|
16
|
+
allInput: undefined;
|
|
17
|
+
allOutput: undefined;
|
|
18
|
+
serverContext: undefined;
|
|
19
|
+
allServerContext: undefined;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Structurally mirrors TanStack Start's `FunctionMiddlewareTypes` for a middleware that contributes
|
|
23
|
+
* nothing to the middleware chain (see `SentryRequestMiddlewareTypes`).
|
|
24
|
+
*/
|
|
25
|
+
type SentryFunctionMiddlewareTypes = {
|
|
26
|
+
type: 'function';
|
|
27
|
+
middlewares: undefined;
|
|
28
|
+
input: undefined;
|
|
29
|
+
allInput: undefined;
|
|
30
|
+
output: undefined;
|
|
31
|
+
allOutput: undefined;
|
|
32
|
+
clientContext: undefined;
|
|
33
|
+
allClientContextBeforeNext: undefined;
|
|
34
|
+
allClientContextAfterNext: undefined;
|
|
35
|
+
serverContext: undefined;
|
|
36
|
+
serverSendContext: undefined;
|
|
37
|
+
allServerSendContext: undefined;
|
|
38
|
+
allServerContext: undefined;
|
|
39
|
+
clientSendContext: undefined;
|
|
40
|
+
allClientSendContext: undefined;
|
|
41
|
+
validator: undefined;
|
|
42
|
+
inputValidator: undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Type of the `sentryGlobalRequestMiddleware` export.
|
|
46
|
+
*
|
|
47
|
+
* Declares the middleware type information under both `~types` (TanStack Start >=1.143) and
|
|
48
|
+
* `_types` (older versions) so the middleware satisfies `AnyRequestMiddleware` across the
|
|
49
|
+
* supported version range.
|
|
50
|
+
*/
|
|
51
|
+
export type SentryGlobalRequestMiddleware = {
|
|
52
|
+
'~types': SentryRequestMiddlewareTypes;
|
|
53
|
+
_types: SentryRequestMiddlewareTypes;
|
|
54
|
+
options: {
|
|
55
|
+
server?: (...args: any[]) => any;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Type of the `sentryGlobalFunctionMiddleware` export.
|
|
60
|
+
*
|
|
61
|
+
* Declares the middleware type information under both `~types` (TanStack Start >=1.143) and
|
|
62
|
+
* `_types` (older versions) so the middleware satisfies `AnyFunctionMiddleware` across the
|
|
63
|
+
* supported version range.
|
|
64
|
+
*/
|
|
65
|
+
export type SentryGlobalFunctionMiddleware = {
|
|
66
|
+
'~types': SentryFunctionMiddlewareTypes;
|
|
67
|
+
_types: SentryFunctionMiddlewareTypes;
|
|
3
68
|
options: {
|
|
4
69
|
server?: (...args: any[]) => any;
|
|
5
70
|
};
|
|
@@ -7,4 +72,5 @@ export type TanStackMiddlewareBase = {
|
|
|
7
72
|
export type MiddlewareWrapperOptions = {
|
|
8
73
|
name: string;
|
|
9
74
|
};
|
|
75
|
+
export {};
|
|
10
76
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SentryGlobalFunctionMiddleware, SentryGlobalRequestMiddleware } from '../common/types';
|
|
2
2
|
/**
|
|
3
3
|
* Global request middleware that captures errors from API route requests.
|
|
4
4
|
* Should be added as the first entry in the `requestMiddleware` array of `createStart()`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const sentryGlobalRequestMiddleware:
|
|
6
|
+
export declare const sentryGlobalRequestMiddleware: SentryGlobalRequestMiddleware;
|
|
7
7
|
/**
|
|
8
8
|
* Global function middleware that captures errors from server function invocations.
|
|
9
9
|
* Should be added as the first entry in the `functionMiddleware` array of `createStart()`.
|
|
10
10
|
*/
|
|
11
|
-
export declare const sentryGlobalFunctionMiddleware:
|
|
11
|
+
export declare const sentryGlobalFunctionMiddleware: SentryGlobalFunctionMiddleware;
|
|
12
12
|
//# sourceMappingURL=globalMiddleware.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/tanstackstart-react",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.58.0",
|
|
4
4
|
"description": "Official Sentry SDK for TanStack Start React",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/tanstackstart-react",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@opentelemetry/api": "^1.9.1",
|
|
67
67
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
68
|
-
"@sentry
|
|
69
|
-
"@sentry/core": "10.
|
|
70
|
-
"@sentry/node": "10.
|
|
71
|
-
"@sentry/react": "10.
|
|
68
|
+
"@sentry/browser-utils": "10.58.0",
|
|
69
|
+
"@sentry/core": "10.58.0",
|
|
70
|
+
"@sentry/node": "10.58.0",
|
|
71
|
+
"@sentry/react": "10.58.0",
|
|
72
72
|
"@sentry/vite-plugin": "^5.3.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|