@sentry/solidstart 11.0.0-alpha.0 → 11.0.0-alpha.2
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/index.server.js +2 -1
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/server/index.js +2 -1
- package/build/cjs/server/index.js.map +1 -1
- package/build/cjs/server/withServerActionInstrumentation.js +3 -3
- package/build/cjs/server/withServerActionInstrumentation.js.map +1 -1
- package/build/cjs/vite/sentrySolidStart.js +2 -0
- package/build/cjs/vite/sentrySolidStart.js.map +1 -1
- package/build/cjs/vite/sentrySolidStartVite.js +3 -1
- package/build/cjs/vite/sentrySolidStartVite.js.map +1 -1
- package/build/cjs/vite/sourceMaps.js +31 -17
- package/build/cjs/vite/sourceMaps.js.map +1 -1
- package/build/esm/index.server.js +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/index.js +1 -1
- package/build/esm/server/withServerActionInstrumentation.js +6 -6
- package/build/esm/server/withServerActionInstrumentation.js.map +1 -1
- package/build/esm/vite/sentrySolidStart.js +2 -0
- package/build/esm/vite/sentrySolidStart.js.map +1 -1
- package/build/esm/vite/sentrySolidStartVite.js +3 -1
- package/build/esm/vite/sentrySolidStartVite.js.map +1 -1
- package/build/esm/vite/sourceMaps.js +31 -17
- package/build/esm/vite/sourceMaps.js.map +1 -1
- package/build/types/index.types.d.ts +3 -0
- package/build/types/index.types.d.ts.map +1 -1
- package/build/types/server/index.d.ts +1 -1
- package/build/types/server/index.d.ts.map +1 -1
- package/build/types/server/withServerActionInstrumentation.d.ts.map +1 -1
- package/build/types/vite/sentrySolidStart.d.ts +2 -3
- package/build/types/vite/sentrySolidStart.d.ts.map +1 -1
- package/build/types/vite/sentrySolidStartVite.d.ts.map +1 -1
- package/build/types/vite/sourceMaps.d.ts.map +1 -1
- package/build/types/vite/types.d.ts +2 -118
- package/build/types/vite/types.d.ts.map +1 -1
- package/package.json +13 -12
|
@@ -14,7 +14,7 @@ exports.SDK_VERSION = node.SDK_VERSION;
|
|
|
14
14
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = node.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
15
15
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = node.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
16
16
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = node.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
17
|
-
exports.
|
|
17
|
+
exports.SENTRY_SEGMENT_NAME_SOURCE = node.SENTRY_SEGMENT_NAME_SOURCE;
|
|
18
18
|
exports.Scope = node.Scope;
|
|
19
19
|
exports.addBreadcrumb = node.addBreadcrumb;
|
|
20
20
|
exports.addEventProcessor = node.addEventProcessor;
|
|
@@ -112,6 +112,7 @@ exports.setupKoaErrorHandler = node.setupKoaErrorHandler;
|
|
|
112
112
|
exports.spanStreamingIntegration = node.spanStreamingIntegration;
|
|
113
113
|
exports.spanToBaggageHeader = node.spanToBaggageHeader;
|
|
114
114
|
exports.spanToJSON = node.spanToJSON;
|
|
115
|
+
exports.spanToStaticSpanJSON = node.spanToStaticSpanJSON;
|
|
115
116
|
exports.spanToTraceHeader = node.spanToTraceHeader;
|
|
116
117
|
exports.spotlightIntegration = node.spotlightIntegration;
|
|
117
118
|
exports.startInactiveSpan = node.startInactiveSpan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -13,7 +13,7 @@ exports.SDK_VERSION = node.SDK_VERSION;
|
|
|
13
13
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = node.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
14
14
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = node.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
15
15
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = node.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
16
|
-
exports.
|
|
16
|
+
exports.SENTRY_SEGMENT_NAME_SOURCE = node.SENTRY_SEGMENT_NAME_SOURCE;
|
|
17
17
|
exports.Scope = node.Scope;
|
|
18
18
|
exports.addBreadcrumb = node.addBreadcrumb;
|
|
19
19
|
exports.addEventProcessor = node.addEventProcessor;
|
|
@@ -111,6 +111,7 @@ exports.setupKoaErrorHandler = node.setupKoaErrorHandler;
|
|
|
111
111
|
exports.spanStreamingIntegration = node.spanStreamingIntegration;
|
|
112
112
|
exports.spanToBaggageHeader = node.spanToBaggageHeader;
|
|
113
113
|
exports.spanToJSON = node.spanToJSON;
|
|
114
|
+
exports.spanToStaticSpanJSON = node.spanToStaticSpanJSON;
|
|
114
115
|
exports.spanToTraceHeader = node.spanToTraceHeader;
|
|
115
116
|
exports.spotlightIntegration = node.spotlightIntegration;
|
|
116
117
|
exports.startInactiveSpan = node.startInactiveSpan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ const serverUtils = require('@sentry/server-utils');
|
|
|
10
10
|
async function withServerActionInstrumentation(serverActionName, callback) {
|
|
11
11
|
const activeSpan = node.getActiveSpan();
|
|
12
12
|
if (activeSpan) {
|
|
13
|
-
const spanData = node.spanToJSON(activeSpan).
|
|
13
|
+
const spanData = node.spanToJSON(activeSpan).attributes;
|
|
14
14
|
const requestPath = spanData?.[attributes.URL_PATH] ?? spanData?.[attributes.HTTP_TARGET];
|
|
15
15
|
if (spanData && !spanData[attributes.HTTP_ROUTE] && requestPath === "/_server") {
|
|
16
16
|
serverUtils.setHttpServerSpanRouteAttribute(serverActionName);
|
|
@@ -21,9 +21,9 @@ async function withServerActionInstrumentation(serverActionName, callback) {
|
|
|
21
21
|
{
|
|
22
22
|
name: serverActionName,
|
|
23
23
|
attributes: {
|
|
24
|
-
[attributes.SENTRY_OP]: op.
|
|
24
|
+
[attributes.SENTRY_OP]: op.FUNCTION,
|
|
25
25
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.function.solidstart",
|
|
26
|
-
[
|
|
26
|
+
[attributes.SENTRY_SEGMENT_NAME_SOURCE]: "component"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
async (span) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withServerActionInstrumentation.js","sources":["../../../src/server/withServerActionInstrumentation.ts"],"sourcesContent":["import {\n flushIfServerless,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n} from '@sentry/core';\nimport { captureException, getActiveSpan,
|
|
1
|
+
{"version":3,"file":"withServerActionInstrumentation.js","sources":["../../../src/server/withServerActionInstrumentation.ts"],"sourcesContent":["import {\n flushIfServerless,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n} from '@sentry/core';\nimport { captureException, getActiveSpan, spanToJSON, startSpan } from '@sentry/node';\nimport { isRedirect } from './utils';\nimport {\n SENTRY_SEGMENT_NAME_SOURCE,\n HTTP_ROUTE,\n HTTP_TARGET,\n SENTRY_OP,\n URL_PATH,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION } from '@sentry/conventions/op';\nimport { setHttpServerSpanRouteAttribute } from '@sentry/server-utils';\n\n/**\n * Wraps a server action (functions that use the 'use server' directive)\n * function body with Sentry Error and Performance instrumentation.\n */\nexport async function withServerActionInstrumentation<A extends (...args: unknown[]) => unknown>(\n serverActionName: string,\n callback: A,\n): Promise<ReturnType<A>> {\n const activeSpan = getActiveSpan();\n\n if (activeSpan) {\n const spanData = spanToJSON(activeSpan).attributes;\n\n // In solid start, server function calls are made to `/_server` which doesn't tell us\n // a lot. We rewrite the span's route to be that of the sever action name but only\n // if the target is `/_server`, otherwise we'd overwrite pageloads on routes that use\n // server actions (which are more meaningful, e.g. a request to `GET /users/5` is more\n // meaningful than overwriting it with `GET doSomeFunctionCall`).\n // `@sentry/node` HTTP spans only carry `url.path`; the deprecated `http.target` is kept as a\n // fallback for instrumentation that still sets only that.\n // oxlint-disable-next-line typescript/no-deprecated\n const requestPath = spanData?.[URL_PATH] ?? spanData?.[HTTP_TARGET];\n\n if (spanData && !spanData[HTTP_ROUTE] && requestPath === '/_server') {\n setHttpServerSpanRouteAttribute(serverActionName);\n }\n }\n\n try {\n return await startSpan(\n {\n name: serverActionName,\n attributes: {\n [SENTRY_OP]: FUNCTION,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n },\n },\n async span => {\n // oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime\n const result = await handleCallbackErrors(callback, error => {\n if (!isRedirect(error)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.function.solidstart',\n },\n });\n }\n });\n\n return result;\n },\n );\n } finally {\n await flushIfServerless();\n }\n}\n"],"names":["getActiveSpan","spanToJSON","URL_PATH","HTTP_TARGET","HTTP_ROUTE","setHttpServerSpanRouteAttribute","startSpan","SENTRY_OP","FUNCTION","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SENTRY_SEGMENT_NAME_SOURCE","handleCallbackErrors","isRedirect","SPAN_STATUS_ERROR","captureException","flushIfServerless"],"mappings":";;;;;;;;;AAsBA,eAAsB,+BAAA,CACpB,kBACA,QAAA,EACwB;AACxB,EAAA,MAAM,aAAaA,kBAAA,EAAc;AAEjC,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,MAAM,QAAA,GAAWC,eAAA,CAAW,UAAU,CAAA,CAAE,UAAA;AAUxC,IAAA,MAAM,WAAA,GAAc,QAAA,GAAWC,mBAAQ,CAAA,IAAK,WAAWC,sBAAW,CAAA;AAElE,IAAA,IAAI,YAAY,CAAC,QAAA,CAASC,qBAAU,CAAA,IAAK,gBAAgB,UAAA,EAAY;AACnE,MAAAC,2CAAA,CAAgC,gBAAgB,CAAA;AAAA,IAClD;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,OAAO,MAAMC,cAAA;AAAA,MACX;AAAA,QACE,IAAA,EAAM,gBAAA;AAAA,QACN,UAAA,EAAY;AAAA,UACV,CAACC,oBAAS,GAAGC,WAAA;AAAA,UACb,CAACC,qCAAgC,GAAG,0BAAA;AAAA,UACpC,CAACC,qCAA0B,GAAG;AAAA;AAChC,OACF;AAAA,MACA,OAAM,IAAA,KAAQ;AAEZ,QAAA,MAAM,MAAA,GAAS,MAAMC,yBAAA,CAAqB,QAAA,EAAU,CAAA,KAAA,KAAS;AAC3D,UAAA,IAAI,CAACC,gBAAA,CAAW,KAAK,CAAA,EAAG;AACtB,YAAA,IAAA,CAAK,UAAU,EAAE,IAAA,EAAMC,sBAAA,EAAmB,OAAA,EAAS,kBAAkB,CAAA;AACrE,YAAAC,qBAAA,CAAiB,KAAA,EAAO;AAAA,cACtB,SAAA,EAAW;AAAA,gBACT,OAAA,EAAS,KAAA;AAAA,gBACT,IAAA,EAAM;AAAA;AACR,aACD,CAAA;AAAA,UACH;AAAA,QACF,CAAC,CAAA;AAED,QAAA,OAAO,MAAA;AAAA,MACT;AAAA,KACF;AAAA,EACF,CAAA,SAAE;AACA,IAAA,MAAMC,sBAAA,EAAkB;AAAA,EAC1B;AACF;;;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
+
const core = require('@sentry/core');
|
|
3
4
|
const nitro = require('@sentry/nitro');
|
|
4
5
|
const vite = require('@sentry/server-utils/orchestrion/vite');
|
|
5
6
|
const sourceMaps = require('./sourceMaps.js');
|
|
6
7
|
|
|
7
8
|
function sentrySolidStart(options = {}) {
|
|
9
|
+
core.warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
8
10
|
const plugins = [makeSentryNitroPlugin(options)];
|
|
9
11
|
if (process.env.NODE_ENV === "development") {
|
|
10
12
|
return plugins;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import { type BuildTimeOptionsBase, warnOnRemovedBuildOptions } from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & { nitro?: Record<string, unknown> };\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n\n return {\n nitro: setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>,\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":["warnOnRemovedBuildOptions","sentryOrchestrionPlugin","makeAddSentryVitePluginSolidStart2","makeEnableSourceMapsVitePlugin","setupSentryNitroModule"],"mappings":";;;;;;;AAuCO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAAC,EAAa;AAChF,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,OAAA,GAAoB,CAAC,qBAAA,CAAsB,OAAO,CAAC,CAAA;AAGzD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,OAAO,OAAA;AAAA,EACT;AAIA,EAAA,OAAA,CAAQ,KAAKC,4BAAA,CAAwB,EAAE,0BAA0B,OAAA,CAAQ,wBAAA,EAA0B,CAAC,CAAA;AAEpG,EAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,IAAA,OAAA,CAAQ,IAAA,CAAK,GAAGC,6CAAA,CAAmC,OAAO,GAAG,GAAGC,yCAAA,CAA+B,OAAO,CAAC,CAAA;AAAA,EACzG;AAEA,EAAA,OAAO,OAAA;AACT;AAiBA,SAAS,sBAAsB,OAAA,EAA0C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,yBAAA;AAAA,IACN,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,UAAA,EAAiC;AACtC,MAAA,MAAM,YAAY,UAAA,CAAW,KAAA;AAE7B,MAAA,OAAO;AAAA,QACL,KAAA,EAAOC,4BAAA;AAAA;AAAA,UAEL,EAAE,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,cAAA,EAAgB,WAAW,cAAA,EAAe;AAAA,UAG7E;AAAA;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
+
const core = require('@sentry/core');
|
|
3
4
|
const buildInstrumentationFile = require('./buildInstrumentationFile.js');
|
|
4
5
|
const sourceMaps = require('./sourceMaps.js');
|
|
5
6
|
|
|
6
7
|
const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
8
|
+
core.warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
7
9
|
const sentryPlugins = [];
|
|
8
10
|
if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
|
|
9
11
|
sentryPlugins.push(buildInstrumentationFile.makeBuildInstrumentationFilePlugin(options));
|
|
10
12
|
}
|
|
11
13
|
if (process.env.NODE_ENV !== "development") {
|
|
12
|
-
if (options.
|
|
14
|
+
if (options.sourcemaps?.disable !== true) {
|
|
13
15
|
const sourceMapsPlugin = sourceMaps.makeAddSentryVitePlugin(options, viteConfig);
|
|
14
16
|
const enableSourceMapsPlugin = sourceMaps.makeEnableSourceMapsVitePlugin(options);
|
|
15
17
|
sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } 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 = {}, viteConfig: UserConfig): Plugin[] => {\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } 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 = {}, viteConfig: UserConfig): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (config: UserConfig = {}, options: SentrySolidStartPluginOptions): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":["warnOnRemovedBuildOptions","makeBuildInstrumentationFilePlugin","makeAddSentryVitePlugin","makeEnableSourceMapsVitePlugin"],"mappings":";;;;;;AASO,MAAM,oBAAA,GAAuB,CAAC,OAAA,GAAyC,IAAI,UAAA,KAAqC;AACrH,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,gBAA0B,EAAC;AAEjC,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAKC,2DAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmBC,kCAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyBC,0CAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,qBAAA,GAAwB,CAAC,MAAA,GAAqB,IAAI,OAAA,KAAuD;AACpH,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAM,CAAC,CAAA;AAErD,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;;"}
|
|
@@ -3,36 +3,57 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const vite = require('@sentry/bundler-plugins/vite');
|
|
4
4
|
|
|
5
5
|
function makeAddSentryVitePlugin(options, viteConfig) {
|
|
6
|
-
const {
|
|
6
|
+
const {
|
|
7
|
+
applicationKey,
|
|
8
|
+
authToken,
|
|
9
|
+
bundleSizeOptimizations,
|
|
10
|
+
debug,
|
|
11
|
+
errorHandler,
|
|
12
|
+
headers,
|
|
13
|
+
moduleMetadata,
|
|
14
|
+
org,
|
|
15
|
+
project,
|
|
16
|
+
release,
|
|
17
|
+
sentryUrl,
|
|
18
|
+
silent,
|
|
19
|
+
sourcemaps,
|
|
20
|
+
telemetry
|
|
21
|
+
} = options;
|
|
7
22
|
let updatedFilesToDeleteAfterUpload = void 0;
|
|
8
|
-
if (typeof
|
|
23
|
+
if (typeof sourcemaps?.filesToDeleteAfterUpload === "undefined" && // Only if source maps were previously not set, we update the "filesToDeleteAfterUpload" (as we override the setting with "hidden")
|
|
9
24
|
typeof viteConfig.build?.sourcemap === "undefined") {
|
|
10
25
|
updatedFilesToDeleteAfterUpload = [".*/**/*.map"];
|
|
11
26
|
debug && // eslint-disable-next-line no-console
|
|
12
27
|
console.log(
|
|
13
|
-
`[Sentry] Automatically setting \`
|
|
28
|
+
`[Sentry] Automatically setting \`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(
|
|
14
29
|
updatedFilesToDeleteAfterUpload
|
|
15
30
|
)}\` to delete generated source maps after they were uploaded to Sentry.`
|
|
16
31
|
);
|
|
17
32
|
}
|
|
18
33
|
return [
|
|
19
34
|
...vite.sentryVitePlugin({
|
|
35
|
+
applicationKey,
|
|
20
36
|
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
21
|
-
bundleSizeOptimizations
|
|
37
|
+
bundleSizeOptimizations,
|
|
22
38
|
debug: debug ?? false,
|
|
39
|
+
errorHandler,
|
|
40
|
+
headers,
|
|
41
|
+
moduleMetadata,
|
|
23
42
|
org: org ?? process.env.SENTRY_ORG,
|
|
24
43
|
project: project ?? process.env.SENTRY_PROJECT,
|
|
44
|
+
release,
|
|
45
|
+
silent,
|
|
46
|
+
telemetry: telemetry ?? true,
|
|
47
|
+
url: sentryUrl,
|
|
25
48
|
sourcemaps: {
|
|
26
|
-
|
|
27
|
-
|
|
49
|
+
...sourcemaps,
|
|
50
|
+
filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload
|
|
28
51
|
},
|
|
29
|
-
telemetry: sourceMapsUploadOptions?.telemetry ?? true,
|
|
30
52
|
_metaOptions: {
|
|
31
53
|
telemetry: {
|
|
32
54
|
metaFramework: "solidstart"
|
|
33
55
|
}
|
|
34
|
-
}
|
|
35
|
-
...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions
|
|
56
|
+
}
|
|
36
57
|
})
|
|
37
58
|
];
|
|
38
59
|
}
|
|
@@ -46,7 +67,6 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
46
67
|
sentryUrl,
|
|
47
68
|
sourcemaps,
|
|
48
69
|
telemetry,
|
|
49
|
-
unstable_sentryVitePluginOptions,
|
|
50
70
|
...passthroughOptions
|
|
51
71
|
} = options;
|
|
52
72
|
let resolveFilesToDeleteAfterUpload;
|
|
@@ -58,7 +78,7 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
58
78
|
apply: "build",
|
|
59
79
|
enforce: "post",
|
|
60
80
|
config(config) {
|
|
61
|
-
const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload
|
|
81
|
+
const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;
|
|
62
82
|
if (typeof userFilesToDelete === "undefined" && typeof config.build?.sourcemap === "undefined") {
|
|
63
83
|
if (debug) {
|
|
64
84
|
console.log(
|
|
@@ -79,18 +99,12 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
79
99
|
project: project ?? process.env.SENTRY_PROJECT,
|
|
80
100
|
telemetry: telemetry ?? true,
|
|
81
101
|
url: sentryUrl,
|
|
82
|
-
// Spread here so it overrides the plain options above, but not the objects merged below —
|
|
83
|
-
// spreading replaces whole keys rather than deep-merging.
|
|
84
|
-
...unstable_sentryVitePluginOptions,
|
|
85
102
|
sourcemaps: {
|
|
86
103
|
...sourcemaps,
|
|
87
|
-
...unstable_sentryVitePluginOptions?.sourcemaps,
|
|
88
104
|
filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise
|
|
89
105
|
},
|
|
90
106
|
_metaOptions: {
|
|
91
|
-
...unstable_sentryVitePluginOptions?._metaOptions,
|
|
92
107
|
telemetry: {
|
|
93
|
-
...unstable_sentryVitePluginOptions?._metaOptions?.telemetry,
|
|
94
108
|
metaFramework: "solidstart"
|
|
95
109
|
}
|
|
96
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const { authToken, debug, org, project, sourceMapsUploadOptions } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourceMapsUploadOptions?.filesToDeleteAfterUpload === 'undefined' &&\n typeof sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload ===\n 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourceMapsUploadOptions.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\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:\n (sourceMapsUploadOptions?.filesToDeleteAfterUpload ||\n sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload) ??\n updatedFilesToDeleteAfterUpload,\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\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n unstable_sentryVitePluginOptions,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config. `PromiseLike` because the unstable spelling\n // may itself be a promise.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n // The promise always wins over the passed-in value, so the unstable spelling has to be read\n // here too or it is silently replaced by the default below.\n const userFilesToDelete =\n sourcemaps?.filesToDeleteAfterUpload ?? unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n // Spread here so it overrides the plain options above, but not the objects merged below —\n // spreading replaces whole keys rather than deep-merging.\n ...unstable_sentryVitePluginOptions,\n sourcemaps: {\n ...sourcemaps,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n ...unstable_sentryVitePluginOptions?._metaOptions,\n telemetry: {\n ...unstable_sentryVitePluginOptions?._metaOptions?.telemetry,\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }\n\n return updatedSourceMapSetting;\n}\n"],"names":["sentryVitePlugin"],"mappings":";;;;AAaO,SAAS,uBAAA,CAAwB,SAAwC,UAAA,EAAkC;AAChH,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAA,EAAK,OAAA,EAAS,yBAAwB,GAAI,OAAA;AAEpE,EAAA,IAAI,+BAAA,GAAwD,MAAA;AAE5D,EAAA,IACE,OAAO,yBAAyB,wBAAA,KAA6B,WAAA,IAC7D,OAAO,uBAAA,EAAyB,gCAAA,EAAkC,YAAY,wBAAA,KAC5E,WAAA;AAAA,EAEF,OAAO,UAAA,CAAW,KAAA,EAAO,SAAA,KAAc,WAAA,EACvC;AAEA,IAAA,+BAAA,GAAkC,CAAC,aAAa,CAAA;AAEhD,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,sFAAsF,IAAA,CAAK,SAAA;AAAA,QACzF;AAAA,OACD,CAAA,sEAAA;AAAA,KACH;AAAA,EACJ;AAEA,EAAA,OAAO;AAAA,IACL,GAAGA,qBAAA,CAAiB;AAAA,MAClB,SAAA,EAAW,SAAA,IAAa,OAAA,CAAQ,GAAA,CAAI,iBAAA;AAAA,MACpC,yBAAyB,OAAA,CAAQ,uBAAA;AAAA,MACjC,OAAO,KAAA,IAAS,KAAA;AAAA,MAChB,GAAA,EAAK,GAAA,IAAO,OAAA,CAAQ,GAAA,CAAI,UAAA;AAAA,MACxB,OAAA,EAAS,OA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AA;AAC5D,SACF;AAAA,MACF;AAAA;AACF,GACF;AACF;AAiBO,SAAS,2BAAA,CACd,YACA,mBAAA,EAC+B;AAC/B,EAAA,MAAM,aAAA,GAAgB,YAAY,KAAA,EAAO,SAAA;AACzC,EAAA,IAAI,uBAAA,GAA0B,aAAA;AAE9B,EAAA,MAAM,UAAA,GAAa,sBAAA;AACnB,EAAA,MAAM,QAAQ,mBAAA,EAAqB,KAAA;AAEnC,EAAA,IAAI,kBAAkB,KAAA,EAAO;AAC3B,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,IAAI,KAAA,EAAO;AAGT,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN,CAAA,yFAAA,EAA4F,UAAU,CAAA,2QAAA,EAA8Q,UAAU,CAAA,wCAAA;AAAA,OAChY;AAAA,IACF,CAAA,MAAO;AAEL,MAAA,OAAA,CAAQ,KAAK,8EAA8E,CAAA;AAAA,IAC7F;AAAA,EACF,CAAA,MAAA,IAAW,iBAAiB,CAAC,QAAA,EAAU,UAAU,IAAI,CAAA,CAAE,QAAA,CAAS,aAAa,CAAA,EAAG;AAC9E,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,CAAA,yBAAA,EAA4B,UAAU,CAAA,eAAA,EAAkB,aAAA,CAAc,UAAU,CAAA,4GAAA;AAAA,KAClF;AAAA,EACJ,CAAA,MAAO;AACL,IAAA,uBAAA,GAA0B,QAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,sEAAsE,UAAU,CAAA,kFAAA;AAAA,KAClF;AAAA,EACJ;AAEA,EAAA,OAAO,uBAAA;AACT;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const {\n applicationKey,\n authToken,\n bundleSizeOptimizations,\n debug,\n errorHandler,\n headers,\n moduleMetadata,\n org,\n project,\n release,\n sentryUrl,\n silent,\n sourcemaps,\n telemetry,\n } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\n ...sentryVitePlugin({\n applicationKey,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n errorHandler,\n headers,\n moduleMetadata,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n release,\n silent,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n }),\n ];\n}\n\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }\n\n return updatedSourceMapSetting;\n}\n"],"names":["sentryVitePlugin"],"mappings":";;;;AAaO,SAAS,uBAAA,CAAwB,SAAwC,UAAA,EAAkC;AAChH,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,SAAA;AAAA,IACA,uBAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,cAAA;AAAA,IACA,GAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,IAAI,+BAAA,GAAwD,MAAA;AAE5D,EAAA,IACE,OAAO,YAAY,wBAAA,KAA6B,WAAA;AAAA,EAEhD,OAAO,UAAA,CAAW,KAAA,EAAO,SAAA,KAAc,WAAA,EACvC;AAEA,IAAA,+BAAA,GAAkC,CAAC,aAAa,CAAA;AAEhD,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,yEAAyE,IAAA,CAAK,SAAA;AAAA,QAC5E;AAAA,OACD,CAAA,sEAAA;AAAA,K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EMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
|
|
2
|
+
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SENTRY_SEGMENT_NAME_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, 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';
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"11.0.0-alpha.
|
|
1
|
+
{"type":"module","version":"11.0.0-alpha.2"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
-
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
|
|
2
|
+
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SENTRY_SEGMENT_NAME_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, 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';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, handleCallbackErrors, SPAN_STATUS_ERROR, flushIfServerless } from '@sentry/core';
|
|
2
|
-
import { getActiveSpan, spanToJSON, startSpan,
|
|
2
|
+
import { getActiveSpan, spanToJSON, startSpan, captureException } from '@sentry/node';
|
|
3
3
|
import { isRedirect } from './utils.js';
|
|
4
|
-
import { URL_PATH, HTTP_TARGET, HTTP_ROUTE, SENTRY_OP } from '@sentry/conventions/attributes';
|
|
5
|
-
import {
|
|
4
|
+
import { URL_PATH, HTTP_TARGET, HTTP_ROUTE, SENTRY_SEGMENT_NAME_SOURCE, SENTRY_OP } from '@sentry/conventions/attributes';
|
|
5
|
+
import { FUNCTION } from '@sentry/conventions/op';
|
|
6
6
|
import { setHttpServerSpanRouteAttribute } from '@sentry/server-utils';
|
|
7
7
|
|
|
8
8
|
async function withServerActionInstrumentation(serverActionName, callback) {
|
|
9
9
|
const activeSpan = getActiveSpan();
|
|
10
10
|
if (activeSpan) {
|
|
11
|
-
const spanData = spanToJSON(activeSpan).
|
|
11
|
+
const spanData = spanToJSON(activeSpan).attributes;
|
|
12
12
|
const requestPath = spanData?.[URL_PATH] ?? spanData?.[HTTP_TARGET];
|
|
13
13
|
if (spanData && !spanData[HTTP_ROUTE] && requestPath === "/_server") {
|
|
14
14
|
setHttpServerSpanRouteAttribute(serverActionName);
|
|
@@ -19,9 +19,9 @@ async function withServerActionInstrumentation(serverActionName, callback) {
|
|
|
19
19
|
{
|
|
20
20
|
name: serverActionName,
|
|
21
21
|
attributes: {
|
|
22
|
-
[SENTRY_OP]:
|
|
22
|
+
[SENTRY_OP]: FUNCTION,
|
|
23
23
|
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.function.solidstart",
|
|
24
|
-
[
|
|
24
|
+
[SENTRY_SEGMENT_NAME_SOURCE]: "component"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
async (span) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withServerActionInstrumentation.js","sources":["../../../src/server/withServerActionInstrumentation.ts"],"sourcesContent":["import {\n flushIfServerless,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n} from '@sentry/core';\nimport { captureException, getActiveSpan,
|
|
1
|
+
{"version":3,"file":"withServerActionInstrumentation.js","sources":["../../../src/server/withServerActionInstrumentation.ts"],"sourcesContent":["import {\n flushIfServerless,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n} from '@sentry/core';\nimport { captureException, getActiveSpan, spanToJSON, startSpan } from '@sentry/node';\nimport { isRedirect } from './utils';\nimport {\n SENTRY_SEGMENT_NAME_SOURCE,\n HTTP_ROUTE,\n HTTP_TARGET,\n SENTRY_OP,\n URL_PATH,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION } from '@sentry/conventions/op';\nimport { setHttpServerSpanRouteAttribute } from '@sentry/server-utils';\n\n/**\n * Wraps a server action (functions that use the 'use server' directive)\n * function body with Sentry Error and Performance instrumentation.\n */\nexport async function withServerActionInstrumentation<A extends (...args: unknown[]) => unknown>(\n serverActionName: string,\n callback: A,\n): Promise<ReturnType<A>> {\n const activeSpan = getActiveSpan();\n\n if (activeSpan) {\n const spanData = spanToJSON(activeSpan).attributes;\n\n // In solid start, server function calls are made to `/_server` which doesn't tell us\n // a lot. We rewrite the span's route to be that of the sever action name but only\n // if the target is `/_server`, otherwise we'd overwrite pageloads on routes that use\n // server actions (which are more meaningful, e.g. a request to `GET /users/5` is more\n // meaningful than overwriting it with `GET doSomeFunctionCall`).\n // `@sentry/node` HTTP spans only carry `url.path`; the deprecated `http.target` is kept as a\n // fallback for instrumentation that still sets only that.\n // oxlint-disable-next-line typescript/no-deprecated\n const requestPath = spanData?.[URL_PATH] ?? spanData?.[HTTP_TARGET];\n\n if (spanData && !spanData[HTTP_ROUTE] && requestPath === '/_server') {\n setHttpServerSpanRouteAttribute(serverActionName);\n }\n }\n\n try {\n return await startSpan(\n {\n name: serverActionName,\n attributes: {\n [SENTRY_OP]: FUNCTION,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n },\n },\n async span => {\n // oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime\n const result = await handleCallbackErrors(callback, error => {\n if (!isRedirect(error)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.function.solidstart',\n },\n });\n }\n });\n\n return result;\n },\n );\n } finally {\n await flushIfServerless();\n }\n}\n"],"names":[],"mappings":";;;;;;;AAsBA,eAAsB,+BAAA,CACpB,kBACA,QAAA,EACwB;AACxB,EAAA,MAAM,aAAa,aAAA,EAAc;AAEjC,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,MAAM,QAAA,GAAW,UAAA,CAAW,UAAU,CAAA,CAAE,UAAA;AAUxC,IAAA,MAAM,WAAA,GAAc,QAAA,GAAW,QAAQ,CAAA,IAAK,WAAW,WAAW,CAAA;AAElE,IAAA,IAAI,YAAY,CAAC,QAAA,CAAS,UAAU,CAAA,IAAK,gBAAgB,UAAA,EAAY;AACnE,MAAA,+BAAA,CAAgC,gBAAgB,CAAA;AAAA,IAClD;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,OAAO,MAAM,SAAA;AAAA,MACX;AAAA,QACE,IAAA,EAAM,gBAAA;AAAA,QACN,UAAA,EAAY;AAAA,UACV,CAAC,SAAS,GAAG,QAAA;AAAA,UACb,CAAC,gCAAgC,GAAG,0BAAA;AAAA,UACpC,CAAC,0BAA0B,GAAG;AAAA;AAChC,OACF;AAAA,MACA,OAAM,IAAA,KAAQ;AAEZ,QAAA,MAAM,MAAA,GAAS,MAAM,oBAAA,CAAqB,QAAA,EAAU,CAAA,KAAA,KAAS;AAC3D,UAAA,IAAI,CAAC,UAAA,CAAW,KAAK,CAAA,EAAG;AACtB,YAAA,IAAA,CAAK,UAAU,EAAE,IAAA,EAAM,iBAAA,EAAmB,OAAA,EAAS,kBAAkB,CAAA;AACrE,YAAA,gBAAA,CAAiB,KAAA,EAAO;AAAA,cACtB,SAAA,EAAW;AAAA,gBACT,OAAA,EAAS,KAAA;AAAA,gBACT,IAAA,EAAM;AAAA;AACR,aACD,CAAA;AAAA,UACH;AAAA,QACF,CAAC,CAAA;AAED,QAAA,OAAO,MAAA;AAAA,MACT;AAAA,KACF;AAAA,EACF,CAAA,SAAE;AACA,IAAA,MAAM,iBAAA,EAAkB;AAAA,EAC1B;AACF;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { warnOnRemovedBuildOptions } from '@sentry/core';
|
|
1
2
|
import { setupSentryNitroModule } from '@sentry/nitro';
|
|
2
3
|
import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';
|
|
3
4
|
import { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps.js';
|
|
4
5
|
|
|
5
6
|
function sentrySolidStart(options = {}) {
|
|
7
|
+
warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
6
8
|
const plugins = [makeSentryNitroPlugin(options)];
|
|
7
9
|
if (process.env.NODE_ENV === "development") {
|
|
8
10
|
return plugins;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import { type BuildTimeOptionsBase, warnOnRemovedBuildOptions } from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & { nitro?: Record<string, unknown> };\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n\n return {\n nitro: setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>,\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":[],"mappings":";;;;;AAuCO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAAC,EAAa;AAChF,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,OAAA,GAAoB,CAAC,qBAAA,CAAsB,OAAO,CAAC,CAAA;AAGzD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,OAAO,OAAA;AAAA,EACT;AAIA,EAAA,OAAA,CAAQ,KAAK,uBAAA,CAAwB,EAAE,0BAA0B,OAAA,CAAQ,wBAAA,EAA0B,CAAC,CAAA;AAEpG,EAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,IAAA,OAAA,CAAQ,IAAA,CAAK,GAAG,kCAAA,CAAmC,OAAO,GAAG,GAAG,8BAAA,CAA+B,OAAO,CAAC,CAAA;AAAA,EACzG;AAEA,EAAA,OAAO,OAAA;AACT;AAiBA,SAAS,sBAAsB,OAAA,EAA0C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,yBAAA;AAAA,IACN,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,UAAA,EAAiC;AACtC,MAAA,MAAM,YAAY,UAAA,CAAW,KAAA;AAE7B,MAAA,OAAO;AAAA,QACL,KAAA,EAAO,sBAAA;AAAA;AAAA,UAEL,EAAE,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,cAAA,EAAgB,WAAW,cAAA,EAAe;AAAA,UAG7E;AAAA;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { warnOnRemovedBuildOptions } from '@sentry/core';
|
|
1
2
|
import { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile.js';
|
|
2
3
|
import { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps.js';
|
|
3
4
|
|
|
4
5
|
const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
6
|
+
warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
5
7
|
const sentryPlugins = [];
|
|
6
8
|
if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
|
|
7
9
|
sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
|
|
8
10
|
}
|
|
9
11
|
if (process.env.NODE_ENV !== "development") {
|
|
10
|
-
if (options.
|
|
12
|
+
if (options.sourcemaps?.disable !== true) {
|
|
11
13
|
const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);
|
|
12
14
|
const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);
|
|
13
15
|
sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } 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 = {}, viteConfig: UserConfig): Plugin[] => {\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } 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 = {}, viteConfig: UserConfig): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (config: UserConfig = {}, options: SentrySolidStartPluginOptions): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,oBAAA,GAAuB,CAAC,OAAA,GAAyC,IAAI,UAAA,KAAqC;AACrH,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,gBAA0B,EAAC;AAEjC,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAK,kCAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmB,uBAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyB,+BAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,qBAAA,GAAwB,CAAC,MAAA,GAAqB,IAAI,OAAA,KAAuD;AACpH,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAM,CAAC,CAAA;AAErD,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;"}
|
|
@@ -1,36 +1,57 @@
|
|
|
1
1
|
import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';
|
|
2
2
|
|
|
3
3
|
function makeAddSentryVitePlugin(options, viteConfig) {
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
applicationKey,
|
|
6
|
+
authToken,
|
|
7
|
+
bundleSizeOptimizations,
|
|
8
|
+
debug,
|
|
9
|
+
errorHandler,
|
|
10
|
+
headers,
|
|
11
|
+
moduleMetadata,
|
|
12
|
+
org,
|
|
13
|
+
project,
|
|
14
|
+
release,
|
|
15
|
+
sentryUrl,
|
|
16
|
+
silent,
|
|
17
|
+
sourcemaps,
|
|
18
|
+
telemetry
|
|
19
|
+
} = options;
|
|
5
20
|
let updatedFilesToDeleteAfterUpload = void 0;
|
|
6
|
-
if (typeof
|
|
21
|
+
if (typeof sourcemaps?.filesToDeleteAfterUpload === "undefined" && // Only if source maps were previously not set, we update the "filesToDeleteAfterUpload" (as we override the setting with "hidden")
|
|
7
22
|
typeof viteConfig.build?.sourcemap === "undefined") {
|
|
8
23
|
updatedFilesToDeleteAfterUpload = [".*/**/*.map"];
|
|
9
24
|
debug && // eslint-disable-next-line no-console
|
|
10
25
|
console.log(
|
|
11
|
-
`[Sentry] Automatically setting \`
|
|
26
|
+
`[Sentry] Automatically setting \`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(
|
|
12
27
|
updatedFilesToDeleteAfterUpload
|
|
13
28
|
)}\` to delete generated source maps after they were uploaded to Sentry.`
|
|
14
29
|
);
|
|
15
30
|
}
|
|
16
31
|
return [
|
|
17
32
|
...sentryVitePlugin({
|
|
33
|
+
applicationKey,
|
|
18
34
|
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
19
|
-
bundleSizeOptimizations
|
|
35
|
+
bundleSizeOptimizations,
|
|
20
36
|
debug: debug ?? false,
|
|
37
|
+
errorHandler,
|
|
38
|
+
headers,
|
|
39
|
+
moduleMetadata,
|
|
21
40
|
org: org ?? process.env.SENTRY_ORG,
|
|
22
41
|
project: project ?? process.env.SENTRY_PROJECT,
|
|
42
|
+
release,
|
|
43
|
+
silent,
|
|
44
|
+
telemetry: telemetry ?? true,
|
|
45
|
+
url: sentryUrl,
|
|
23
46
|
sourcemaps: {
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
...sourcemaps,
|
|
48
|
+
filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload
|
|
26
49
|
},
|
|
27
|
-
telemetry: sourceMapsUploadOptions?.telemetry ?? true,
|
|
28
50
|
_metaOptions: {
|
|
29
51
|
telemetry: {
|
|
30
52
|
metaFramework: "solidstart"
|
|
31
53
|
}
|
|
32
|
-
}
|
|
33
|
-
...sourceMapsUploadOptions?.unstable_sentryVitePluginOptions
|
|
54
|
+
}
|
|
34
55
|
})
|
|
35
56
|
];
|
|
36
57
|
}
|
|
@@ -44,7 +65,6 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
44
65
|
sentryUrl,
|
|
45
66
|
sourcemaps,
|
|
46
67
|
telemetry,
|
|
47
|
-
unstable_sentryVitePluginOptions,
|
|
48
68
|
...passthroughOptions
|
|
49
69
|
} = options;
|
|
50
70
|
let resolveFilesToDeleteAfterUpload;
|
|
@@ -56,7 +76,7 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
56
76
|
apply: "build",
|
|
57
77
|
enforce: "post",
|
|
58
78
|
config(config) {
|
|
59
|
-
const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload
|
|
79
|
+
const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;
|
|
60
80
|
if (typeof userFilesToDelete === "undefined" && typeof config.build?.sourcemap === "undefined") {
|
|
61
81
|
if (debug) {
|
|
62
82
|
console.log(
|
|
@@ -77,18 +97,12 @@ function makeAddSentryVitePluginSolidStart2(options) {
|
|
|
77
97
|
project: project ?? process.env.SENTRY_PROJECT,
|
|
78
98
|
telemetry: telemetry ?? true,
|
|
79
99
|
url: sentryUrl,
|
|
80
|
-
// Spread here so it overrides the plain options above, but not the objects merged below —
|
|
81
|
-
// spreading replaces whole keys rather than deep-merging.
|
|
82
|
-
...unstable_sentryVitePluginOptions,
|
|
83
100
|
sourcemaps: {
|
|
84
101
|
...sourcemaps,
|
|
85
|
-
...unstable_sentryVitePluginOptions?.sourcemaps,
|
|
86
102
|
filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise
|
|
87
103
|
},
|
|
88
104
|
_metaOptions: {
|
|
89
|
-
...unstable_sentryVitePluginOptions?._metaOptions,
|
|
90
105
|
telemetry: {
|
|
91
|
-
...unstable_sentryVitePluginOptions?._metaOptions?.telemetry,
|
|
92
106
|
metaFramework: "solidstart"
|
|
93
107
|
}
|
|
94
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const { authToken, debug, org, project, sourceMapsUploadOptions } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourceMapsUploadOptions?.filesToDeleteAfterUpload === 'undefined' &&\n typeof sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload ===\n 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourceMapsUploadOptions.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\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:\n (sourceMapsUploadOptions?.filesToDeleteAfterUpload ||\n sourceMapsUploadOptions?.unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload) ??\n updatedFilesToDeleteAfterUpload,\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\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n unstable_sentryVitePluginOptions,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config. `PromiseLike` because the unstable spelling\n // may itself be a promise.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n // The promise always wins over the passed-in value, so the unstable spelling has to be read\n // here too or it is silently replaced by the default below.\n const userFilesToDelete =\n sourcemaps?.filesToDeleteAfterUpload ?? unstable_sentryVitePluginOptions?.sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n // Spread here so it overrides the plain options above, but not the objects merged below —\n // spreading replaces whole keys rather than deep-merging.\n ...unstable_sentryVitePluginOptions,\n sourcemaps: {\n ...sourcemaps,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n ...unstable_sentryVitePluginOptions?._metaOptions,\n telemetry: {\n ...unstable_sentryVitePluginOptions?._metaOptions?.telemetry,\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }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;AAE1B,IAAA,IAAI,KAAA,EAAO;AAGT,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN,CAAA,yFAAA,EAA4F,UAAU,CAAA,2QAAA,EAA8Q,UAAU,CAAA,wCAAA;AAAA,OAChY;AAAA,IACF,CAAA,MAAO;AAEL,MAAA,OAAA,CAAQ,KAAK,8EAA8E,CAAA;AAAA,IAC7F;AAAA,EACF,CAAA,MAAA,IAAW,iBAAiB,CAAC,QAAA,EAAU,UAAU,IAAI,CAAA,CAAE,QAAA,CAAS,aAAa,CAAA,EAAG;AAC9E,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,CAAA,yBAAA,EAA4B,UAAU,CAAA,eAAA,EAAkB,aAAA,CAAc,UAAU,CAAA,4GAAA;AAAA,KAClF;AAAA,EACJ,CAAA,MAAO;AACL,IAAA,uBAAA,GAA0B,QAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,sEAAsE,UAAU,CAAA,kFAAA;AAAA,KAClF;AAAA,EACJ;AAEA,EAAA,OAAO,uBAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const {\n applicationKey,\n authToken,\n bundleSizeOptimizations,\n debug,\n errorHandler,\n headers,\n moduleMetadata,\n org,\n project,\n release,\n sentryUrl,\n silent,\n sourcemaps,\n telemetry,\n } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\n ...sentryVitePlugin({\n applicationKey,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n errorHandler,\n headers,\n moduleMetadata,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n release,\n silent,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n }),\n ];\n}\n\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }\n\n return updatedSourceMapSetting;\n}\n"],"names":[],"mappings":";;AAaO,SAAS,uBAAA,CAAwB,SAAwC,UAAA,EAAkC;AAChH,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,SAAA;AAAA,IACA,uBAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,cAAA;AAAA,IACA,GAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,IAAI,+BAAA,GAAwD,MAAA;AAE5D,EAAA,IACE,OAAO,YAAY,wBAAA,KAA6B,WAAA;AAAA,EAEhD,OAAO,UAAA,CAAW,KAAA,EAAO,SAAA,KAAc,WAAA,EACvC;AAEA,IAAA,+BAAA,GAAkC,CAAC,aAAa,CAAA;AAEhD,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,yEAAyE,IAAA,CAAK,SAAA;AAAA,QAC5E;AAAA,OACD,CAAA,sEAAA;AAAA,KACH;AAAA,EACJ;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA,CAAiB;AAAA,MAClB,cAAA;AAAA,MACA,SAAA,EAAW,SAAA,IAAa,OAAA,CAAQ,GAAA,CAAI,iBAAA;AAAA,MACpC,uBAAA;AAAA,MACA,OAAO,KAAA,IAAS,KAAA;AAAA,MAChB,YAAA;AAAA,MACA,OAAA;AAAA,MACA,cAAA;AAAA,MACA,GAAA,EAAK,GAAA,IAAO,OAAA,CAAQ,GAAA,CAAI,UAAA;AAAA,MACxB,OAAA,EAAS,OAAA,IAAW,OA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AAA,EAAO;AAC3B,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,IAAI,KAAA,EAAO;AAGT,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN,CAAA,yFAAA,EAA4F,UAAU,CAAA,2QAAA,EAA8Q,UAAU,CAAA,wCAAA;AAAA,OAChY;AAAA,IACF,CAAA,MAAO;AAEL,MAAA,OAAA,CAAQ,KAAK,8EAA8E,CAAA;AAAA,IAC7F;AAAA,EACF,CAAA,MAAA,IAAW,iBAAiB,CAAC,QAAA,EAAU,UAAU,IAAI,CAAA,CAAE,QAAA,CAAS,aAAa,CAAA,EAAG;AAC9E,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,CAAA,yBAAA,EAA4B,UAAU,CAAA,eAAA,EAAkB,aAAA,CAAc,UAAU,CAAA,4GAAA;AAAA,KAClF;AAAA,EACJ,CAAA,MAAO;AACL,IAAA,uBAAA,GAA0B,QAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,sEAAsE,UAAU,CAAA,kFAAA;AAAA,KAClF;AAAA,EACJ;AAEA,EAAA,OAAO,uBAAA;AACT;;;;"}
|
|
@@ -9,6 +9,9 @@ export declare function init(options: Options | clientSdk.BrowserOptions | serve
|
|
|
9
9
|
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
|
|
10
10
|
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
|
|
11
11
|
export declare const spanStreamingIntegration: typeof clientSdk.spanStreamingIntegration;
|
|
12
|
+
export declare const startSpan: typeof clientSdk.startSpan;
|
|
13
|
+
export declare const startSpanManual: typeof clientSdk.startSpanManual;
|
|
14
|
+
export declare const startInactiveSpan: typeof clientSdk.startInactiveSpan;
|
|
12
15
|
export declare const withStaticSpan: typeof clientSdk.withStaticSpan;
|
|
13
16
|
export declare const withStreamedSpan: typeof clientSdk.withStreamedSpan;
|
|
14
17
|
export declare const getDefaultIntegrations: (options: Options) => Integration[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,KAAK,KAAK,SAAS,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,KAAK,SAAS,MAAM,UAAU,CAAC;AAE3C,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB,yCAAyC;AACzC,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtH,MAAM,CAAC,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,SAAS,CAAC,uBAAuB,CAAC;AACvF,MAAM,CAAC,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,SAAS,CAAC,uBAAuB,CAAC;AACvF,MAAM,CAAC,OAAO,CAAC,MAAM,wBAAwB,EAAE,OAAO,SAAS,CAAC,wBAAwB,CAAC;AACzF,MAAM,CAAC,OAAO,CAAC,MAAM,cAAc,EAAE,OAAO,SAAS,CAAC,cAAc,CAAC;AAErE,MAAM,CAAC,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,SAAS,CAAC,gBAAgB,CAAC;AAEzE,MAAM,CAAC,OAAO,CAAC,MAAM,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,WAAW,EAAE,CAAC;AACjF,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,WAAW,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAA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1D,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,EAAE,OAAO,SAAS,CAAC,MAAM,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,MAAM,qBAAqB,EAAE,OAAO,SAAS,CAAC,qBAAqB,CAAC;AACnF,MAAM,CAAC,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,SAAS,CAAC,uBAAuB,CAAC;AACvF,MAAM,CAAC,OAAO,CAAC,MAAM,gCAAgC,EAAE,OAAO,SAAS,CAAC,gCAAgC,CAAC;AACzG,MAAM,CAAC,OAAO,CAAC,MAAM,sBAAsB,EAAE,OAAO,SAAS,CAAC,sBAAsB,CAAC;AACrF,MAAM,CAAC,OAAO,CAAC,MAAM,0BAA0B,EAAE,OAAO,SAAS,CAAC,0BAA0B,CAAC;AAC7F,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,SAAS,CAAC,kBAAkB,CAAC;AAC7E,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,SAAS,CAAC,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
|
|
1
|
+
export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SENTRY_SEGMENT_NAME_SOURCE, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setAttribute, setAttributes, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setUser, spanToBaggageHeader, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, startSession, startSpan, startSpanManual, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, logger, consoleLoggingIntegration, createConsolaReporter, createSentryWinstonTransport, spanStreamingIntegration, withStaticSpan, withStreamedSpan, } from '@sentry/node';
|
|
2
2
|
export * from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './sdk';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAElB,cAAc,EAEd,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,IAAI,EACJ,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAElB,cAAc,EAEd,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAC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,EACT,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,MAAM,EACN,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,EAEd,gBAAgB,GACjB,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;AAClD,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withServerActionInstrumentation.d.ts","sourceRoot":"","sources":["../../../src/server/withServerActionInstrumentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withServerActionInstrumentation.d.ts","sourceRoot":"","sources":["../../../src/server/withServerActionInstrumentation.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAsB,+BAA+B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAC7F,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,CAAC,GACV,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAmDxB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
|
|
1
|
+
import { type BuildTimeOptionsBase } from '@sentry/core';
|
|
3
2
|
import type { Plugin } from 'vite';
|
|
4
3
|
/**
|
|
5
4
|
* Build-time options for the Sentry SolidStart SDK on SolidStart 2.
|
|
6
5
|
*/
|
|
7
|
-
export type SentrySolidStartOptions = BuildTimeOptionsBase
|
|
6
|
+
export type SentrySolidStartOptions = BuildTimeOptionsBase;
|
|
8
7
|
/**
|
|
9
8
|
* Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.
|
|
10
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStart.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStart.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sentrySolidStart.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA6B,MAAM,cAAc,CAAC;AAGpF,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,EAAE,CAmBhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAAa,6BAA6B,0BAAmB,UAAU,KAAG,MAAM,EAmBhH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,WAAY,UAAU,uBAAgB,6BAA6B,KAAG,UAQvG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../../src/vite/sourceMaps.ts"],"names":[],"mappings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= {
|
|
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/bundler-plugins/vite) 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
|
-
};
|
|
1
|
+
import type { BuildTimeOptionsBase } from '@sentry/core';
|
|
77
2
|
/**
|
|
78
3
|
* Build options for the Sentry plugin. These options are used during build-time by the Sentry SDK.
|
|
79
4
|
*/
|
|
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
|
-
* Automatic instrumentation of server-side dependencies at build time.
|
|
115
|
-
*
|
|
116
|
-
* Set to `false` to turn it off.
|
|
117
|
-
*
|
|
118
|
-
* @default true
|
|
119
|
-
*/
|
|
120
|
-
buildTimeInstrumentation?: boolean;
|
|
5
|
+
export type SentrySolidStartPluginOptions = BuildTimeOptionsBase & {
|
|
121
6
|
/**
|
|
122
7
|
* The path to your `instrument.server.ts|js` file.
|
|
123
8
|
* e.g. `./src/instrument.server.ts`
|
|
@@ -170,5 +55,4 @@ export type SentrySolidStartPluginOptions = {
|
|
|
170
55
|
*/
|
|
171
56
|
experimental_entrypointWrappedFunctions?: string[];
|
|
172
57
|
};
|
|
173
|
-
export {};
|
|
174
58
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,GAAG;IACjE;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,sBAAsB,CAAC,EAAE,kBAAkB,GAAG,6BAA6B,CAAC;IAE5E;;;;;;;;;;OAUG;IACH,uCAAuC,CAAC,EAAE,MAAM,EAAE,CAAC;CACpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/solidstart",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.2",
|
|
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",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@solidjs/router": "
|
|
74
|
+
"@solidjs/router": ">=0.13.4 <2.0.0-0",
|
|
75
75
|
"@solidjs/start": "^1.0.0 || ^2.0.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependenciesMeta": {
|
|
@@ -80,19 +80,19 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@sentry/core": "11.0.0-alpha.
|
|
84
|
-
"@sentry/nitro": "11.0.0-alpha.
|
|
85
|
-
"@sentry/node": "11.0.0-alpha.
|
|
86
|
-
"@sentry/server-utils": "11.0.0-alpha.
|
|
87
|
-
"@sentry/solid": "11.0.0-alpha.
|
|
88
|
-
"@sentry/bundler-plugins": "11.0.0-alpha.
|
|
89
|
-
"@sentry/conventions": "0.
|
|
83
|
+
"@sentry/core": "11.0.0-alpha.2",
|
|
84
|
+
"@sentry/nitro": "11.0.0-alpha.2",
|
|
85
|
+
"@sentry/node": "11.0.0-alpha.2",
|
|
86
|
+
"@sentry/server-utils": "11.0.0-alpha.2",
|
|
87
|
+
"@sentry/solid": "11.0.0-alpha.2",
|
|
88
|
+
"@sentry/bundler-plugins": "11.0.0-alpha.2",
|
|
89
|
+
"@sentry/conventions": "0.20.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@solidjs/router": "^0.
|
|
93
|
-
"@solidjs/start": "^1.2
|
|
92
|
+
"@solidjs/router": "^1.0.0",
|
|
93
|
+
"@solidjs/start": "^1.3.2",
|
|
94
94
|
"@solidjs/testing-library": "0.8.5",
|
|
95
|
-
"@testing-library/jest-dom": "^6.
|
|
95
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
96
96
|
"@testing-library/user-event": "^14.5.2",
|
|
97
97
|
"solid-js": "^1.9.11",
|
|
98
98
|
"vinxi": "^0.5.11",
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
|
|
115
115
|
"lint:fix": "oxlint . --fix --type-aware",
|
|
116
116
|
"lint": "oxlint . --type-aware",
|
|
117
|
+
"lint:types": "oxlint src --type-aware --type-check",
|
|
117
118
|
"lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module",
|
|
118
119
|
"test": "yarn test:unit",
|
|
119
120
|
"test:unit": "vitest run",
|