@sentry/tanstackstart 9.3.0 → 9.4.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/common/index.js +22 -0
- package/build/cjs/common/index.js.map +1 -0
- package/build/cjs/config/index.js +9 -0
- package/build/cjs/config/index.js.map +1 -1
- package/build/cjs/index.client.js +3 -0
- package/build/cjs/index.client.js.map +1 -1
- package/build/cjs/index.server.js +16 -49
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/server/index.js +49 -6
- package/build/cjs/server/index.js.map +1 -1
- package/build/esm/common/index.js +19 -0
- package/build/esm/common/index.js.map +1 -0
- package/build/esm/config/index.js +7 -0
- package/build/esm/config/index.js.map +1 -1
- package/build/esm/index.client.js +1 -0
- package/build/esm/index.client.js.map +1 -1
- package/build/esm/index.server.js +3 -43
- package/build/esm/index.server.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/index.js +43 -0
- package/build/esm/server/index.js.map +1 -1
- package/build/types/common/index.d.ts +11 -0
- package/build/types/common/index.d.ts.map +1 -0
- package/build/types/config/index.d.ts +4 -1
- package/build/types/config/index.d.ts.map +1 -1
- package/build/types/index.client.d.ts +1 -0
- package/build/types/index.client.d.ts.map +1 -1
- package/build/types/index.server.d.ts +1 -19
- package/build/types/index.server.d.ts.map +1 -1
- package/build/types/index.types.d.ts +1 -0
- package/build/types/index.types.d.ts.map +1 -1
- package/build/types/server/index.d.ts +19 -0
- package/build/types/server/index.d.ts.map +1 -1
- package/build/types-ts3.8/common/index.d.ts +11 -0
- package/build/types-ts3.8/config/index.d.ts +4 -1
- package/build/types-ts3.8/index.client.d.ts +1 -0
- package/build/types-ts3.8/index.server.d.ts +1 -19
- package/build/types-ts3.8/index.types.d.ts +1 -0
- package/build/types-ts3.8/server/index.d.ts +19 -0
- package/package.json +10 -8
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.
|
|
5
|
+
*/
|
|
6
|
+
function sentryGlobalServerMiddlewareHandler() {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
return function (server) {
|
|
9
|
+
return server.next();
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.
|
|
15
|
+
*/
|
|
16
|
+
function wrapStreamHandlerWithSentry(handler) {
|
|
17
|
+
return handler;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.sentryGlobalServerMiddlewareHandler = sentryGlobalServerMiddlewareHandler;
|
|
21
|
+
exports.wrapStreamHandlerWithSentry = wrapStreamHandlerWithSentry;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/common/index.ts"],"sourcesContent":["/**\n * A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.\n */\nexport function sentryGlobalServerMiddlewareHandler() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function <T>(server: { next: (...args: any[]) => T }): T {\n return server.next();\n };\n}\n\n/**\n * Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.\n */\nexport function wrapStreamHandlerWithSentry<H>(handler: H): H {\n return handler;\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACO,SAAS,mCAAmC,GAAG;AACtD;AACA,EAAE,OAAO,UAAa,MAAM,EAAsC;AAClE,IAAI,OAAO,MAAM,CAAC,IAAI,EAAE;AACxB,GAAG;AACH;;AAEA;AACA;AACA;AACO,SAAS,2BAA2B,CAAI,OAAO,EAAQ;AAC9D,EAAE,OAAO,OAAO;AAChB;;;;;"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Wraps a TanStack Start config.
|
|
5
|
+
*/
|
|
6
|
+
function wrapVinxiConfigWithSentry(config) {
|
|
7
|
+
return config;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
exports.wrapVinxiConfigWithSentry = wrapVinxiConfigWithSentry;
|
|
2
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/config/index.ts"],"sourcesContent":["/**\n * Wraps a TanStack Start config.\n */\nexport function wrapVinxiConfigWithSentry<C>(config: C): C {\n return config;\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACO,SAAS,yBAAyB,CAAI,MAAM,EAAQ;AAC3D,EAAE,OAAO,MAAM;AACf;;;;"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const react = require('@sentry/react');
|
|
4
|
+
const index = require('./common/index.js');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
8
|
+
exports.sentryGlobalServerMiddlewareHandler = index.sentryGlobalServerMiddlewareHandler;
|
|
9
|
+
exports.wrapStreamHandlerWithSentry = index.wrapStreamHandlerWithSentry;
|
|
7
10
|
Object.prototype.hasOwnProperty.call(react, '__proto__') &&
|
|
8
11
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
9
12
|
Object.defineProperty(exports, '__proto__', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,60 +1,27 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
+
const index = require('./config/index.js');
|
|
4
|
+
const index$1 = require('./server/index.js');
|
|
5
|
+
const index$2 = require('./common/index.js');
|
|
3
6
|
const node = require('@sentry/node');
|
|
4
7
|
|
|
5
|
-
/**
|
|
6
|
-
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
7
|
-
* so they should simply be a passthrough.
|
|
8
|
-
*/
|
|
9
|
-
const ErrorBoundary = (props) => {
|
|
10
|
-
if (!props.children) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
8
|
|
|
14
|
-
if (typeof props.children === 'function') {
|
|
15
|
-
return (props.children )();
|
|
16
|
-
}
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return (createStore) => createStore;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
30
|
-
* SSR errors so they should simply be a passthrough.
|
|
31
|
-
*/
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
-
function withErrorBoundary(
|
|
34
|
-
WrappedComponent,
|
|
35
|
-
) {
|
|
36
|
-
return WrappedComponent ;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
41
|
-
*/
|
|
42
|
-
function showReportDialog() {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
exports.ErrorBoundary = ErrorBoundary;
|
|
47
|
-
exports.createReduxEnhancer = createReduxEnhancer;
|
|
48
|
-
exports.showReportDialog = showReportDialog;
|
|
49
|
-
exports.withErrorBoundary = withErrorBoundary;
|
|
10
|
+
exports.wrapVinxiConfigWithSentry = index.wrapVinxiConfigWithSentry;
|
|
11
|
+
exports.ErrorBoundary = index$1.ErrorBoundary;
|
|
12
|
+
exports.createReduxEnhancer = index$1.createReduxEnhancer;
|
|
13
|
+
exports.showReportDialog = index$1.showReportDialog;
|
|
14
|
+
exports.withErrorBoundary = index$1.withErrorBoundary;
|
|
15
|
+
exports.sentryGlobalServerMiddlewareHandler = index$2.sentryGlobalServerMiddlewareHandler;
|
|
16
|
+
exports.wrapStreamHandlerWithSentry = index$2.wrapStreamHandlerWithSentry;
|
|
50
17
|
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
18
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
19
|
+
Object.defineProperty(exports, '__proto__', {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
value: node['__proto__']
|
|
22
|
+
});
|
|
56
23
|
|
|
57
24
|
Object.keys(node).forEach(k => {
|
|
58
|
-
|
|
25
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
59
26
|
});
|
|
60
27
|
//# sourceMappingURL=index.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,16 +2,59 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
|
|
3
3
|
const node = require('@sentry/node');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
7
|
+
* so they should simply be a passthrough.
|
|
8
|
+
*/
|
|
9
|
+
const ErrorBoundary = (props) => {
|
|
10
|
+
if (!props.children) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
5
13
|
|
|
14
|
+
if (typeof props.children === 'function') {
|
|
15
|
+
return (props.children )();
|
|
16
|
+
}
|
|
6
17
|
|
|
18
|
+
return props.children;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
23
|
+
*/
|
|
24
|
+
function createReduxEnhancer() {
|
|
25
|
+
return (createStore) => createStore;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
30
|
+
* SSR errors so they should simply be a passthrough.
|
|
31
|
+
*/
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
+
function withErrorBoundary(
|
|
34
|
+
WrappedComponent,
|
|
35
|
+
) {
|
|
36
|
+
return WrappedComponent ;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
41
|
+
*/
|
|
42
|
+
function showReportDialog() {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.ErrorBoundary = ErrorBoundary;
|
|
47
|
+
exports.createReduxEnhancer = createReduxEnhancer;
|
|
48
|
+
exports.showReportDialog = showReportDialog;
|
|
49
|
+
exports.withErrorBoundary = withErrorBoundary;
|
|
7
50
|
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
51
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
52
|
+
Object.defineProperty(exports, '__proto__', {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
value: node['__proto__']
|
|
55
|
+
});
|
|
13
56
|
|
|
14
57
|
Object.keys(node).forEach(k => {
|
|
15
|
-
|
|
58
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
16
59
|
});
|
|
17
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/server/index.ts"],"sourcesContent":["export * from '@sentry/node';\n\n/**\n * A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors\n * so they should simply be a passthrough.\n */\nexport const ErrorBoundary = (props: React.PropsWithChildren<unknown>): React.ReactNode => {\n if (!props.children) {\n return null;\n }\n\n if (typeof props.children === 'function') {\n return (props.children as () => React.ReactNode)();\n }\n\n return props.children;\n};\n\n/**\n * A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.\n */\nexport function createReduxEnhancer() {\n return (createStore: unknown) => createStore;\n}\n\n/**\n * A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch\n * SSR errors so they should simply be a passthrough.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withErrorBoundary<P extends Record<string, any>>(\n WrappedComponent: React.ComponentType<P>,\n): React.FC<P> {\n return WrappedComponent as React.FC<P>;\n}\n\n/**\n * Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.\n */\nexport function showReportDialog(): void {\n return;\n}\n"],"names":[],"mappings":";;;;AAEA;AACA;AACA;AACA;AACa,MAAA,aAAA,GAAgB,CAAC,KAAK,KAAwD;AAC3F,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACvB,IAAI,OAAO,IAAI;AACf;;AAEA,EAAE,IAAI,OAAO,KAAK,CAAC,QAAS,KAAI,UAAU,EAAE;AAC5C,IAAI,OAAO,CAAC,KAAK,CAAC,QAAS,IAA2B;AACtD;;AAEA,EAAE,OAAO,KAAK,CAAC,QAAQ;AACvB;;AAEA;AACA;AACA;AACO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO,CAAC,WAAW,KAAc,WAAW;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,gBAAgB;AAClB,EAAe;AACf,EAAE,OAAO,gBAAiB;AAC1B;;AAEA;AACA;AACA;AACO,SAAS,gBAAgB,GAAS;AACzC,EAAE;AACF;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.
|
|
3
|
+
*/
|
|
4
|
+
function sentryGlobalServerMiddlewareHandler() {
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
return function (server) {
|
|
7
|
+
return server.next();
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.
|
|
13
|
+
*/
|
|
14
|
+
function wrapStreamHandlerWithSentry(handler) {
|
|
15
|
+
return handler;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { sentryGlobalServerMiddlewareHandler, wrapStreamHandlerWithSentry };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/common/index.ts"],"sourcesContent":["/**\n * A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.\n */\nexport function sentryGlobalServerMiddlewareHandler() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function <T>(server: { next: (...args: any[]) => T }): T {\n return server.next();\n };\n}\n\n/**\n * Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.\n */\nexport function wrapStreamHandlerWithSentry<H>(handler: H): H {\n return handler;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACO,SAAS,mCAAmC,GAAG;AACtD;AACA,EAAE,OAAO,UAAa,MAAM,EAAsC;AAClE,IAAI,OAAO,MAAM,CAAC,IAAI,EAAE;AACxB,GAAG;AACH;;AAEA;AACA;AACA;AACO,SAAS,2BAA2B,CAAI,OAAO,EAAQ;AAC9D,EAAE,OAAO,OAAO;AAChB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/config/index.ts"],"sourcesContent":["/**\n * Wraps a TanStack Start config.\n */\nexport function wrapVinxiConfigWithSentry<C>(config: C): C {\n return config;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACO,SAAS,yBAAyB,CAAI,MAAM,EAAQ;AAC3D,EAAE,OAAO,MAAM;AACf;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,45 +1,5 @@
|
|
|
1
|
+
export { wrapVinxiConfigWithSentry } from './config/index.js';
|
|
2
|
+
export { ErrorBoundary, createReduxEnhancer, showReportDialog, withErrorBoundary } from './server/index.js';
|
|
3
|
+
export { sentryGlobalServerMiddlewareHandler, wrapStreamHandlerWithSentry } from './common/index.js';
|
|
1
4
|
export * from '@sentry/node';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
5
|
-
* so they should simply be a passthrough.
|
|
6
|
-
*/
|
|
7
|
-
const ErrorBoundary = (props) => {
|
|
8
|
-
if (!props.children) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (typeof props.children === 'function') {
|
|
13
|
-
return (props.children )();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return props.children;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
21
|
-
*/
|
|
22
|
-
function createReduxEnhancer() {
|
|
23
|
-
return (createStore) => createStore;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
28
|
-
* SSR errors so they should simply be a passthrough.
|
|
29
|
-
*/
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
function withErrorBoundary(
|
|
32
|
-
WrappedComponent,
|
|
33
|
-
) {
|
|
34
|
-
return WrappedComponent ;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
39
|
-
*/
|
|
40
|
-
function showReportDialog() {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { ErrorBoundary, createReduxEnhancer, showReportDialog, withErrorBoundary };
|
|
45
5
|
//# sourceMappingURL=index.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"9.
|
|
1
|
+
{"type":"module","version":"9.4.0","sideEffects":false}
|
|
@@ -1,2 +1,45 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
5
|
+
* so they should simply be a passthrough.
|
|
6
|
+
*/
|
|
7
|
+
const ErrorBoundary = (props) => {
|
|
8
|
+
if (!props.children) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (typeof props.children === 'function') {
|
|
13
|
+
return (props.children )();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return props.children;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
21
|
+
*/
|
|
22
|
+
function createReduxEnhancer() {
|
|
23
|
+
return (createStore) => createStore;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
28
|
+
* SSR errors so they should simply be a passthrough.
|
|
29
|
+
*/
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
function withErrorBoundary(
|
|
32
|
+
WrappedComponent,
|
|
33
|
+
) {
|
|
34
|
+
return WrappedComponent ;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
39
|
+
*/
|
|
40
|
+
function showReportDialog() {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { ErrorBoundary, createReduxEnhancer, showReportDialog, withErrorBoundary };
|
|
2
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/server/index.ts"],"sourcesContent":["export * from '@sentry/node';\n\n/**\n * A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors\n * so they should simply be a passthrough.\n */\nexport const ErrorBoundary = (props: React.PropsWithChildren<unknown>): React.ReactNode => {\n if (!props.children) {\n return null;\n }\n\n if (typeof props.children === 'function') {\n return (props.children as () => React.ReactNode)();\n }\n\n return props.children;\n};\n\n/**\n * A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.\n */\nexport function createReduxEnhancer() {\n return (createStore: unknown) => createStore;\n}\n\n/**\n * A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch\n * SSR errors so they should simply be a passthrough.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withErrorBoundary<P extends Record<string, any>>(\n WrappedComponent: React.ComponentType<P>,\n): React.FC<P> {\n return WrappedComponent as React.FC<P>;\n}\n\n/**\n * Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.\n */\nexport function showReportDialog(): void {\n return;\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACa,MAAA,aAAA,GAAgB,CAAC,KAAK,KAAwD;AAC3F,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACvB,IAAI,OAAO,IAAI;AACf;;AAEA,EAAE,IAAI,OAAO,KAAK,CAAC,QAAS,KAAI,UAAU,EAAE;AAC5C,IAAI,OAAO,CAAC,KAAK,CAAC,QAAS,IAA2B;AACtD;;AAEA,EAAE,OAAO,KAAK,CAAC,QAAQ;AACvB;;AAEA;AACA;AACA;AACO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO,CAAC,WAAW,KAAc,WAAW;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,gBAAgB;AAClB,EAAe;AACf,EAAE,OAAO,gBAAiB;AAC1B;;AAEA;AACA;AACA;AACO,SAAS,gBAAgB,GAAS;AACzC,EAAE;AACF;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.
|
|
3
|
+
*/
|
|
4
|
+
export declare function sentryGlobalServerMiddlewareHandler(): <T>(server: {
|
|
5
|
+
next: (...args: any[]) => T;
|
|
6
|
+
}) => T;
|
|
7
|
+
/**
|
|
8
|
+
* Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function wrapStreamHandlerWithSentry<H>(handler: H): H;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mCAAmC;oBAEH,GAAG,EAAE;QAGpD;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAE5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAEzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../src/index.client.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../src/index.client.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export * from './config';
|
|
3
2
|
export * from './server';
|
|
4
|
-
|
|
5
|
-
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
6
|
-
* so they should simply be a passthrough.
|
|
7
|
-
*/
|
|
8
|
-
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
|
|
13
|
-
/**
|
|
14
|
-
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
15
|
-
* SSR errors so they should simply be a passthrough.
|
|
16
|
-
*/
|
|
17
|
-
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
|
|
18
|
-
/**
|
|
19
|
-
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
20
|
-
*/
|
|
21
|
-
export declare function showReportDialog(): void;
|
|
3
|
+
export * from './common';
|
|
22
4
|
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './config';
|
|
2
2
|
export * from './client';
|
|
3
3
|
export * from './server';
|
|
4
|
+
export * from './common';
|
|
4
5
|
import type { Client, Integration, Options, StackParser } from '@sentry/core';
|
|
5
6
|
import type * as clientSdk from './client';
|
|
6
7
|
import type * as serverSdk from './server';
|
|
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CAAC;AACzE,MAAM,CAAC,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,SAAS,CAAC,iBAAiB,CAAC"}
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export * from '@sentry/node';
|
|
3
|
+
/**
|
|
4
|
+
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
5
|
+
* so they should simply be a passthrough.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
|
|
12
|
+
/**
|
|
13
|
+
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
14
|
+
* SSR errors so they should simply be a passthrough.
|
|
15
|
+
*/
|
|
16
|
+
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
|
|
17
|
+
/**
|
|
18
|
+
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
19
|
+
*/
|
|
20
|
+
export declare function showReportDialog(): void;
|
|
2
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":";AAAA,cAAc,cAAc,CAAC;AAE7B;;;GAGG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,iBAAiB,CAAC,OAAO,CAAC,KAAG,MAAM,SAU7E,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,kBACZ,OAAO,aAC7B;AAED;;;GAGG;AAEH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7D,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACvC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAEb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.
|
|
3
|
+
*/
|
|
4
|
+
export declare function sentryGlobalServerMiddlewareHandler(): <T>(server: {
|
|
5
|
+
next: (...args: any[]) => T;
|
|
6
|
+
}) => T;
|
|
7
|
+
/**
|
|
8
|
+
* Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function wrapStreamHandlerWithSentry<H>(handler: H): H;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export * from './config';
|
|
3
2
|
export * from './server';
|
|
4
|
-
|
|
5
|
-
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
6
|
-
* so they should simply be a passthrough.
|
|
7
|
-
*/
|
|
8
|
-
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
|
|
13
|
-
/**
|
|
14
|
-
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
15
|
-
* SSR errors so they should simply be a passthrough.
|
|
16
|
-
*/
|
|
17
|
-
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
|
|
18
|
-
/**
|
|
19
|
-
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
20
|
-
*/
|
|
21
|
-
export declare function showReportDialog(): void;
|
|
3
|
+
export * from './common';
|
|
22
4
|
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export * from '@sentry/node';
|
|
3
|
+
/**
|
|
4
|
+
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
|
|
5
|
+
* so they should simply be a passthrough.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
|
|
12
|
+
/**
|
|
13
|
+
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
|
|
14
|
+
* SSR errors so they should simply be a passthrough.
|
|
15
|
+
*/
|
|
16
|
+
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
|
|
17
|
+
/**
|
|
18
|
+
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
|
|
19
|
+
*/
|
|
20
|
+
export declare function showReportDialog(): void;
|
|
2
21
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/tanstackstart",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Official Sentry SDK for TanStack Start",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/tanstackstart",
|
|
@@ -23,8 +23,10 @@
|
|
|
23
23
|
"import": "./build/esm/index.client.js",
|
|
24
24
|
"require": "./build/cjs/index.client.js"
|
|
25
25
|
},
|
|
26
|
-
"node":
|
|
27
|
-
|
|
26
|
+
"node": {
|
|
27
|
+
"import": "./build/esm/index.server.js",
|
|
28
|
+
"require": "./build/cjs/index.server.js"
|
|
29
|
+
}
|
|
28
30
|
},
|
|
29
31
|
"./import": {
|
|
30
32
|
"import": {
|
|
@@ -50,11 +52,11 @@
|
|
|
50
52
|
"dependencies": {
|
|
51
53
|
"@opentelemetry/api": "^1.9.0",
|
|
52
54
|
"@opentelemetry/semantic-conventions": "^1.30.0",
|
|
53
|
-
"@sentry-internal/browser-utils": "9.
|
|
54
|
-
"@sentry/core": "9.
|
|
55
|
-
"@sentry/node": "9.
|
|
56
|
-
"@sentry/opentelemetry": "9.
|
|
57
|
-
"@sentry/react": "9.
|
|
55
|
+
"@sentry-internal/browser-utils": "9.4.0",
|
|
56
|
+
"@sentry/core": "9.4.0",
|
|
57
|
+
"@sentry/node": "9.4.0",
|
|
58
|
+
"@sentry/opentelemetry": "9.4.0",
|
|
59
|
+
"@sentry/react": "9.4.0"
|
|
58
60
|
},
|
|
59
61
|
"scripts": {
|
|
60
62
|
"build": "run-p build:transpile build:types",
|