@sentry/solidstart 10.0.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
3
|
const vitePlugin = require('@sentry/vite-plugin');
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -21,14 +20,13 @@ function makeAddSentryVitePlugin(options, viteConfig) {
|
|
|
21
20
|
// For .output, .vercel, .netlify etc.
|
|
22
21
|
updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
debug &&
|
|
25
24
|
// eslint-disable-next-line no-console
|
|
26
25
|
console.log(
|
|
27
26
|
`[Sentry] Automatically setting \`sourceMapsUploadOptions.filesToDeleteAfterUpload: ${JSON.stringify(
|
|
28
27
|
updatedFilesToDeleteAfterUpload,
|
|
29
28
|
)}\` to delete generated source maps after they were uploaded to Sentry.`,
|
|
30
29
|
);
|
|
31
|
-
});
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
return [
|
|
@@ -103,36 +101,37 @@ function getUpdatedSourceMapSettings(
|
|
|
103
101
|
let updatedSourceMapSetting = viteSourceMap;
|
|
104
102
|
|
|
105
103
|
const settingKey = 'vite.build.sourcemap';
|
|
104
|
+
const debug = sentryPluginOptions?.debug;
|
|
106
105
|
|
|
107
106
|
if (viteSourceMap === false) {
|
|
108
107
|
updatedSourceMapSetting = viteSourceMap;
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
//
|
|
109
|
+
if (debug) {
|
|
110
|
+
// Longer debug message with more details
|
|
111
|
+
// eslint-disable-next-line no-console
|
|
112
112
|
console.warn(
|
|
113
113
|
`[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\`).`,
|
|
114
114
|
);
|
|
115
|
-
}
|
|
115
|
+
} else {
|
|
116
|
+
// eslint-disable-next-line no-console
|
|
117
|
+
console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');
|
|
118
|
+
}
|
|
116
119
|
} else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {
|
|
117
120
|
updatedSourceMapSetting = viteSourceMap;
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
122
|
+
debug &&
|
|
123
|
+
// eslint-disable-next-line no-console
|
|
124
|
+
console.log(
|
|
125
|
+
`[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.`,
|
|
126
|
+
);
|
|
127
127
|
} else {
|
|
128
128
|
updatedSourceMapSetting = 'hidden';
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
debug &&
|
|
131
131
|
// eslint-disable-next-line no-console
|
|
132
132
|
console.log(
|
|
133
133
|
`[Sentry] Enabled source map generation in the build options with \`${settingKey}: 'hidden'\`. The source maps will be deleted after they were uploaded to Sentry.`,
|
|
134
134
|
);
|
|
135
|
-
});
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
return updatedSourceMapSetting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for adding the @sentry/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 * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n return {\n ...viteConfig,\n build: {\n ...viteConfig.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-j avascript/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?: SentrySolidStartPluginOptions,\n): boolean | 'inline' | 'hidden' {\n viteConfig.build = viteConfig.build || {};\n\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":";;;;AAIA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,OAAO,EAAiC,UAAU,EAAwB;AAClH,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,uBAAA,EAAwB,GAAI,OAAO;;AAE7E,EAAE,IAAI,+BAA+B,GAAyB,SAAS;;AAEvE,EAAE;AACF,IAAI,OAAO,uBAAuB,EAAE,wBAAA,KAA6B,WAAA;AACjE,IAAI,OAAO,uBAAuB,EAAE,gCAAgC,EAAE,UAAU,EAAE,wBAAA;AAClF,MAAM,WAAA;AACN;AACA,IAAI,OAAO,UAAU,CAAC,KAAK,EAAE,cAAc;AAC3C,IAAI;AACJ;AACA,IAAI,+BAAA,GAAkC,CAAC,aAAa,CAAC;;AAErD,IAAI,KAAA;AACJ;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,mFAAmF,EAAE,IAAI,CAAC,SAAS;AAC5G,UAAU,+BAA+B;AACzC,SAAS,CAAC,sEAAsE,CAAC;AACjF,OAAO;AACP;;AAEA,EAAE,OAAO;AACT,IAAI,GAAGA,2BAAgB,CAAC;AACxB,MAAM,SAAS,EAAE,SAAA,IAAa,OAAO,CAAC,GAAG,CAAC,iBAAiB;AAC3D,MAAM,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;AAC9D,MAAM,KAAK,EAAE,KAAA,IAAS,KAAK;AAC3B,MAAM,GAAG,EAAE,GAAA,IAAO,OAAO,CAAC,GAA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B,UAAU,EAAE,KAAK,EAAE,SAAS;AACpD,EAAE,IAAI,uBAAA,GAA0B,aAAa;;AAE7C,EAAE,MAAM,UAAA,GAAa,sBAAsB;AAC3C,EAAE,MAAM,KAAA,GAAQ,mBAAmB,EAAE,KAAK;;AAE1C,EAAE,IAAI,aAAA,KAAkB,KAAK,EAAE;AAC/B,IAAI,uBAAA,GAA0B,aAAa;;AAE3C,IAAI,IAAI,KAAK,EAAE;AACf;AACA;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,CAAC,yFAAyF,EAAE,UAAU,CAAC,2QAA2Q,EAAE,UAAU,CAAC,wCAAwC,CAAC;AAChb,OAAO;AACP,WAAW;AACX;AACA,MAAM,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC;AAClG;AACA,SAAS,IAAI,aAAA,IAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AAClF,IAAI,uBAAA,GAA0B,aAAa;;AAE3C,IAAI,KAAA;AACJ;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,yBAAyB,EAAE,UAAU,CAAC,eAAe,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,4GAA4G,CAAC;AACtM,OAAO;AACP,SAAS;AACT,IAAI,uBAAA,GAA0B,QAAQ;;AAEtC,IAAI,KAAA;AACJ;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,mEAAmE,EAAE,UAAU,CAAC,kFAAkF,CAAC;AAC5K,OAAO;AACP;;AAEA,EAAE,OAAO,uBAAuB;AAChC;;;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.
|
|
1
|
+
{"type":"module","version":"10.2.0"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { consoleSandbox } from '@sentry/core';
|
|
2
1
|
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -19,14 +18,13 @@ function makeAddSentryVitePlugin(options, viteConfig) {
|
|
|
19
18
|
// For .output, .vercel, .netlify etc.
|
|
20
19
|
updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
debug &&
|
|
23
22
|
// eslint-disable-next-line no-console
|
|
24
23
|
console.log(
|
|
25
24
|
`[Sentry] Automatically setting \`sourceMapsUploadOptions.filesToDeleteAfterUpload: ${JSON.stringify(
|
|
26
25
|
updatedFilesToDeleteAfterUpload,
|
|
27
26
|
)}\` to delete generated source maps after they were uploaded to Sentry.`,
|
|
28
27
|
);
|
|
29
|
-
});
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
return [
|
|
@@ -101,36 +99,37 @@ function getUpdatedSourceMapSettings(
|
|
|
101
99
|
let updatedSourceMapSetting = viteSourceMap;
|
|
102
100
|
|
|
103
101
|
const settingKey = 'vite.build.sourcemap';
|
|
102
|
+
const debug = sentryPluginOptions?.debug;
|
|
104
103
|
|
|
105
104
|
if (viteSourceMap === false) {
|
|
106
105
|
updatedSourceMapSetting = viteSourceMap;
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
//
|
|
107
|
+
if (debug) {
|
|
108
|
+
// Longer debug message with more details
|
|
109
|
+
// eslint-disable-next-line no-console
|
|
110
110
|
console.warn(
|
|
111
111
|
`[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\`).`,
|
|
112
112
|
);
|
|
113
|
-
}
|
|
113
|
+
} else {
|
|
114
|
+
// eslint-disable-next-line no-console
|
|
115
|
+
console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');
|
|
116
|
+
}
|
|
114
117
|
} else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {
|
|
115
118
|
updatedSourceMapSetting = viteSourceMap;
|
|
116
119
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
120
|
+
debug &&
|
|
121
|
+
// eslint-disable-next-line no-console
|
|
122
|
+
console.log(
|
|
123
|
+
`[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.`,
|
|
124
|
+
);
|
|
125
125
|
} else {
|
|
126
126
|
updatedSourceMapSetting = 'hidden';
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
debug &&
|
|
129
129
|
// eslint-disable-next-line no-console
|
|
130
130
|
console.log(
|
|
131
131
|
`[Sentry] Enabled source map generation in the build options with \`${settingKey}: 'hidden'\`. The source maps will be deleted after they were uploaded to Sentry.`,
|
|
132
132
|
);
|
|
133
|
-
});
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
return updatedSourceMapSetting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for adding the @sentry/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 * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SentrySolidStartPluginOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n return {\n ...viteConfig,\n build: {\n ...viteConfig.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-j avascript/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?: SentrySolidStartPluginOptions,\n): boolean | 'inline' | 'hidden' {\n viteConfig.build = viteConfig.build || {};\n\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 upd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ACA;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,CAAC,yFAAyF,EAAE,UAAU,CAAC,2QAA2Q,EAAE,UAAU,CAAC,wCAAwC,CAAC;AAChb,OAAO;AACP,WAAW;AACX;AACA,MAAM,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC;AAClG;AACA,SAAS,IAAI,aAAA,IAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AAClF,IAAI,uBAAA,GAA0B,aAAa;;AAE3C,IAAI,KAAA;AACJ;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,yBAAyB,EAAE,UAAU,CAAC,eAAe,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,4GAA4G,CAAC;AACtM,OAAO;AACP,SAAS;AACT,IAAI,uBAAA,GAA0B,QAAQ;;AAEtC,IAAI,KAAA;AACJ;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,mEAAmE,EAAE,UAAU,CAAC,kFAAkF,CAAC;AAC5K,OAAO;AACP;;AAEA,EAAE,OAAO,uBAAuB;AAChC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../../src/vite/sourceMaps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../../src/vite/sourceMaps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,6BAA6B,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CA+ChH;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,6BAA6B,GAAG,MAAM,EAAE,CAiB/F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,mBAAmB,CAAC,EAAE,6BAA6B,GAClD,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAyC/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/solidstart",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Official Sentry SDK for Solid Start",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@sentry/core": "10.
|
|
70
|
-
"@sentry/node": "10.
|
|
71
|
-
"@sentry/solid": "10.
|
|
69
|
+
"@sentry/core": "10.2.0",
|
|
70
|
+
"@sentry/node": "10.2.0",
|
|
71
|
+
"@sentry/solid": "10.2.0",
|
|
72
72
|
"@sentry/vite-plugin": "^4.0.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|