@sentry/solidstart 8.27.0 → 8.29.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/README.md +19 -43
- package/build/cjs/client/sdk.js +20 -0
- package/build/cjs/client/sdk.js.map +1 -1
- package/build/cjs/index.server.js +5 -0
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/server/index.js +3 -0
- package/build/cjs/server/index.js.map +1 -1
- package/build/cjs/server/middleware.js.map +1 -0
- package/build/cjs/vite/sentrySolidStartVite.js +26 -0
- package/build/cjs/vite/sentrySolidStartVite.js.map +1 -0
- package/build/cjs/vite/sourceMaps.js +66 -0
- package/build/cjs/vite/sourceMaps.js.map +1 -0
- package/build/esm/client/sdk.js +21 -1
- package/build/esm/client/sdk.js.map +1 -1
- package/build/esm/index.server.js +3 -1
- package/build/esm/index.server.js.map +1 -1
- package/build/esm/server/index.js +2 -1
- package/build/esm/server/index.js.map +1 -1
- package/build/esm/server/middleware.js.map +1 -0
- package/build/esm/vite/sentrySolidStartVite.js +20 -0
- package/build/esm/vite/sentrySolidStartVite.js.map +1 -0
- package/build/esm/vite/sourceMaps.js +60 -0
- package/build/esm/vite/sourceMaps.js.map +1 -0
- package/build/types/client/sdk.d.ts.map +1 -1
- package/build/types/index.server.d.ts +1 -0
- 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 +2 -1
- package/build/types/server/index.d.ts.map +1 -1
- package/build/types/server/middleware.d.ts.map +1 -0
- package/build/types/vite/index.d.ts +2 -0
- package/build/types/vite/index.d.ts.map +1 -0
- package/build/types/vite/sentrySolidStartVite.d.ts +7 -0
- package/build/types/vite/sentrySolidStartVite.d.ts.map +1 -0
- package/build/types/vite/sourceMaps.d.ts +9 -0
- package/build/types/vite/sourceMaps.d.ts.map +1 -0
- package/build/types/vite/types.d.ts +115 -0
- package/build/types/vite/types.d.ts.map +1 -0
- package/package.json +9 -20
- package/build/cjs/middleware.js.map +0 -1
- package/build/esm/middleware.js.map +0 -1
- package/middleware.d.ts.map +0 -1
- /package/build/cjs/{middleware.js → server/middleware.js} +0 -0
- /package/build/esm/{middleware.js → server/middleware.js} +0 -0
- /package/{middleware.d.ts → build/types/server/middleware.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
# Official Sentry SDK for
|
|
7
|
+
# Official Sentry SDK for SolidStart
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@sentry/solidstart)
|
|
10
10
|
[](https://www.npmjs.com/package/@sentry/solidstart)
|
|
11
11
|
[](https://www.npmjs.com/package/@sentry/solidstart)
|
|
12
12
|
|
|
13
|
-
This SDK is
|
|
14
|
-
|
|
15
|
-
SDK is for [
|
|
13
|
+
This SDK is in **Beta**. The API is stable but updates may include minor changes in behavior. Please reach out on
|
|
14
|
+
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. This
|
|
15
|
+
SDK is for [SolidStart](https://start.solidjs.com/). If you're using [Solid](https://www.solidjs.com/) see our
|
|
16
16
|
[Solid SDK here](https://github.com/getsentry/sentry-javascript/tree/develop/packages/solid).
|
|
17
17
|
|
|
18
18
|
## Links
|
|
@@ -22,7 +22,7 @@ SDK is for [Solid Start](https://start.solidjs.com/). If you're using [Solid](ht
|
|
|
22
22
|
## General
|
|
23
23
|
|
|
24
24
|
This package is a wrapper around `@sentry/node` for the server and `@sentry/solid` for the client side, with added
|
|
25
|
-
functionality related to
|
|
25
|
+
functionality related to SolidStart.
|
|
26
26
|
|
|
27
27
|
## Manual Setup
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ If the setup through the wizard doesn't work for you, you can also set up the SD
|
|
|
30
30
|
|
|
31
31
|
### 1. Prerequesits & Installation
|
|
32
32
|
|
|
33
|
-
Install the Sentry
|
|
33
|
+
Install the Sentry SolidStart SDK:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# Using npm
|
|
@@ -73,10 +73,10 @@ Sentry.init({
|
|
|
73
73
|
|
|
74
74
|
### 4. Server instrumentation
|
|
75
75
|
|
|
76
|
-
Complete the setup by adding the Sentry
|
|
76
|
+
Complete the setup by adding the Sentry middleware to your `src/middleware.ts` file:
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
|
-
import { sentryBeforeResponseMiddleware } from '@sentry/solidstart
|
|
79
|
+
import { sentryBeforeResponseMiddleware } from '@sentry/solidstart';
|
|
80
80
|
import { createMiddleware } from '@solidjs/start/middleware';
|
|
81
81
|
|
|
82
82
|
export default createMiddleware({
|
|
@@ -157,58 +157,34 @@ render(
|
|
|
157
157
|
);
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
## Uploading Source Maps
|
|
161
161
|
|
|
162
|
-
To
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# Using npm
|
|
168
|
-
npm install @sentry/vite-plugin --save-dev
|
|
169
|
-
|
|
170
|
-
# Using yarn
|
|
171
|
-
yarn add @sentry/vite-plugin --dev
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
2. Configure the vite plugin
|
|
175
|
-
|
|
176
|
-
To upload source maps you have to configure an auth token. Auth tokens can be passed to the plugin explicitly with the
|
|
177
|
-
`authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the
|
|
178
|
-
working directory when building your project. We recommend you add the auth token to your CI/CD environment as an
|
|
179
|
-
environment variable.
|
|
162
|
+
To upload source maps, add the `sentrySolidStartVite` plugin from `@sentry/solidstart` to your `app.config.ts` and
|
|
163
|
+
configure an auth token. Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a
|
|
164
|
+
`SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when
|
|
165
|
+
building your project. We recommend you add the auth token to your CI/CD environment as an environment variable.
|
|
180
166
|
|
|
181
167
|
Learn more about configuring the plugin in our
|
|
182
168
|
[Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin).
|
|
183
169
|
|
|
184
|
-
```
|
|
185
|
-
// .
|
|
186
|
-
SENTRY_AUTH_TOKEN=<your auth token>
|
|
187
|
-
SENTRY_ORG=<your org>
|
|
188
|
-
SENTRY_PROJECT=<your project name>
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
3. Finally, add the plugin to your `app.config.ts` file.
|
|
192
|
-
|
|
193
|
-
```javascript
|
|
170
|
+
```typescript
|
|
171
|
+
// app.config.ts
|
|
194
172
|
import { defineConfig } from '@solidjs/start/config';
|
|
195
|
-
import {
|
|
173
|
+
import { sentrySolidStartVite } from '@sentry/solidstart';
|
|
196
174
|
|
|
197
175
|
export default defineConfig({
|
|
198
|
-
// rest of your config
|
|
199
176
|
// ...
|
|
200
177
|
|
|
201
178
|
vite: {
|
|
202
|
-
build: {
|
|
203
|
-
sourcemap: true,
|
|
204
|
-
},
|
|
205
179
|
plugins: [
|
|
206
|
-
|
|
180
|
+
sentrySolidStartVite({
|
|
207
181
|
org: process.env.SENTRY_ORG,
|
|
208
182
|
project: process.env.SENTRY_PROJECT,
|
|
209
183
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
184
|
+
debug: true,
|
|
210
185
|
}),
|
|
211
186
|
],
|
|
212
187
|
},
|
|
188
|
+
// ...
|
|
213
189
|
});
|
|
214
190
|
```
|
package/build/cjs/client/sdk.js
CHANGED
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
const core = require('@sentry/core');
|
|
4
4
|
const solid = require('@sentry/solid');
|
|
5
5
|
|
|
6
|
+
// Treeshakable guard to remove all code related to tracing
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Initializes the client side of the Solid Start SDK.
|
|
8
10
|
*/
|
|
9
11
|
function init(options) {
|
|
10
12
|
const opts = {
|
|
13
|
+
defaultIntegrations: getDefaultIntegrations(options),
|
|
11
14
|
...options,
|
|
12
15
|
};
|
|
13
16
|
|
|
@@ -16,5 +19,22 @@ function init(options) {
|
|
|
16
19
|
return solid.init(opts);
|
|
17
20
|
}
|
|
18
21
|
|
|
22
|
+
function getDefaultIntegrations(options) {
|
|
23
|
+
const integrations = solid.getDefaultIntegrations(options);
|
|
24
|
+
|
|
25
|
+
// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
|
|
26
|
+
// in which case everything inside will get tree-shaken away
|
|
27
|
+
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
|
|
28
|
+
// We add the default BrowserTracingIntegration here always.
|
|
29
|
+
// We can do this, even if `solidRouterBrowserTracingIntegration` is
|
|
30
|
+
// supplied as integration in `init` by users because it will win
|
|
31
|
+
// over the default integration by virtue of having the same
|
|
32
|
+
// `BrowserTracing` integration name and being added later.
|
|
33
|
+
integrations.push(solid.browserTracingIntegration());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return integrations;
|
|
37
|
+
}
|
|
38
|
+
|
|
19
39
|
exports.init = init;
|
|
20
40
|
//# sourceMappingURL=sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { init as initSolidSDK
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\nimport type { Client, Integration } from '@sentry/types';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["applySdkMetadata","initSolidSDK","getDefaultSolidIntegrations","browserTracingIntegration"],"mappings":";;;;;AASA;;AAGA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,mBAAmB,EAAE,sBAAsB,CAAC,OAAO,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG,CAAA;AACH;AACA,EAAEA,qBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;AAC/D;AACA,EAAE,OAAOC,UAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,CAAA;AACA;AACA,SAAS,sBAAsB,CAAC,OAAO,EAAiC;AACxE,EAAE,MAAM,YAAa,GAAEC,4BAA2B,CAAC,OAAO,CAAC,CAAA;AAC3D;AACA;AACA;AACA,EAAE,IAAI,OAAO,kBAAA,KAAuB,WAAY,IAAG,kBAAkB,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY,CAAC,IAAI,CAACC,+BAAyB,EAAE,CAAC,CAAA;AAClD,GAAE;AACF;AACA,EAAE,OAAO,YAAY,CAAA;AACrB;;;;"}
|
|
@@ -4,6 +4,8 @@ const node = require('@sentry/node');
|
|
|
4
4
|
const solid = require('@sentry/solid');
|
|
5
5
|
const sdk = require('./server/sdk.js');
|
|
6
6
|
const withServerActionInstrumentation = require('./server/withServerActionInstrumentation.js');
|
|
7
|
+
const middleware = require('./server/middleware.js');
|
|
8
|
+
const sentrySolidStartVite = require('./vite/sentrySolidStartVite.js');
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
|
|
@@ -48,6 +50,7 @@ exports.fastifyIntegration = node.fastifyIntegration;
|
|
|
48
50
|
exports.flush = node.flush;
|
|
49
51
|
exports.functionToStringIntegration = node.functionToStringIntegration;
|
|
50
52
|
exports.generateInstrumentOnce = node.generateInstrumentOnce;
|
|
53
|
+
exports.genericPoolIntegration = node.genericPoolIntegration;
|
|
51
54
|
exports.getActiveSpan = node.getActiveSpan;
|
|
52
55
|
exports.getAutoPerformanceIntegrations = node.getAutoPerformanceIntegrations;
|
|
53
56
|
exports.getClient = node.getClient;
|
|
@@ -121,6 +124,8 @@ exports.zodErrorsIntegration = node.zodErrorsIntegration;
|
|
|
121
124
|
exports.withSentryErrorBoundary = solid.withSentryErrorBoundary;
|
|
122
125
|
exports.init = sdk.init;
|
|
123
126
|
exports.withServerActionInstrumentation = withServerActionInstrumentation.withServerActionInstrumentation;
|
|
127
|
+
exports.sentryBeforeResponseMiddleware = middleware.sentryBeforeResponseMiddleware;
|
|
128
|
+
exports.sentrySolidStartVite = sentrySolidStartVite.sentrySolidStartVite;
|
|
124
129
|
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
125
130
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
126
131
|
Object.defineProperty(exports, '__proto__', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,6 +4,7 @@ const node = require('@sentry/node');
|
|
|
4
4
|
const solid = require('@sentry/solid');
|
|
5
5
|
const sdk = require('./sdk.js');
|
|
6
6
|
const withServerActionInstrumentation = require('./withServerActionInstrumentation.js');
|
|
7
|
+
const middleware = require('./middleware.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -48,6 +49,7 @@ exports.fastifyIntegration = node.fastifyIntegration;
|
|
|
48
49
|
exports.flush = node.flush;
|
|
49
50
|
exports.functionToStringIntegration = node.functionToStringIntegration;
|
|
50
51
|
exports.generateInstrumentOnce = node.generateInstrumentOnce;
|
|
52
|
+
exports.genericPoolIntegration = node.genericPoolIntegration;
|
|
51
53
|
exports.getActiveSpan = node.getActiveSpan;
|
|
52
54
|
exports.getAutoPerformanceIntegrations = node.getAutoPerformanceIntegrations;
|
|
53
55
|
exports.getClient = node.getClient;
|
|
@@ -121,6 +123,7 @@ exports.zodErrorsIntegration = node.zodErrorsIntegration;
|
|
|
121
123
|
exports.withSentryErrorBoundary = solid.withSentryErrorBoundary;
|
|
122
124
|
exports.init = sdk.init;
|
|
123
125
|
exports.withServerActionInstrumentation = withServerActionInstrumentation.withServerActionInstrumentation;
|
|
126
|
+
exports.sentryBeforeResponseMiddleware = middleware.sentryBeforeResponseMiddleware;
|
|
124
127
|
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
125
128
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
126
129
|
Object.defineProperty(exports, '__proto__', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../../../src/server/middleware.ts"],"sourcesContent":["import { getTraceMetaTags } from '@sentry/core';\nimport { addNonEnumerableProperty } from '@sentry/utils';\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 && 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"],"names":["getTraceMetaTags","addNonE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,GAAW,KAAM,GAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAK,EAAC,CAAC,CAAA;AAClG,UAAU,MAAM,YAAa,GAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;AACrD,UAAU,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;AACpE,SAAQ;AACR,QAAQ,UAAU,CAAC,KAAK,EAAE,CAAA;AAC1B,OAAO;AACP,KAAK,CAAC,CAAA;AACN,GAAG,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var {
|
|
2
|
+
_nullishCoalesce,
|
|
3
|
+
_optionalChain
|
|
4
|
+
} = require('@sentry/utils');
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const sourceMaps = require('./sourceMaps.js');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Various Sentry vite plugins to be used for SolidStart.
|
|
12
|
+
*/
|
|
13
|
+
const sentrySolidStartVite = (options = {}) => {
|
|
14
|
+
const sentryPlugins = [];
|
|
15
|
+
|
|
16
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
17
|
+
if (_nullishCoalesce(_optionalChain([options, 'access', _ => _.sourceMapsUploadOptions, 'optionalAccess', _2 => _2.enabled]), () => ( true))) {
|
|
18
|
+
sentryPlugins.push(...sourceMaps.makeSourceMapsVitePlugin(options));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return sentryPlugins;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.sentrySolidStartVite = sentrySolidStartVite;
|
|
26
|
+
//# sourceMappingURL=sentrySolidStartVite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import type { Plugin } from 'vite';\nimport { makeSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}): Plugin[] => {\n const sentryPlugins: Plugin[] = [];\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourceMapsUploadOptions?.enabled ?? true) {\n sentryPlugins.push(...makeSourceMapsVitePlugin(options));\n }\n }\n\n return sentryPlugins;\n};\n"],"names":["makeSourceMapsVitePlugin"],"mappings":";;;;;;;;;AAIA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACO,CAAA,CAAA,CAAA,CAAA,EAAM,qBAAuB,EAAA,CAAC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAkC,EAAE,EAAe,CAAA,EAAA;EAC7F,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA0B,EAAA,CAAA,CAAE;;EAElC,CAAA,EAAA,CAAI,OAAO,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAa,aAAa,EAAE;IAC1C,qCAAI,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,EAAG,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE;MACpD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAC,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAGA,mCAAwB,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAC,CAAC;IAC1D;EACF;;EAEA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,aAAa;AACtB,CAAA;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var {
|
|
2
|
+
_nullishCoalesce,
|
|
3
|
+
_optionalChain
|
|
4
|
+
} = require('@sentry/utils');
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const vitePlugin = require('@sentry/vite-plugin');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A Sentry plugin for SolidStart to enable source maps and use
|
|
12
|
+
* @sentry/vite-plugin to automatically upload source maps to Sentry.
|
|
13
|
+
* @param {SourceMapsOptions} options
|
|
14
|
+
*/
|
|
15
|
+
function makeSourceMapsVitePlugin(options) {
|
|
16
|
+
const { authToken, debug, org, project, sourceMapsUploadOptions } = options;
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
name: 'sentry-solidstart-source-maps',
|
|
20
|
+
apply: 'build',
|
|
21
|
+
enforce: 'post',
|
|
22
|
+
config(config) {
|
|
23
|
+
const sourceMapsPreviouslyNotEnabled = !_optionalChain([config, 'access', _ => _.build, 'optionalAccess', _2 => _2.sourcemap]);
|
|
24
|
+
if (debug && sourceMapsPreviouslyNotEnabled) {
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.log('[Sentry SolidStart Plugin] Enabling source map generation');
|
|
27
|
+
if (!_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _3 => _3.filesToDeleteAfterUpload])) {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.warn(
|
|
30
|
+
`[Sentry SolidStart PLugin] We recommend setting the \`sourceMapsUploadOptions.filesToDeleteAfterUpload\` option to clean up source maps after uploading.
|
|
31
|
+
[Sentry SolidStart Plugin] Otherwise, source maps might be deployed to production, depending on your configuration`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
...config,
|
|
37
|
+
build: {
|
|
38
|
+
...config.build,
|
|
39
|
+
sourcemap: true,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
...vitePlugin.sentryVitePlugin({
|
|
45
|
+
authToken: _nullishCoalesce(authToken, () => ( process.env.SENTRY_AUTH_TOKEN)),
|
|
46
|
+
bundleSizeOptimizations: options.bundleSizeOptimizations,
|
|
47
|
+
debug: _nullishCoalesce(debug, () => ( false)),
|
|
48
|
+
org: _nullishCoalesce(org, () => ( process.env.SENTRY_ORG)),
|
|
49
|
+
project: _nullishCoalesce(project, () => ( process.env.SENTRY_PROJECT)),
|
|
50
|
+
sourcemaps: {
|
|
51
|
+
filesToDeleteAfterUpload: _nullishCoalesce(_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _4 => _4.filesToDeleteAfterUpload]), () => ( undefined)),
|
|
52
|
+
..._optionalChain([sourceMapsUploadOptions, 'optionalAccess', _5 => _5.unstable_sentryVitePluginOptions, 'optionalAccess', _6 => _6.sourcemaps]),
|
|
53
|
+
},
|
|
54
|
+
telemetry: _nullishCoalesce(_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _7 => _7.telemetry]), () => ( true)),
|
|
55
|
+
_metaOptions: {
|
|
56
|
+
telemetry: {
|
|
57
|
+
metaFramework: 'solidstart',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
..._optionalChain([sourceMapsUploadOptions, 'optionalAccess', _8 => _8.unstable_sentryVitePluginOptions]),
|
|
61
|
+
}),
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
exports.makeSourceMapsVitePlugin = makeSourceMapsVitePlugin;
|
|
66
|
+
//# sourceMappingURL=sourceMaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { Plugin } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to enable source maps and use\n * @sentry/vite-plugin to automatically upload source maps to Sentry.\n * @param {SourceMapsOptions} options\n */\nexport function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[] {\n const { authToken, debug, org, project, sourceMapsUploadOptions } = options;\n return [\n {\n name: 'sentry-solidstart-source-maps',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const sourceMapsPreviouslyNotEnabled = !config.build?.sourcemap;\n if (debug && sourceMapsPreviouslyNotEnabled) {\n // eslint-disable-next-line no-console\n console.log('[Sentry SolidStart Plugin] Enabling source map generation');\n if (!sourceMapsUploadOptions?.filesToDeleteAfterUpload) {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart PLugin] We recommend setting the \\`sourceMapsUploadOptions.filesToDeleteAfterUpload\\` option to clean up source maps after uploading.\n[Sentry SolidStart Plugin] Otherwise, source maps might be deployed to production, depending on your configuration`,\n );\n }\n }\n return {\n ...config,\n build: {\n ...config.build,\n sourcemap: true,\n },\n };\n },\n },\n ...sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations: options.bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n sourcemaps: {\n filesToDeleteAfterUpload: sourceMapsUploadOptions?.filesToDeleteAfterUpload ?? undefined,\n ...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps,\n },\n telemetry: sourceMapsUploadOptions?.telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n ...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions,\n }),\n ];\n}\n"],"names":["sentryVitePlugin"],"mappings":";;;;;;;;;AAIA,CAAA,CAAA;CACA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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uBAAuB,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAA,CAAA;IAClE,CAAK,CAAC;EACN,CAAG;AACH;;"}
|
package/build/esm/client/sdk.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { applySdkMetadata } from '@sentry/core';
|
|
2
|
-
import { init as init$1 } from '@sentry/solid';
|
|
2
|
+
import { init as init$1, getDefaultIntegrations as getDefaultIntegrations$1, browserTracingIntegration } from '@sentry/solid';
|
|
3
|
+
|
|
4
|
+
// Treeshakable guard to remove all code related to tracing
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Initializes the client side of the Solid Start SDK.
|
|
6
8
|
*/
|
|
7
9
|
function init(options) {
|
|
8
10
|
const opts = {
|
|
11
|
+
defaultIntegrations: getDefaultIntegrations(options),
|
|
9
12
|
...options,
|
|
10
13
|
};
|
|
11
14
|
|
|
@@ -14,5 +17,22 @@ function init(options) {
|
|
|
14
17
|
return init$1(opts);
|
|
15
18
|
}
|
|
16
19
|
|
|
20
|
+
function getDefaultIntegrations(options) {
|
|
21
|
+
const integrations = getDefaultIntegrations$1(options);
|
|
22
|
+
|
|
23
|
+
// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
|
|
24
|
+
// in which case everything inside will get tree-shaken away
|
|
25
|
+
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
|
|
26
|
+
// We add the default BrowserTracingIntegration here always.
|
|
27
|
+
// We can do this, even if `solidRouterBrowserTracingIntegration` is
|
|
28
|
+
// supplied as integration in `init` by users because it will win
|
|
29
|
+
// over the default integration by virtue of having the same
|
|
30
|
+
// `BrowserTracing` integration name and being added later.
|
|
31
|
+
integrations.push(browserTracingIntegration());
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return integrations;
|
|
35
|
+
}
|
|
36
|
+
|
|
17
37
|
export { init };
|
|
18
38
|
//# sourceMappingURL=sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { init as initSolidSDK
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\nimport type { Client, Integration } from '@sentry/types';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["initSolidSDK","getDefaultSolidIntegrations"],"mappings":";;;AASA;;AAGA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,mBAAmB,EAAE,sBAAsB,CAAC,OAAO,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG,CAAA;AACH;AACA,EAAE,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;AAC/D;AACA,EAAE,OAAOA,MAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,CAAA;AACA;AACA,SAAS,sBAAsB,CAAC,OAAO,EAAiC;AACxE,EAAE,MAAM,YAAa,GAAEC,wBAA2B,CAAC,OAAO,CAAC,CAAA;AAC3D;AACA;AACA;AACA,EAAE,IAAI,OAAO,kBAAA,KAAuB,WAAY,IAAG,kBAAkB,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY,CAAC,IAAI,CAAC,yBAAyB,EAAE,CAAC,CAAA;AAClD,GAAE;AACF;AACA,EAAE,OAAO,YAAY,CAAA;AACrB;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
-
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
2
|
+
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './server/sdk.js';
|
|
5
5
|
export { withServerActionInstrumentation } from './server/withServerActionInstrumentation.js';
|
|
6
|
+
export { sentryBeforeResponseMiddleware } from './server/middleware.js';
|
|
7
|
+
export { sentrySolidStartVite } from './vite/sentrySolidStartVite.js';
|
|
6
8
|
//# sourceMappingURL=index.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
-
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
2
|
+
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './sdk.js';
|
|
5
5
|
export { withServerActionInstrumentation } from './withServerActionInstrumentation.js';
|
|
6
|
+
export { sentryBeforeResponseMiddleware } from './middleware.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../../../src/server/middleware.ts"],"sourcesContent":["import { getTraceMetaTags } from '@sentry/core';\nimport { addNonEnumerableProperty } from '@sentry/utils';\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 && 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"],"names":[],"mappings":";;;AASA,SAAS,gBAAgB,CAAC,IAAI,EAAkB;AAChD,EAAE,MAAM,QAAA,GAAW,gBAAgB,EAAE,CAAA;AACrC;AACA,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAI,OAAO,IAAI,CAAA;AACf,GAAE;AACF;AACA,EAAE,MAAM,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;AACzC,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;AACxC,CAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,8BAA8B,GAAG;AACjD,EAAE,OAAO,eAAe,gBAAgB,CAAC,KAAK,EAAc,QAAQ,EAA8B;AAClG,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,QAAQ,CAAC,kBAAkB,EAAE;AACvD,MAAM,OAAM;AACZ,KAAI;AACJ;AACA;AACA;AACA,IAAI,wBAAwB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAA;AAClE;AACA,IAAI,MAAM,WAAA,GAAc,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;AAClE,IAAI,MAAM,iBAAkB,GAAE,WAAY,IAAG,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;AAChF;AACA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC5B,MAAM,OAAM;AACZ,KAAI;AACJ;AACA,IAAI,MAAM,IAAA,GAAO,QAAQ,CAAC,IAAK,EAAA;AAC/B,IAAI,MAAM,OAAQ,GAAE,IAAI,WAAW,EAAE,CAAA;AACrC,IAAI,QAAQ,CAAC,IAAA,GAAO,IAAI,cAAc,CAAC;AACvC,MAAM,KAAK,EAAE,MAAM,UAAA,IAAc;AACjC,QAAQ,WAAW,MAAM,KAAM,IAAG,IAAI,EAAE;AACxC,UAAU,MAAM,OAAO,OAAO,UAAU,QAAA,GAAW,KAAM,GAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAK,EAAC,CAAC,CAAA;AAClG,UAAU,MAAM,YAAa,GAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;AACrD,UAAU,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;AACpE,SAAQ;AACR,QAAQ,UAAU,CAAC,KAAK,EAAE,CAAA;AAC1B,OAAO;AACP,KAAK,CAAC,CAAA;AACN,GAAG,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _nullishCoalesce, _optionalChain } from '@sentry/utils';
|
|
2
|
+
import { makeSourceMapsVitePlugin } from './sourceMaps.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Various Sentry vite plugins to be used for SolidStart.
|
|
6
|
+
*/
|
|
7
|
+
const sentrySolidStartVite = (options = {}) => {
|
|
8
|
+
const sentryPlugins = [];
|
|
9
|
+
|
|
10
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
11
|
+
if (_nullishCoalesce(_optionalChain([options, 'access', _ => _.sourceMapsUploadOptions, 'optionalAccess', _2 => _2.enabled]), () => ( true))) {
|
|
12
|
+
sentryPlugins.push(...makeSourceMapsVitePlugin(options));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return sentryPlugins;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { sentrySolidStartVite };
|
|
20
|
+
//# sourceMappingURL=sentrySolidStartVite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import type { Plugin } from 'vite';\nimport { makeSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}): Plugin[] => {\n const sentryPlugins: Plugin[] = [];\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourceMapsUploadOptions?.enabled ?? true) {\n sentryPlugins.push(...makeSourceMapsVitePlugin(options));\n }\n }\n\n return sentryPlugins;\n};\n"],"names":[],"mappings":";;;AAIA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACO,CAAA,CAAA,CAAA,CAAA,EAAM,qBAAuB,EAAA,CAAC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAkC,EAAE,EAAe,CAAA,EAAA;EAC7F,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA0B,EAAA,CAAA,CAAE;;EAElC,CAAA,EAAA,CAAI,OAAO,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAa,aAAa,EAAE;IAC1C,qCAAI,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,EAAG,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE;MACpD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAC,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAG,wBAAwB,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAC,CAAC;IAC1D;EACF;;EAEA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,aAAa;AACtB,CAAA;;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { _nullishCoalesce, _optionalChain } from '@sentry/utils';
|
|
2
|
+
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A Sentry plugin for SolidStart to enable source maps and use
|
|
6
|
+
* @sentry/vite-plugin to automatically upload source maps to Sentry.
|
|
7
|
+
* @param {SourceMapsOptions} options
|
|
8
|
+
*/
|
|
9
|
+
function makeSourceMapsVitePlugin(options) {
|
|
10
|
+
const { authToken, debug, org, project, sourceMapsUploadOptions } = options;
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
name: 'sentry-solidstart-source-maps',
|
|
14
|
+
apply: 'build',
|
|
15
|
+
enforce: 'post',
|
|
16
|
+
config(config) {
|
|
17
|
+
const sourceMapsPreviouslyNotEnabled = !_optionalChain([config, 'access', _ => _.build, 'optionalAccess', _2 => _2.sourcemap]);
|
|
18
|
+
if (debug && sourceMapsPreviouslyNotEnabled) {
|
|
19
|
+
// eslint-disable-next-line no-console
|
|
20
|
+
console.log('[Sentry SolidStart Plugin] Enabling source map generation');
|
|
21
|
+
if (!_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _3 => _3.filesToDeleteAfterUpload])) {
|
|
22
|
+
// eslint-disable-next-line no-console
|
|
23
|
+
console.warn(
|
|
24
|
+
`[Sentry SolidStart PLugin] We recommend setting the \`sourceMapsUploadOptions.filesToDeleteAfterUpload\` option to clean up source maps after uploading.
|
|
25
|
+
[Sentry SolidStart Plugin] Otherwise, source maps might be deployed to production, depending on your configuration`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
...config,
|
|
31
|
+
build: {
|
|
32
|
+
...config.build,
|
|
33
|
+
sourcemap: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
...sentryVitePlugin({
|
|
39
|
+
authToken: _nullishCoalesce(authToken, () => ( process.env.SENTRY_AUTH_TOKEN)),
|
|
40
|
+
bundleSizeOptimizations: options.bundleSizeOptimizations,
|
|
41
|
+
debug: _nullishCoalesce(debug, () => ( false)),
|
|
42
|
+
org: _nullishCoalesce(org, () => ( process.env.SENTRY_ORG)),
|
|
43
|
+
project: _nullishCoalesce(project, () => ( process.env.SENTRY_PROJECT)),
|
|
44
|
+
sourcemaps: {
|
|
45
|
+
filesToDeleteAfterUpload: _nullishCoalesce(_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _4 => _4.filesToDeleteAfterUpload]), () => ( undefined)),
|
|
46
|
+
..._optionalChain([sourceMapsUploadOptions, 'optionalAccess', _5 => _5.unstable_sentryVitePluginOptions, 'optionalAccess', _6 => _6.sourcemaps]),
|
|
47
|
+
},
|
|
48
|
+
telemetry: _nullishCoalesce(_optionalChain([sourceMapsUploadOptions, 'optionalAccess', _7 => _7.telemetry]), () => ( true)),
|
|
49
|
+
_metaOptions: {
|
|
50
|
+
telemetry: {
|
|
51
|
+
metaFramework: 'solidstart',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
..._optionalChain([sourceMapsUploadOptions, 'optionalAccess', _8 => _8.unstable_sentryVitePluginOptions]),
|
|
55
|
+
}),
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { makeSourceMapsVitePlugin };
|
|
60
|
+
//# sourceMappingURL=sourceMaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { Plugin } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to enable source maps and use\n * @sentry/vite-plugin to automatically upload source maps to Sentry.\n * @param {SourceMapsOptions} options\n */\nexport function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[] {\n const { authToken, debug, org, project, sourceMapsUploadOptions } = options;\n return [\n {\n name: 'sentry-solidstart-source-maps',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const sourceMapsPreviouslyNotEnabled = !config.build?.sourcemap;\n if (debug && sourceMapsPreviouslyNotEnabled) {\n // eslint-disable-next-line no-console\n console.log('[Sentry SolidStart Plugin] Enabling source map generation');\n if (!sourceMapsUploadOptions?.filesToDeleteAfterUpload) {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart PLugin] We recommend setting the \\`sourceMapsUploadOptions.filesToDeleteAfterUpload\\` option to clean up source maps after uploading.\n[Sentry SolidStart Plugin] Otherwise, source maps might be deployed to production, depending on your configuration`,\n );\n }\n }\n return {\n ...config,\n build: {\n ...config.build,\n sourcemap: true,\n },\n };\n },\n },\n ...sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations: options.bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n sourcemaps: {\n filesToDeleteAfterUpload: sourceMapsUploadOptions?.filesToDeleteAfterUpload ?? undefined,\n ...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps,\n },\n telemetry: sourceMapsUploadOptions?.telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n ...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions,\n }),\n ];\n}\n"],"names":[],"mappings":";;;AAIA,CAAA,CAAA;CACA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAA,CAAA;IAClE,CAAK,CAAC;EACN,CAAG;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/client/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/client/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAMpD,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAKzD;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAShE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":"AAGA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CAAC,OAAO,GAAG,OAAO,SAAS,CAAC,OAAO,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extractRequestData, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, setUser, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration, } from '@sentry/node';
|
|
1
|
+
export { addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extractRequestData, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, setUser, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration, } from '@sentry/node';
|
|
2
2
|
export * from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './sdk';
|
|
5
5
|
export * from './withServerActionInstrumentation';
|
|
6
|
+
export * from './middleware';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,+BAA+B,EAC/B,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,IAAI,EACJ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,aAAa,EACb,8BAA8B,EAC9B,SAAS,EAET,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,UAAU,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,EACL,WAAW,EACX,4BAA4B,EAC5B,gCAAgC,EAChC,qCAAqC,EACrC,gCAAgC,EAChC,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,MAAM,EACN,OAAO,EACP,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,EACP,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,+BAA+B,EAC/B,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,IAAI,EACJ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB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,EAAE,MAAM,OAAO,CAAC;AAE7B,cAAc,mCAAmC,CAAC;AAClD,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/server/middleware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG;IAC3E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAaF;;;GAGG;AACH,wBAAgB,8BAA8B,YACE,UAAU,YAAY,0BAA0B,mBA6B/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
import type { SentrySolidStartPluginOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Various Sentry vite plugins to be used for SolidStart.
|
|
5
|
+
*/
|
|
6
|
+
export declare const sentrySolidStartVite: (options?: SentrySolidStartPluginOptions) => Plugin[];
|
|
7
|
+
//# sourceMappingURL=sentrySolidStartVite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,aAAa,6BAA6B,KAAQ,MAAM,EAUxF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
import type { SentrySolidStartPluginOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A Sentry plugin for SolidStart to enable source maps and use
|
|
5
|
+
* @sentry/vite-plugin to automatically upload source maps to Sentry.
|
|
6
|
+
* @param {SourceMapsOptions} options
|
|
7
|
+
*/
|
|
8
|
+
export declare function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[];
|
|
9
|
+
//# sourceMappingURL=sourceMaps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../../src/vite/sourceMaps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,6BAA6B,GAAG,MAAM,EAAE,CAgDzF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
|
|
2
|
+
type SourceMapsOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* If this flag is `true`, and an auth token is detected, the Sentry SDK will
|
|
5
|
+
* automatically generate and upload source maps to Sentry during a production build.
|
|
6
|
+
*
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
|
|
12
|
+
* It will not collect any sensitive or user-specific data.
|
|
13
|
+
*
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
telemetry?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact
|
|
19
|
+
* upload to Sentry has been completed.
|
|
20
|
+
*
|
|
21
|
+
* @default [] - By default no files are deleted.
|
|
22
|
+
*
|
|
23
|
+
* The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
|
|
24
|
+
*/
|
|
25
|
+
filesToDeleteAfterUpload?: string | Array<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Options to further customize the Sentry Vite Plugin (@sentry/vite-plugin) behavior directly.
|
|
28
|
+
* Options specified in this object take precedence over the options specified in
|
|
29
|
+
* the `sourcemaps` and `release` objects.
|
|
30
|
+
*
|
|
31
|
+
* @see https://www.npmjs.com/package/@sentry/vite-plugin/v/2.22.2#options which lists all available options.
|
|
32
|
+
*
|
|
33
|
+
* Warning: Options within this object are subject to change at any time.
|
|
34
|
+
* We DO NOT guarantee semantic versioning for these options, meaning breaking
|
|
35
|
+
* changes can occur at any time within a major SDK version.
|
|
36
|
+
*
|
|
37
|
+
* Furthermore, some options are untested with SvelteKit specifically. Use with caution.
|
|
38
|
+
*/
|
|
39
|
+
unstable_sentryVitePluginOptions?: Partial<SentryVitePluginOptions>;
|
|
40
|
+
};
|
|
41
|
+
type BundleSizeOptimizationOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK.
|
|
44
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
45
|
+
*
|
|
46
|
+
* Setting this option to `true` will disable features like the SDK's `debug` option.
|
|
47
|
+
*/
|
|
48
|
+
excludeDebugStatements?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* If set to true, the plugin will try to tree-shake tracing statements out.
|
|
51
|
+
* Note that the success of this depends on tree shaking generally being enabled in your build.
|
|
52
|
+
* Attention: DO NOT enable this when you're using any performance monitoring-related SDK features (e.g. Sentry.startSpan()).
|
|
53
|
+
*/
|
|
54
|
+
excludeTracing?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality.
|
|
57
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
58
|
+
*
|
|
59
|
+
* This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
|
|
60
|
+
*/
|
|
61
|
+
excludeReplayShadowDom?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
|
|
64
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
65
|
+
*
|
|
66
|
+
* You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
|
|
67
|
+
*/
|
|
68
|
+
excludeReplayIframe?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
|
|
71
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
72
|
+
*
|
|
73
|
+
* **Notice:** You should only do use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
|
|
74
|
+
*/
|
|
75
|
+
excludeReplayWorker?: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
|
|
79
|
+
*/
|
|
80
|
+
export type SentrySolidStartPluginOptions = {
|
|
81
|
+
/**
|
|
82
|
+
* The auth token to use when uploading source maps to Sentry.
|
|
83
|
+
*
|
|
84
|
+
* Instead of specifying this option, you can also set the `SENTRY_AUTH_TOKEN` environment variable.
|
|
85
|
+
*
|
|
86
|
+
* To create an auth token, follow this guide:
|
|
87
|
+
* @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
|
|
88
|
+
*/
|
|
89
|
+
authToken?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The organization slug of your Sentry organization.
|
|
92
|
+
* Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
|
|
93
|
+
*/
|
|
94
|
+
org?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The project slug of your Sentry project.
|
|
97
|
+
* Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
|
|
98
|
+
*/
|
|
99
|
+
project?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Options for the Sentry Vite plugin to customize the source maps upload process.
|
|
102
|
+
*/
|
|
103
|
+
sourceMapsUploadOptions?: SourceMapsOptions;
|
|
104
|
+
/**
|
|
105
|
+
* Options for the Sentry Vite plugin to customize bundle size optimizations.
|
|
106
|
+
*/
|
|
107
|
+
bundleSizeOptimizations?: BundleSizeOptimizationOptions;
|
|
108
|
+
/**
|
|
109
|
+
* Enable debug functionality of the SDK during build-time.
|
|
110
|
+
* Enabling this will give you, for example logs about source maps.
|
|
111
|
+
*/
|
|
112
|
+
debug?: boolean;
|
|
113
|
+
};
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,KAAK,iBAAiB,GAAG;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElD;;;;;;;;;;;;OAYG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrE,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,uBAAuB,CAAC,EAAE,iBAAiB,CAAC;IAE5C;;OAEG;IACH,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IAExD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/solidstart",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.29.0",
|
|
4
4
|
"description": "Official Sentry SDK for Solid Start",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
|
|
@@ -39,17 +39,6 @@
|
|
|
39
39
|
"require": "./build/cjs/index.server.js"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"./middleware": {
|
|
43
|
-
"types": "./middleware.d.ts",
|
|
44
|
-
"import": {
|
|
45
|
-
"types": "./middleware.d.ts",
|
|
46
|
-
"default": "./build/esm/middleware.js"
|
|
47
|
-
},
|
|
48
|
-
"require": {
|
|
49
|
-
"types": "./middleware.d.ts",
|
|
50
|
-
"default": "./build/cjs/middleware.js"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
42
|
"./solidrouter": {
|
|
54
43
|
"types": "./solidrouter.d.ts",
|
|
55
44
|
"browser": {
|
|
@@ -78,13 +67,13 @@
|
|
|
78
67
|
},
|
|
79
68
|
"dependencies": {
|
|
80
69
|
"@opentelemetry/instrumentation": "^0.52.1",
|
|
81
|
-
"@sentry/core": "8.
|
|
82
|
-
"@sentry/node": "8.
|
|
83
|
-
"@sentry/opentelemetry": "8.
|
|
84
|
-
"@sentry/solid": "8.
|
|
85
|
-
"@sentry/types": "8.
|
|
86
|
-
"@sentry/utils": "8.
|
|
87
|
-
"@sentry/vite-plugin": "2.
|
|
70
|
+
"@sentry/core": "8.29.0",
|
|
71
|
+
"@sentry/node": "8.29.0",
|
|
72
|
+
"@sentry/opentelemetry": "8.29.0",
|
|
73
|
+
"@sentry/solid": "8.29.0",
|
|
74
|
+
"@sentry/types": "8.29.0",
|
|
75
|
+
"@sentry/utils": "8.29.0",
|
|
76
|
+
"@sentry/vite-plugin": "2.22.3"
|
|
88
77
|
},
|
|
89
78
|
"devDependencies": {
|
|
90
79
|
"@solidjs/router": "^0.13.4",
|
|
@@ -106,7 +95,7 @@
|
|
|
106
95
|
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
|
|
107
96
|
"build:types:watch": "tsc -p tsconfig.types.json --watch",
|
|
108
97
|
"build:tarball": "npm pack",
|
|
109
|
-
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.ts
|
|
98
|
+
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.ts",
|
|
110
99
|
"clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
|
|
111
100
|
"fix": "eslint . --format stylish --fix",
|
|
112
101
|
"lint": "eslint . --format stylish",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../src/middleware.ts"],"sourcesContent":["import { getTraceMetaTags } from '@sentry/core';\nimport { addNonEnumerableProperty } from '@sentry/utils';\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 && 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"],"names":["getTraceMetaTags","addNonEnumerableProperty"],"mappings":";;;;;AASA,SAAS,gBAAgB,CAAC,IAAI,EAAkB;AAChD,EAAE,MAAM,QAAA,GAAWA,qBAAgB,EAAE,CAAA;AACrC;AACA,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAI,OAAO,IAAI,CAAA;AACf,GAAE;AACF;AACA,EAAE,MAAM,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;AACzC,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,UAAU,CAAC,KAAK,EAAE,CAAA;AAC1B,OAAO;AACP,KAAK,CAAC,CAAA;AACN,GAAG,CAAA;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../src/middleware.ts"],"sourcesContent":["import { getTraceMetaTags } from '@sentry/core';\nimport { addNonEnumerableProperty } from '@sentry/utils';\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 && 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"],"names":[],"mappings":";;;AASA,SAAS,gBAAgB,CAAC,IAAI,EAAkB;AAChD,EAAE,MAAM,QAAA,GAAW,gBAAgB,EAAE,CAAA;AACrC;AACA,EAAE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AAgB,CAAC,IAAI,CAAC,CAAA;AACrD,UAAU,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;AACpE,SAAQ;AACR,QAAQ,UAAU,CAAC,KAAK,EAAE,CAAA;AAC1B,OAAO;AACP,KAAK,CAAC,CAAA;AACN,GAAG,CAAA;AACH;;;;"}
|
package/middleware.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["src/middleware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG;IAC3E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAaF;;;GAGG;AACH,wBAAgB,8BAA8B,YACE,UAAU,YAAY,0BAA0B,mBA6B/F"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|