@sentry/solidstart 11.12.0 → 11.13.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/_virtual/_rolldown/runtime.js +34 -0
- package/build/cjs/client/index.js +11 -18
- package/build/cjs/client/sdk.js +19 -20
- package/build/cjs/client/sdk.js.map +1 -1
- package/build/cjs/client/solidrouter.js +8 -16
- package/build/cjs/common/tunnel.js +11 -8
- package/build/cjs/common/tunnel.js.map +1 -1
- package/build/cjs/config/addInstrumentation.js +110 -111
- package/build/cjs/config/addInstrumentation.js.map +1 -1
- package/build/cjs/config/index.js +2 -0
- package/build/cjs/config/withSentry.js +86 -87
- package/build/cjs/config/withSentry.js.map +1 -1
- package/build/cjs/config/wrapServerEntryWithDynamicImport.js +139 -135
- package/build/cjs/config/wrapServerEntryWithDynamicImport.js.map +1 -1
- package/build/cjs/index.client.js +12 -18
- package/build/cjs/index.server.js +162 -159
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/nitro/tunnelPlugin.js +12 -10
- package/build/cjs/nitro/tunnelPlugin.js.map +1 -1
- package/build/cjs/server/index.js +151 -158
- package/build/cjs/server/middleware.js +26 -37
- package/build/cjs/server/middleware.js.map +1 -1
- package/build/cjs/server/sdk.js +13 -14
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/cjs/server/solidrouter.js +26 -18
- package/build/cjs/server/solidrouter.js.map +1 -1
- package/build/cjs/server/utils.js +32 -27
- package/build/cjs/server/utils.js.map +1 -1
- package/build/cjs/server/withServerActionInstrumentation.js +46 -49
- package/build/cjs/server/withServerActionInstrumentation.js.map +1 -1
- package/build/cjs/solidrouter.client.js +9 -16
- package/build/cjs/solidrouter.js +12 -18
- package/build/cjs/solidrouter.server.js +3 -8
- package/build/cjs/vite/buildInstrumentationFile.js +46 -46
- package/build/cjs/vite/buildInstrumentationFile.js.map +1 -1
- package/build/cjs/vite/index.js +5 -10
- package/build/cjs/vite/sentrySolidStart.js +86 -39
- package/build/cjs/vite/sentrySolidStart.js.map +1 -1
- package/build/cjs/vite/sentrySolidStartVite.js +32 -35
- package/build/cjs/vite/sentrySolidStartVite.js.map +1 -1
- package/build/cjs/vite/sourceMaps.js +117 -152
- package/build/cjs/vite/sourceMaps.js.map +1 -1
- package/build/esm/client/index.js +2 -3
- package/build/esm/client/sdk.js +19 -18
- package/build/esm/client/sdk.js.map +1 -1
- package/build/esm/client/solidrouter.js +1 -2
- package/build/esm/common/tunnel.js +11 -6
- package/build/esm/common/tunnel.js.map +1 -1
- package/build/esm/config/addInstrumentation.js +107 -109
- package/build/esm/config/addInstrumentation.js.map +1 -1
- package/build/esm/config/index.js +1 -0
- package/build/esm/config/withSentry.js +86 -84
- package/build/esm/config/withSentry.js.map +1 -1
- package/build/esm/config/wrapServerEntryWithDynamicImport.js +139 -133
- package/build/esm/config/wrapServerEntryWithDynamicImport.js.map +1 -1
- package/build/esm/index.client.js +3 -3
- package/build/esm/index.server.js +14 -10
- package/build/esm/index.server.js.map +1 -1
- package/build/esm/nitro/tunnelPlugin.js +12 -10
- package/build/esm/nitro/tunnelPlugin.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/index.js +7 -7
- package/build/esm/server/middleware.js +26 -35
- package/build/esm/server/middleware.js.map +1 -1
- package/build/esm/server/sdk.js +13 -12
- package/build/esm/server/sdk.js.map +1 -1
- package/build/esm/server/solidrouter.js +25 -16
- package/build/esm/server/solidrouter.js.map +1 -1
- package/build/esm/server/utils.js +32 -25
- package/build/esm/server/utils.js.map +1 -1
- package/build/esm/server/withServerActionInstrumentation.js +46 -47
- package/build/esm/server/withServerActionInstrumentation.js.map +1 -1
- package/build/esm/solidrouter.client.js +2 -2
- package/build/esm/solidrouter.js +3 -3
- package/build/esm/solidrouter.server.js +1 -2
- package/build/esm/vite/buildInstrumentationFile.js +43 -44
- package/build/esm/vite/buildInstrumentationFile.js.map +1 -1
- package/build/esm/vite/index.js +3 -3
- package/build/esm/vite/sentrySolidStart.js +86 -37
- package/build/esm/vite/sentrySolidStart.js.map +1 -1
- package/build/esm/vite/sentrySolidStartVite.js +32 -33
- package/build/esm/vite/sentrySolidStartVite.js.map +1 -1
- package/build/esm/vite/sourceMaps.js +117 -150
- package/build/esm/vite/sourceMaps.js.map +1 -1
- package/package.json +20 -20
- package/build/cjs/client/index.js.map +0 -1
- package/build/cjs/client/solidrouter.js.map +0 -1
- package/build/cjs/index.client.js.map +0 -1
- package/build/cjs/server/index.js.map +0 -1
- package/build/cjs/solidrouter.client.js.map +0 -1
- package/build/cjs/solidrouter.js.map +0 -1
- package/build/cjs/solidrouter.server.js.map +0 -1
- package/build/cjs/vite/index.js.map +0 -1
- package/build/esm/client/index.js.map +0 -1
- package/build/esm/client/solidrouter.js.map +0 -1
- package/build/esm/index.client.js.map +0 -1
- package/build/esm/server/index.js.map +0 -1
- package/build/esm/solidrouter.client.js.map +0 -1
- package/build/esm/solidrouter.js.map +0 -1
- package/build/esm/solidrouter.server.js.map +0 -1
- package/build/esm/vite/index.js.map +0 -1
|
@@ -1,159 +1,152 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
124
|
-
exports.
|
|
125
|
-
exports.
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
130
|
-
exports.
|
|
131
|
-
exports.
|
|
132
|
-
exports.
|
|
133
|
-
exports.
|
|
134
|
-
exports.
|
|
135
|
-
exports.
|
|
136
|
-
exports.
|
|
137
|
-
exports.
|
|
138
|
-
exports.
|
|
139
|
-
exports.
|
|
140
|
-
exports.
|
|
141
|
-
exports.
|
|
142
|
-
exports.
|
|
143
|
-
exports.
|
|
144
|
-
exports.
|
|
145
|
-
exports.
|
|
146
|
-
exports.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
enumerable: true,
|
|
153
|
-
value: node['__proto__']
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
Object.keys(node).forEach(function (k) {
|
|
157
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_sdk = require("./sdk.js");
|
|
4
|
+
const require_withServerActionInstrumentation = require("./withServerActionInstrumentation.js");
|
|
5
|
+
const require_middleware = require("./middleware.js");
|
|
6
|
+
let _sentry_solid = require("@sentry/solid");
|
|
7
|
+
let _sentry_node = require("@sentry/node");
|
|
8
|
+
exports.NodeClient = _sentry_node.NodeClient;
|
|
9
|
+
exports.SDK_VERSION = _sentry_node.SDK_VERSION;
|
|
10
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = _sentry_node.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
11
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = _sentry_node.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
12
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = _sentry_node.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
13
|
+
exports.Scope = _sentry_node.Scope;
|
|
14
|
+
exports.addBreadcrumb = _sentry_node.addBreadcrumb;
|
|
15
|
+
exports.addEventProcessor = _sentry_node.addEventProcessor;
|
|
16
|
+
exports.addIntegration = _sentry_node.addIntegration;
|
|
17
|
+
exports.amqplibIntegration = _sentry_node.amqplibIntegration;
|
|
18
|
+
exports.anrIntegration = _sentry_node.anrIntegration;
|
|
19
|
+
exports.bindScopeToEmitter = _sentry_node.bindScopeToEmitter;
|
|
20
|
+
exports.captureCheckIn = _sentry_node.captureCheckIn;
|
|
21
|
+
exports.captureConsoleIntegration = _sentry_node.captureConsoleIntegration;
|
|
22
|
+
exports.captureEvent = _sentry_node.captureEvent;
|
|
23
|
+
exports.captureException = _sentry_node.captureException;
|
|
24
|
+
exports.captureFeedback = _sentry_node.captureFeedback;
|
|
25
|
+
exports.captureMessage = _sentry_node.captureMessage;
|
|
26
|
+
exports.captureSession = _sentry_node.captureSession;
|
|
27
|
+
exports.close = _sentry_node.close;
|
|
28
|
+
exports.consoleIntegration = _sentry_node.consoleIntegration;
|
|
29
|
+
exports.consoleLoggingIntegration = _sentry_node.consoleLoggingIntegration;
|
|
30
|
+
exports.contextLinesIntegration = _sentry_node.contextLinesIntegration;
|
|
31
|
+
exports.continueTrace = _sentry_node.continueTrace;
|
|
32
|
+
exports.createConsolaReporter = _sentry_node.createConsolaReporter;
|
|
33
|
+
exports.createGetModuleFromFilename = _sentry_node.createGetModuleFromFilename;
|
|
34
|
+
exports.createSentryWinstonTransport = _sentry_node.createSentryWinstonTransport;
|
|
35
|
+
exports.createTransport = _sentry_node.createTransport;
|
|
36
|
+
exports.cron = _sentry_node.cron;
|
|
37
|
+
exports.cronJobIntegration = _sentry_node.cronJobIntegration;
|
|
38
|
+
exports.dedupeIntegration = _sentry_node.dedupeIntegration;
|
|
39
|
+
exports.defaultStackParser = _sentry_node.defaultStackParser;
|
|
40
|
+
exports.disableAnrDetectionForCallback = _sentry_node.disableAnrDetectionForCallback;
|
|
41
|
+
exports.endSession = _sentry_node.endSession;
|
|
42
|
+
exports.eventFiltersIntegration = _sentry_node.eventFiltersIntegration;
|
|
43
|
+
exports.expressErrorHandler = _sentry_node.expressErrorHandler;
|
|
44
|
+
exports.expressIntegration = _sentry_node.expressIntegration;
|
|
45
|
+
exports.extraErrorDataIntegration = _sentry_node.extraErrorDataIntegration;
|
|
46
|
+
exports.fastifyIntegration = _sentry_node.fastifyIntegration;
|
|
47
|
+
exports.flush = _sentry_node.flush;
|
|
48
|
+
exports.functionToStringIntegration = _sentry_node.functionToStringIntegration;
|
|
49
|
+
exports.genericPoolIntegration = _sentry_node.genericPoolIntegration;
|
|
50
|
+
exports.getActiveSpan = _sentry_node.getActiveSpan;
|
|
51
|
+
exports.getAutoPerformanceIntegrations = _sentry_node.getAutoPerformanceIntegrations;
|
|
52
|
+
exports.getClient = _sentry_node.getClient;
|
|
53
|
+
exports.getCurrentScope = _sentry_node.getCurrentScope;
|
|
54
|
+
exports.getDefaultIntegrations = _sentry_node.getDefaultIntegrations;
|
|
55
|
+
exports.getGlobalScope = _sentry_node.getGlobalScope;
|
|
56
|
+
exports.getIsolationScope = _sentry_node.getIsolationScope;
|
|
57
|
+
exports.getRootSpan = _sentry_node.getRootSpan;
|
|
58
|
+
exports.getSentryRelease = _sentry_node.getSentryRelease;
|
|
59
|
+
exports.getSpanDescendants = _sentry_node.getSpanDescendants;
|
|
60
|
+
exports.getSpanStatusFromHttpCode = _sentry_node.getSpanStatusFromHttpCode;
|
|
61
|
+
exports.getTunnelPath = _sentry_node.getTunnelPath;
|
|
62
|
+
exports.graphqlIntegration = _sentry_node.graphqlIntegration;
|
|
63
|
+
exports.handleTunnelRequest = _sentry_node.handleTunnelRequest;
|
|
64
|
+
exports.handleTunnelRequestIfMatched = _sentry_node.handleTunnelRequestIfMatched;
|
|
65
|
+
exports.hapiIntegration = _sentry_node.hapiIntegration;
|
|
66
|
+
exports.honoIntegration = _sentry_node.honoIntegration;
|
|
67
|
+
exports.honoMiddleware = _sentry_node.honoMiddleware;
|
|
68
|
+
exports.httpIntegration = _sentry_node.httpIntegration;
|
|
69
|
+
exports.httpServerIntegration = _sentry_node.httpServerIntegration;
|
|
70
|
+
exports.httpServerSpansIntegration = _sentry_node.httpServerSpansIntegration;
|
|
71
|
+
exports.init = require_sdk.init;
|
|
72
|
+
exports.initOpenTelemetry = _sentry_node.initOpenTelemetry;
|
|
73
|
+
exports.instrumentSupabaseClient = _sentry_node.instrumentSupabaseClient;
|
|
74
|
+
exports.isEnabled = _sentry_node.isEnabled;
|
|
75
|
+
exports.isInitialized = _sentry_node.isInitialized;
|
|
76
|
+
exports.isTunnelRequest = _sentry_node.isTunnelRequest;
|
|
77
|
+
exports.kafkaIntegration = _sentry_node.kafkaIntegration;
|
|
78
|
+
exports.knexIntegration = _sentry_node.knexIntegration;
|
|
79
|
+
exports.koaIntegration = _sentry_node.koaIntegration;
|
|
80
|
+
exports.lastEventId = _sentry_node.lastEventId;
|
|
81
|
+
exports.linkedErrorsIntegration = _sentry_node.linkedErrorsIntegration;
|
|
82
|
+
exports.localVariablesIntegration = _sentry_node.localVariablesIntegration;
|
|
83
|
+
exports.logger = _sentry_node.logger;
|
|
84
|
+
exports.makeNodeTransport = _sentry_node.makeNodeTransport;
|
|
85
|
+
exports.modulesIntegration = _sentry_node.modulesIntegration;
|
|
86
|
+
exports.mongoIntegration = _sentry_node.mongoIntegration;
|
|
87
|
+
exports.mongooseIntegration = _sentry_node.mongooseIntegration;
|
|
88
|
+
exports.mysql2Integration = _sentry_node.mysql2Integration;
|
|
89
|
+
exports.mysqlIntegration = _sentry_node.mysqlIntegration;
|
|
90
|
+
exports.nativeNodeFetchIntegration = _sentry_node.nativeNodeFetchIntegration;
|
|
91
|
+
exports.neonIntegration = _sentry_node.neonIntegration;
|
|
92
|
+
exports.nitroIntegration = _sentry_node.nitroIntegration;
|
|
93
|
+
exports.nodeContextIntegration = _sentry_node.nodeContextIntegration;
|
|
94
|
+
exports.nodeCronIntegration = _sentry_node.nodeCronIntegration;
|
|
95
|
+
exports.nodeScheduleIntegration = _sentry_node.nodeScheduleIntegration;
|
|
96
|
+
exports.onUncaughtExceptionIntegration = _sentry_node.onUncaughtExceptionIntegration;
|
|
97
|
+
exports.onUnhandledRejectionIntegration = _sentry_node.onUnhandledRejectionIntegration;
|
|
98
|
+
exports.parameterize = _sentry_node.parameterize;
|
|
99
|
+
exports.postgresIntegration = _sentry_node.postgresIntegration;
|
|
100
|
+
exports.postgresJsIntegration = _sentry_node.postgresJsIntegration;
|
|
101
|
+
exports.prismaIntegration = _sentry_node.prismaIntegration;
|
|
102
|
+
exports.redisIntegration = _sentry_node.redisIntegration;
|
|
103
|
+
exports.requestDataIntegration = _sentry_node.requestDataIntegration;
|
|
104
|
+
exports.rewriteFramesIntegration = _sentry_node.rewriteFramesIntegration;
|
|
105
|
+
exports.sentryBeforeResponseMiddleware = require_middleware.sentryBeforeResponseMiddleware;
|
|
106
|
+
exports.serveTunnelIntegration = _sentry_node.serveTunnelIntegration;
|
|
107
|
+
exports.setAttribute = _sentry_node.setAttribute;
|
|
108
|
+
exports.setAttributes = _sentry_node.setAttributes;
|
|
109
|
+
exports.setContext = _sentry_node.setContext;
|
|
110
|
+
exports.setCurrentClient = _sentry_node.setCurrentClient;
|
|
111
|
+
exports.setExtra = _sentry_node.setExtra;
|
|
112
|
+
exports.setExtras = _sentry_node.setExtras;
|
|
113
|
+
exports.setHttpStatus = _sentry_node.setHttpStatus;
|
|
114
|
+
exports.setMeasurement = _sentry_node.setMeasurement;
|
|
115
|
+
exports.setTag = _sentry_node.setTag;
|
|
116
|
+
exports.setTags = _sentry_node.setTags;
|
|
117
|
+
exports.setUser = _sentry_node.setUser;
|
|
118
|
+
exports.setupExpressErrorHandler = _sentry_node.setupExpressErrorHandler;
|
|
119
|
+
exports.setupHapiErrorHandler = _sentry_node.setupHapiErrorHandler;
|
|
120
|
+
exports.setupKoaErrorHandler = _sentry_node.setupKoaErrorHandler;
|
|
121
|
+
exports.spanStreamingIntegration = _sentry_node.spanStreamingIntegration;
|
|
122
|
+
exports.spanToBaggageHeader = _sentry_node.spanToBaggageHeader;
|
|
123
|
+
exports.spanToJSON = _sentry_node.spanToJSON;
|
|
124
|
+
exports.spanToStaticSpanJSON = _sentry_node.spanToStaticSpanJSON;
|
|
125
|
+
exports.spanToTraceHeader = _sentry_node.spanToTraceHeader;
|
|
126
|
+
exports.spotlightIntegration = _sentry_node.spotlightIntegration;
|
|
127
|
+
exports.startInactiveSpan = _sentry_node.startInactiveSpan;
|
|
128
|
+
exports.startNewTrace = _sentry_node.startNewTrace;
|
|
129
|
+
exports.startSession = _sentry_node.startSession;
|
|
130
|
+
exports.startSpan = _sentry_node.startSpan;
|
|
131
|
+
exports.startSpanManual = _sentry_node.startSpanManual;
|
|
132
|
+
exports.supabaseIntegration = _sentry_node.supabaseIntegration;
|
|
133
|
+
exports.suppressTracing = _sentry_node.suppressTracing;
|
|
134
|
+
exports.tediousIntegration = _sentry_node.tediousIntegration;
|
|
135
|
+
exports.trpcMiddleware = _sentry_node.trpcMiddleware;
|
|
136
|
+
exports.updateSpanName = _sentry_node.updateSpanName;
|
|
137
|
+
exports.withActiveSpan = _sentry_node.withActiveSpan;
|
|
138
|
+
exports.withIsolationScope = _sentry_node.withIsolationScope;
|
|
139
|
+
exports.withMonitor = _sentry_node.withMonitor;
|
|
140
|
+
exports.withScope = _sentry_node.withScope;
|
|
141
|
+
exports.withSentryErrorBoundary = _sentry_solid.withSentryErrorBoundary;
|
|
142
|
+
exports.withServerActionInstrumentation = require_withServerActionInstrumentation.withServerActionInstrumentation;
|
|
143
|
+
exports.withStaticSpan = _sentry_node.withStaticSpan;
|
|
144
|
+
exports.withStreamedSpan = _sentry_node.withStreamedSpan;
|
|
145
|
+
exports.zodErrorsIntegration = _sentry_node.zodErrorsIntegration;
|
|
146
|
+
Object.prototype.hasOwnProperty.call(_sentry_node, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
value: _sentry_node["__proto__"]
|
|
149
|
+
});
|
|
150
|
+
Object.keys(_sentry_node).forEach(function(k) {
|
|
151
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = _sentry_node[k];
|
|
158
152
|
});
|
|
159
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,42 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
|
|
1
|
+
let _sentry_core = require("@sentry/core");
|
|
2
|
+
// src/server/middleware.ts
|
|
5
3
|
function addMetaTagToHead(html) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const content = `<head>
|
|
11
|
-
${metaTags}
|
|
12
|
-
`;
|
|
13
|
-
return html.replace("<head>", content);
|
|
4
|
+
const metaTags = (0, _sentry_core.getTraceMetaTags)();
|
|
5
|
+
if (!metaTags) return html;
|
|
6
|
+
const content = `<head>\n${metaTags}\n`;
|
|
7
|
+
return html.replace("<head>", content);
|
|
14
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns an `onBeforeResponse` solid start middleware handler that adds tracing data as
|
|
11
|
+
* <meta> tags to a page on pageload to enable distributed tracing.
|
|
12
|
+
*/
|
|
15
13
|
function sentryBeforeResponseMiddleware() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for await (const chunk of body) {
|
|
31
|
-
const html = typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true });
|
|
32
|
-
const modifiedHtml = addMetaTagToHead(html);
|
|
33
|
-
controller.enqueue(new TextEncoder().encode(modifiedHtml));
|
|
34
|
-
}
|
|
35
|
-
controller.close();
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
};
|
|
14
|
+
return async function onBeforeResponse(event, response) {
|
|
15
|
+
if (!response.body || response.__sentry_wrapped__) return;
|
|
16
|
+
(0, _sentry_core.addNonEnumerableProperty)(response, "__sentry_wrapped__", true);
|
|
17
|
+
if (!event.response.headers.get("content-type")?.startsWith("text/html")) return;
|
|
18
|
+
const body = response.body;
|
|
19
|
+
const decoder = new TextDecoder();
|
|
20
|
+
response.body = new ReadableStream({ start: async (controller) => {
|
|
21
|
+
for await (const chunk of body) {
|
|
22
|
+
const modifiedHtml = addMetaTagToHead(typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }));
|
|
23
|
+
controller.enqueue(new TextEncoder().encode(modifiedHtml));
|
|
24
|
+
}
|
|
25
|
+
controller.close();
|
|
26
|
+
} });
|
|
27
|
+
};
|
|
39
28
|
}
|
|
40
|
-
|
|
41
29
|
exports.sentryBeforeResponseMiddleware = sentryBeforeResponseMiddleware;
|
|
42
|
-
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../../src/server/middleware.ts"],"sourcesContent":["import { addNonEnumerableProperty, getTraceMetaTags } from '@sentry/core';\nimport type { ResponseMiddleware } from '@solidjs/start/middleware';\nimport type { FetchEvent } from '@solidjs/start/server';\n\nexport type ResponseMiddlewareResponse = Parameters<ResponseMiddleware>[1] & {\n __sentry_wrapped__?: boolean;\n};\n\nfunction addMetaTagToHead(html: string): string {\n const metaTags = getTraceMetaTags();\n\n if (!metaTags) {\n return html;\n }\n\n const content = `<head>\\n${metaTags}\\n`;\n return html.replace('<head>', content);\n}\n\n/**\n * Returns an `onBeforeResponse` solid start middleware handler that adds tracing data as\n * <meta> tags to a page on pageload to enable distributed tracing.\n */\nexport function sentryBeforeResponseMiddleware() {\n return async function onBeforeResponse(event: FetchEvent, response: ResponseMiddlewareResponse) {\n if (!response.body || response.__sentry_wrapped__) {\n return;\n }\n\n // Ensure we don't double-wrap, in case a user has added the middleware twice\n // e.g. once manually, once via the wizard\n addNonEnumerableProperty(response, '__sentry_wrapped__', true);\n\n const contentType = event.response.headers.get('content-type');\n const isPageloadRequest = contentType?.startsWith('text/html');\n\n if (!isPageloadRequest) {\n return;\n }\n\n const body = response.body as NodeJS.ReadableStream;\n const decoder = new TextDecoder();\n response.body = new ReadableStream({\n start: async controller => {\n for await (const chunk of body) {\n const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });\n const modifiedHtml = addMetaTagToHead(html);\n controller.enqueue(new TextEncoder().encode(modifiedHtml));\n }\n controller.close();\n },\n });\n };\n}\n"],"
|
|
1
|
+
{"version":3,"file":"middleware.js","names":["getTraceMetaTags","addNonEnumerableProperty"],"sources":["../../../src/server/middleware.ts"],"sourcesContent":["import { addNonEnumerableProperty, getTraceMetaTags } from '@sentry/core';\nimport type { ResponseMiddleware } from '@solidjs/start/middleware';\nimport type { FetchEvent } from '@solidjs/start/server';\n\nexport type ResponseMiddlewareResponse = Parameters<ResponseMiddleware>[1] & {\n __sentry_wrapped__?: boolean;\n};\n\nfunction addMetaTagToHead(html: string): string {\n const metaTags = getTraceMetaTags();\n\n if (!metaTags) {\n return html;\n }\n\n const content = `<head>\\n${metaTags}\\n`;\n return html.replace('<head>', content);\n}\n\n/**\n * Returns an `onBeforeResponse` solid start middleware handler that adds tracing data as\n * <meta> tags to a page on pageload to enable distributed tracing.\n */\nexport function sentryBeforeResponseMiddleware() {\n return async function onBeforeResponse(event: FetchEvent, response: ResponseMiddlewareResponse) {\n if (!response.body || response.__sentry_wrapped__) {\n return;\n }\n\n // Ensure we don't double-wrap, in case a user has added the middleware twice\n // e.g. once manually, once via the wizard\n addNonEnumerableProperty(response, '__sentry_wrapped__', true);\n\n const contentType = event.response.headers.get('content-type');\n const isPageloadRequest = contentType?.startsWith('text/html');\n\n if (!isPageloadRequest) {\n return;\n }\n\n const body = response.body as NodeJS.ReadableStream;\n const decoder = new TextDecoder();\n response.body = new ReadableStream({\n start: async controller => {\n for await (const chunk of body) {\n const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });\n const modifiedHtml = addMetaTagToHead(html);\n controller.enqueue(new TextEncoder().encode(modifiedHtml));\n }\n controller.close();\n },\n });\n };\n}\n"],"mappings":";;AAQA,SAAS,iBAAiB,MAAsB;CAC9C,MAAM,YAAA,GAAWA,aAAAA,iBAAAA,CAAiB;CAElC,IAAI,CAAC,UACH,OAAO;CAGT,MAAM,UAAU,WAAW,SAAS;CACpC,OAAO,KAAK,QAAQ,UAAU,OAAO;AACvC;;;;;AAMA,SAAgB,iCAAiC;CAC/C,OAAO,eAAe,iBAAiB,OAAmB,UAAsC;EAC9F,IAAI,CAAC,SAAS,QAAQ,SAAS,oBAC7B;EAKFC,CAAAA,GAAAA,aAAAA,yBAAAA,CAAyB,UAAU,sBAAsB,IAAI;EAK7D,IAAI,CAHgB,MAAM,SAAS,QAAQ,IAAI,cACX,CAAC,EAAE,WAAW,WAAW,GAG3D;EAGF,MAAM,OAAO,SAAS;EACtB,MAAM,UAAU,IAAI,YAAY;EAChC,SAAS,OAAO,IAAI,eAAe,EACjC,OAAO,OAAM,eAAc;GACzB,WAAW,MAAM,SAAS,MAAM;IAE9B,MAAM,eAAe,iBADR,OAAO,UAAU,WAAW,QAAQ,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,CAC7C;IAC1C,WAAW,QAAQ,IAAI,YAAY,CAAC,CAAC,OAAO,YAAY,CAAC;GAC3D;GACA,WAAW,MAAM;EACnB,EACF,CAAC;CACH;AACF"}
|
package/build/cjs/server/sdk.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const require_utils = require("./utils.js");
|
|
2
|
+
let _sentry_core = require("@sentry/core");
|
|
3
|
+
let _sentry_node = require("@sentry/node");
|
|
4
|
+
// src/server/sdk.ts
|
|
5
|
+
/**
|
|
6
|
+
* Initializes the server side of the Solid Start SDK
|
|
7
|
+
*/
|
|
7
8
|
function init(options) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
utils.filterLowQualityTransactions(opts);
|
|
13
|
-
return node.init(opts);
|
|
9
|
+
const opts = { ...options };
|
|
10
|
+
(0, _sentry_core.applySdkMetadata)(opts, "solidstart", ["solidstart", "node"]);
|
|
11
|
+
require_utils.filterLowQualityTransactions(opts);
|
|
12
|
+
return (0, _sentry_node.init)(opts);
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
exports.init = init;
|
|
17
|
-
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { init as initNodeSdk } from '@sentry/node';\nimport { filterLowQualityTransactions } from './utils';\n\n/**\n * Initializes the server side of the Solid Start SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);\n filterLowQualityTransactions(opts);\n\n return initNodeSdk(opts);\n}\n"],"
|
|
1
|
+
{"version":3,"file":"sdk.js","names":["applySdkMetadata","filterLowQualityTransactions","initNodeSdk"],"sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { init as initNodeSdk } from '@sentry/node';\nimport { filterLowQualityTransactions } from './utils';\n\n/**\n * Initializes the server side of the Solid Start SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);\n filterLowQualityTransactions(opts);\n\n return initNodeSdk(opts);\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,KAAK,SAA8C;CACjE,MAAM,OAAO,EACX,GAAG,QACL;CAEAA,CAAAA,GAAAA,aAAAA,iBAAAA,CAAiB,MAAM,cAAc,CAAC,cAAc,MAAM,CAAC;CAC3DC,cAAAA,6BAA6B,IAAI;CAEjC,QAAA,GAAOC,aAAAA,KAAAA,CAAY,IAAI;AACzB"}
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let solid_js = require("solid-js");
|
|
3
|
+
let solid_js_web = require("solid-js/web");
|
|
4
|
+
// src/server/solidrouter.ts
|
|
5
|
+
/** Pass-through component in case user didn't specify a root **/
|
|
6
6
|
function SentryDefaultRoot(props) {
|
|
7
|
-
|
|
7
|
+
return props.children;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* On the client, router hooks are used in the router's root render prop.
|
|
11
|
+
* This creates a matching structure that's purely pass-through to avoid hydration errors.
|
|
12
|
+
*/
|
|
9
13
|
function withSentryRouterRoot(Root) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
const SentryRouterRoot = (props) => {
|
|
15
|
+
return (0, solid_js_web.createComponent)(Root, props);
|
|
16
|
+
};
|
|
17
|
+
return SentryRouterRoot;
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* On the client, router hooks are used to start navigation spans.
|
|
21
|
+
* This creates a matching structure that's purely pass-through to avoid hydration errors.
|
|
22
|
+
*/
|
|
15
23
|
function withSentryRouterRouting(Router) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
const SentryRouter = (props) => {
|
|
25
|
+
const [local, others] = (0, solid_js.splitProps)(props, ["root"]);
|
|
26
|
+
const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);
|
|
27
|
+
return (0, solid_js_web.createComponent)(Router, (0, solid_js.mergeProps)({ root: Root }, others));
|
|
28
|
+
};
|
|
29
|
+
return SentryRouter;
|
|
22
30
|
}
|
|
23
|
-
|
|
24
31
|
exports.withSentryRouterRouting = withSentryRouterRouting;
|
|
25
|
-
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=solidrouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidrouter.js","sources":["../../../src/server/solidrouter.ts"],"sourcesContent":["import type { HashRouter, MemoryRouter, Router as BaseRouter, RouteSectionProps, StaticRouter } from '@solidjs/router';\nimport type { Component, JSX, ParentProps } from 'solid-js';\nimport { mergeProps, splitProps } from 'solid-js';\nimport { createComponent } from 'solid-js/web';\n\n// We use @sentry/solid/solidrouter on the client.\n// On the server, we have to create matching components\n// in structure to avoid hydration errors.\n\n/** Pass-through component in case user didn't specify a root **/\nfunction SentryDefaultRoot(props: ParentProps): JSX.Element {\n return props.children;\n}\n\n/**\n * On the client, router hooks are used in the router's root render prop.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nfunction withSentryRouterRoot(Root: Component<RouteSectionProps>): Component<RouteSectionProps> {\n const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {\n return createComponent(Root, props);\n };\n\n return SentryRouterRoot;\n}\n\nexport type RouterType = typeof BaseRouter | typeof HashRouter | typeof MemoryRouter | typeof StaticRouter;\n\n/**\n * On the client, router hooks are used to start navigation spans.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nexport function withSentryRouterRouting(Router: RouterType): RouterType {\n const SentryRouter = (props: Parameters<RouterType>[0]): JSX.Element => {\n const [local, others] = splitProps(props, ['root']);\n // We need to wrap root here in case the user passed in their own root\n const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);\n\n return createComponent(Router, mergeProps({ root: Root }, others));\n };\n\n return SentryRouter;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"solidrouter.js","names":["createComponent","splitProps","mergeProps"],"sources":["../../../src/server/solidrouter.ts"],"sourcesContent":["import type { HashRouter, MemoryRouter, Router as BaseRouter, RouteSectionProps, StaticRouter } from '@solidjs/router';\nimport type { Component, JSX, ParentProps } from 'solid-js';\nimport { mergeProps, splitProps } from 'solid-js';\nimport { createComponent } from 'solid-js/web';\n\n// We use @sentry/solid/solidrouter on the client.\n// On the server, we have to create matching components\n// in structure to avoid hydration errors.\n\n/** Pass-through component in case user didn't specify a root **/\nfunction SentryDefaultRoot(props: ParentProps): JSX.Element {\n return props.children;\n}\n\n/**\n * On the client, router hooks are used in the router's root render prop.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nfunction withSentryRouterRoot(Root: Component<RouteSectionProps>): Component<RouteSectionProps> {\n const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {\n return createComponent(Root, props);\n };\n\n return SentryRouterRoot;\n}\n\nexport type RouterType = typeof BaseRouter | typeof HashRouter | typeof MemoryRouter | typeof StaticRouter;\n\n/**\n * On the client, router hooks are used to start navigation spans.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nexport function withSentryRouterRouting(Router: RouterType): RouterType {\n const SentryRouter = (props: Parameters<RouterType>[0]): JSX.Element => {\n const [local, others] = splitProps(props, ['root']);\n // We need to wrap root here in case the user passed in their own root\n const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);\n\n return createComponent(Router, mergeProps({ root: Root }, others));\n };\n\n return SentryRouter;\n}\n"],"mappings":";;;;;AAUA,SAAS,kBAAkB,OAAiC;CAC1D,OAAO,MAAM;AACf;;;;;AAMA,SAAS,qBAAqB,MAAkE;CAC9F,MAAM,oBAAoB,UAA0C;EAClE,QAAA,GAAOA,aAAAA,gBAAAA,CAAgB,MAAM,KAAK;CACpC;CAEA,OAAO;AACT;;;;;AAQA,SAAgB,wBAAwB,QAAgC;CACtE,MAAM,gBAAgB,UAAkD;EACtE,MAAM,CAAC,OAAO,WAAA,GAAUC,SAAAA,WAAAA,CAAW,OAAO,CAAC,MAAM,CAAC;EAElD,MAAM,OAAO,qBAAqB,MAAM,OAAO,MAAM,OAAO,iBAAiB;EAE7E,QAAA,GAAOD,aAAAA,gBAAAA,CAAgB,SAAA,GAAQE,SAAAA,WAAAA,CAAW,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC;CACnE;CAEA,OAAO;AACT"}
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
let _sentry_core = require("@sentry/core");
|
|
2
|
+
let _sentry_node = require("@sentry/node");
|
|
3
|
+
// src/server/utils.ts
|
|
4
|
+
/**
|
|
5
|
+
* Determines if a thrown "error" is a redirect Response which Solid Start users can throw to redirect to another route.
|
|
6
|
+
* see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect
|
|
7
|
+
* @param error the potential redirect error
|
|
8
|
+
*/
|
|
6
9
|
function isRedirect(error) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const hasValidStatus = error.status >= 300 && error.status <= 308;
|
|
12
|
-
return hasValidLocation && hasValidStatus;
|
|
10
|
+
if (error == null || !(error instanceof Response)) return false;
|
|
11
|
+
const hasValidLocation = typeof error.headers.get("location") === "string";
|
|
12
|
+
const hasValidStatus = error.status >= 300 && error.status <= 308;
|
|
13
|
+
return hasValidLocation && hasValidStatus;
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Filter function for low quality transactions
|
|
17
|
+
*
|
|
18
|
+
* Exported only for tests
|
|
19
|
+
*/
|
|
14
20
|
function lowQualityTransactionsFilter(options) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return event;
|
|
25
|
-
}),
|
|
26
|
-
{ id: "SolidStartLowQualityTransactionsFilter" }
|
|
27
|
-
);
|
|
21
|
+
return Object.assign(((event) => {
|
|
22
|
+
if (event.type !== "transaction") return event;
|
|
23
|
+
if (event.transaction?.match(/^GET \/_build\//)) {
|
|
24
|
+
options.debug && _sentry_core.debug.log("SolidStartLowQualityTransactionsFilter filtered transaction", event.transaction);
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return event;
|
|
28
|
+
}), { id: "SolidStartLowQualityTransactionsFilter" });
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Adds an event processor to filter out low quality transactions,
|
|
32
|
+
* e.g. to filter out transactions for build assets
|
|
33
|
+
*/
|
|
29
34
|
function filterLowQualityTransactions(options) {
|
|
30
|
-
|
|
35
|
+
(0, _sentry_node.getGlobalScope)().addEventProcessor(lowQualityTransactionsFilter(options));
|
|
31
36
|
}
|
|
32
|
-
|
|
33
37
|
exports.filterLowQualityTransactions = filterLowQualityTransactions;
|
|
34
38
|
exports.isRedirect = isRedirect;
|
|
35
39
|
exports.lowQualityTransactionsFilter = lowQualityTransactionsFilter;
|
|
36
|
-
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Filter function for low quality transactions\n *\n * Exported only for tests\n */\nexport function lowQualityTransactionsFilter(options: Options): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n}\n"],"
|
|
1
|
+
{"version":3,"file":"utils.js","names":["debug","getGlobalScope"],"sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Filter function for low quality transactions\n *\n * Exported only for tests\n */\nexport function lowQualityTransactionsFilter(options: Options): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,WAAW,OAAyB;CAClD,IAAI,SAAS,QAAQ,EAAE,iBAAiB,WACtC,OAAO;CAGT,MAAM,mBAAmB,OAAO,MAAM,QAAQ,IAAI,UAAU,MAAM;CAClE,MAAM,iBAAiB,MAAM,UAAU,OAAO,MAAM,UAAU;CAC9D,OAAO,oBAAoB;AAC7B;;;;;;AAOA,SAAgB,6BAA6B,SAAkC;CAC7E,OAAO,OAAO,SACX,UAAS;EACR,IAAI,MAAM,SAAS,eACjB,OAAO;EAGT,IAAI,MAAM,aAAa,MAAM,iBAAiB,GAAG;GAC/C,QAAQ,SAASA,aAAAA,MAAM,IAAI,+DAA+D,MAAM,WAAW;GAC3G,OAAO;EACT;EACA,OAAO;CACT,IACA,EAAE,IAAI,yCAAyC,CACjD;AACF;;;;;AAMA,SAAgB,6BAA6B,SAAwB;CACnEC,CAAAA,GAAAA,aAAAA,eAAAA,CAAe,CAAC,CAAC,kBAAkB,6BAA6B,OAAO,CAAC;AAC1E"}
|