@sentry/nuxt 10.0.0-beta.0 → 10.1.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.
@@ -12,10 +12,20 @@ const vitePlugin = require('@sentry/vite-plugin');
12
12
  * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).
13
13
  */
14
14
  function setupSourceMaps(moduleOptions, nuxt) {
15
+ // TODO(v11): remove deprecated options (also from SentryNuxtModuleOptions type)
16
+
15
17
  const isDebug = moduleOptions.debug;
16
18
 
19
+ // eslint-disable-next-line deprecation/deprecation
17
20
  const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};
18
- const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;
21
+
22
+ const sourceMapsEnabled =
23
+ moduleOptions.sourcemaps?.disable === true
24
+ ? false
25
+ : moduleOptions.sourcemaps?.disable === false
26
+ ? true
27
+ : // eslint-disable-next-line deprecation/deprecation
28
+ sourceMapsUploadOptions.enabled ?? true;
19
29
 
20
30
  // In case we overwrite the source map settings, we default to deleting the files
21
31
  let shouldDeleteFilesFallback = { client: true, server: true };
@@ -37,6 +47,8 @@ function setupSourceMaps(moduleOptions, nuxt) {
37
47
 
38
48
  if (
39
49
  isDebug &&
50
+ !moduleOptions.sourcemaps?.filesToDeleteAfterUpload &&
51
+ // eslint-disable-next-line deprecation/deprecation
40
52
  !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&
41
53
  (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)
42
54
  ) {
@@ -129,10 +141,13 @@ function normalizePath(path) {
129
141
  *
130
142
  * Only exported for Testing purposes.
131
143
  */
144
+ // todo(v11): This "eslint-disable" can be removed again once we remove deprecated options.
145
+ // eslint-disable-next-line complexity
132
146
  function getPluginOptions(
133
147
  moduleOptions,
134
148
  shouldDeleteFilesFallback,
135
149
  ) {
150
+ // eslint-disable-next-line deprecation/deprecation
136
151
  const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};
137
152
 
138
153
  const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;
@@ -143,10 +158,17 @@ function getPluginOptions(
143
158
  : []),
144
159
  ];
145
160
 
146
- if (
147
- typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&
148
- shouldDeleteFilesAfterUpload
149
- ) {
161
+ // Check for filesToDeleteAfterUpload in new location first, then deprecated location
162
+ const sourcemapsOptions = moduleOptions.sourcemaps || {};
163
+ // eslint-disable-next-line deprecation/deprecation
164
+ const deprecatedSourcemapsOptions = sourceMapsUploadOptions.sourcemaps || {};
165
+
166
+ const filesToDeleteAfterUpload =
167
+ sourcemapsOptions.filesToDeleteAfterUpload ??
168
+ // eslint-disable-next-line deprecation/deprecation
169
+ deprecatedSourcemapsOptions.filesToDeleteAfterUpload;
170
+
171
+ if (typeof filesToDeleteAfterUpload === 'undefined' && shouldDeleteFilesAfterUpload) {
150
172
  core.consoleSandbox(() => {
151
173
  // eslint-disable-next-line no-console
152
174
  console.log(
@@ -159,16 +181,28 @@ function getPluginOptions(
159
181
  }
160
182
 
161
183
  return {
162
- org: sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
163
- project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
164
- authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
165
- telemetry: sourceMapsUploadOptions.telemetry ?? true,
166
- url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
184
+ // eslint-disable-next-line deprecation/deprecation
185
+ org: moduleOptions.org ?? sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
186
+ // eslint-disable-next-line deprecation/deprecation
187
+ project: moduleOptions.project ?? sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
188
+ // eslint-disable-next-line deprecation/deprecation
189
+ authToken: moduleOptions.authToken ?? sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
190
+ // eslint-disable-next-line deprecation/deprecation
191
+ telemetry: moduleOptions.telemetry ?? sourceMapsUploadOptions.telemetry ?? true,
192
+ // eslint-disable-next-line deprecation/deprecation
193
+ url: moduleOptions.sentryUrl ?? sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
194
+ headers: moduleOptions.headers,
167
195
  debug: moduleOptions.debug ?? false,
168
- silent: sourceMapsUploadOptions.silent ?? false,
169
- errorHandler: sourceMapsUploadOptions.errorHandler,
196
+ // eslint-disable-next-line deprecation/deprecation
197
+ silent: moduleOptions.silent ?? sourceMapsUploadOptions.silent ?? false,
198
+ // eslint-disable-next-line deprecation/deprecation
199
+ errorHandler: moduleOptions.errorHandler ?? sourceMapsUploadOptions.errorHandler,
200
+ bundleSizeOptimizations: moduleOptions.bundleSizeOptimizations, // todo: test if this can be overridden by the user
170
201
  release: {
171
- name: sourceMapsUploadOptions.release?.name,
202
+ // eslint-disable-next-line deprecation/deprecation
203
+ name: moduleOptions.release?.name ?? sourceMapsUploadOptions.release?.name,
204
+ // Support all release options from BuildTimeOptionsBase
205
+ ...moduleOptions.release,
172
206
  ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,
173
207
  },
174
208
  _metaOptions: {
@@ -179,13 +213,16 @@ function getPluginOptions(
179
213
  ...moduleOptions?.unstable_sentryBundlerPluginOptions,
180
214
 
181
215
  sourcemaps: {
216
+ disable: moduleOptions.sourcemaps?.disable,
182
217
  // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')
183
218
  // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).
184
219
  // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],
185
- assets: sourceMapsUploadOptions.sourcemaps?.assets ?? undefined,
186
- ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? undefined,
187
- filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload
188
- ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload
220
+ // eslint-disable-next-line deprecation/deprecation
221
+ assets: sourcemapsOptions.assets ?? deprecatedSourcemapsOptions.assets ?? undefined,
222
+ // eslint-disable-next-line deprecation/deprecation
223
+ ignore: sourcemapsOptions.ignore ?? deprecatedSourcemapsOptions.ignore ?? undefined,
224
+ filesToDeleteAfterUpload: filesToDeleteAfterUpload
225
+ ? filesToDeleteAfterUpload
189
226
  : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client
190
227
  ? fallbackFilesToDelete
191
228
  : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import type { Nuxt } from '@nuxt/schema';\nimport { consoleSandbox } from '@sentry/core';\nimport { type SentryRollupPluginOptions, sentryRollupPlugin } from '@sentry/rollup-plugin';\nimport { type SentryVitePluginOptions, sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { NitroConfig } from 'nitropack';\nimport type { SentryNuxtModuleOptions } from '../common/types';\n\n/**\n * Whether the user enabled (true, 'hidden', 'inline') or disabled (false) source maps\n */\nexport type UserSourceMapSetting = 'enabled' | 'disabled' | 'unset' | undefined;\n\n/** A valid source map setting */\nexport type SourceMapSetting = boolean | 'hidden' | 'inline';\n\n/**\n * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).\n */\nexport function setupSourceMaps(moduleOptions: SentryNuxtModuleOptions, nuxt: Nuxt): void {\n const isDebug = moduleOptions.debug;\n\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n // In case we overwrite the source map settings, we default to deleting the files\n let shouldDeleteFilesFallback = { client: true, server: true };\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n // Changing this setting will propagate:\n // - for client to viteConfig.build.sourceMap\n // - for server to viteConfig.build.sourceMap and nitro.sourceMap\n // On server, nitro.rollupConfig.output.sourcemap remains unaffected from this change.\n\n // ONLY THIS nuxt.sourcemap.(server/client) setting is the one Sentry will eventually overwrite with 'hidden'\n const previousSourceMapSettings = changeNuxtSourceMapSettings(nuxt, moduleOptions);\n\n shouldDeleteFilesFallback = {\n client: previousSourceMapSettings.client === 'unset',\n server: previousSourceMapSettings.server === 'unset',\n };\n\n if (\n isDebug &&\n !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&\n (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)\n ) {\n consoleSandbox(() =>\n // eslint-disable-next-line no-console\n console.log(\n \"[Sentry] As Sentry enabled `'hidden'` source maps, source maps will be automatically deleted after uploading them to Sentry.\",\n ),\n );\n }\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const runtime = env.isServer ? 'server' : env.isClient ? 'client' : undefined;\n const nuxtSourceMapSetting = extractNuxtSourceMapSetting(nuxt, runtime);\n\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n // Vite source map options are the same as the Nuxt source map config options (unless overwritten)\n validateDifferentSourceMapSettings({\n nuxtSettingKey: `sourcemap.${runtime}`,\n nuxtSettingValue: nuxtSourceMapSetting,\n otherSettingKey: 'viteConfig.build.sourcemap',\n otherSettingValue: viteSourceMap,\n });\n\n if (isDebug) {\n consoleSandbox(() => {\n if (!runtime) {\n // eslint-disable-next-line no-console\n console.log(\"[Sentry] Cannot detect runtime (client/server) inside hook 'vite:extendConfig'.\");\n } else {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Adding Sentry Vite plugin to the ${runtime} runtime.`);\n }\n });\n }\n\n // Add Sentry plugin\n // Vite plugin is added on the client and server side (hook runs twice)\n // Nuxt client source map is 'false' by default. Warning about this will be shown already in an earlier step, and it's also documented that `nuxt.sourcemap.client` needs to be enabled.\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(sentryVitePlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)));\n }\n });\n\n nuxt.hook('nitro:config', (nitroConfig: NitroConfig) => {\n if (sourceMapsEnabled && !nitroConfig.dev) {\n if (!nitroConfig.rollupConfig) {\n nitroConfig.rollupConfig = {};\n }\n\n if (nitroConfig.rollupConfig.plugins === null || nitroConfig.rollupConfig.plugins === undefined) {\n nitroConfig.rollupConfig.plugins = [];\n } else if (!Array.isArray(nitroConfig.rollupConfig.plugins)) {\n // `rollupConfig.plugins` can be a single plugin, so we want to put it into an array so that we can push our own plugin\n nitroConfig.rollupConfig.plugins = [nitroConfig.rollupConfig.plugins];\n }\n\n validateNitroSourceMapSettings(nuxt, nitroConfig, moduleOptions);\n\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log('[Sentry] Adding Sentry Rollup plugin to the server runtime.');\n });\n }\n\n // Add Sentry plugin\n // Runs only on server-side (Nitro)\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)),\n );\n }\n });\n}\n\n/**\n * Normalizes the beginning of a path from e.g. ../../../ to ./\n */\nfunction normalizePath(path: string): string {\n return path.replace(/^(\\.\\.\\/)+/, './');\n}\n\n/**\n * Generates source maps upload options for the Sentry Vite and Rollup plugin.\n *\n * Only exported for Testing purposes.\n */\nexport function getPluginOptions(\n moduleOptions: SentryNuxtModuleOptions,\n shouldDeleteFilesFallback?: { client: boolean; server: boolean },\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;\n const fallbackFilesToDelete = [\n ...(shouldDeleteFilesFallback?.client ? ['.*/**/public/**/*.map'] : []),\n ...(shouldDeleteFilesFallback?.server\n ? ['.*/**/server/**/*.map', '.*/**/output/**/*.map', '.*/**/function/**/*.map']\n : []),\n ];\n\n if (\n typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n shouldDeleteFilesAfterUpload\n ) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Setting \\`sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [${fallbackFilesToDelete\n // Logging it as strings in the array\n .map(path => `\"${path}\"`)\n .join(', ')}]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n });\n }\n\n return {\n org: sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,\n project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,\n authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n telemetry: sourceMapsUploadOptions.telemetry ?? true,\n url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,\n debug: moduleOptions.debug ?? false,\n silent: sourceMapsUploadOptions.silent ?? false,\n errorHandler: sourceMapsUploadOptions.errorHandler,\n release: {\n name: sourceMapsUploadOptions.release?.name,\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'nuxt',\n },\n },\n ...moduleOptions?.unstable_sentryBundlerPluginOptions,\n\n sourcemaps: {\n // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')\n // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).\n // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],\n assets: sourceMapsUploadOptions.sourcemaps?.assets ?? undefined,\n ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? undefined,\n filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload\n ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload\n : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client\n ? fallbackFilesToDelete\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are multiple ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993 and https://github.com/getsentry/sentry-javascript/pull/15859)\n 1. User explicitly disabled source maps\n - keep this setting (emit a warning that errors won't be unminified in Sentry)\n - We will not upload anything\n 2. users enabled source map generation (true, hidden, inline).\n - keep this setting (don't do anything - like deletion - besides uploading)\n 3. users did not 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 Users only have to explicitly enable client source maps. Sentry only overwrites the base Nuxt source map settings as they propagate.\n */\n\n/** only exported for tests */\nexport function extractNuxtSourceMapSetting(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting; client?: SourceMapSetting } } },\n runtime: 'client' | 'server' | undefined,\n): SourceMapSetting | undefined {\n if (!runtime) {\n return undefined;\n } else {\n return typeof nuxt.options?.sourcemap === 'boolean' || typeof nuxt.options?.sourcemap === 'string'\n ? nuxt.options.sourcemap\n : nuxt.options?.sourcemap?.[runtime];\n }\n}\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options.sourcemap = nuxt.options.sourcemap ?? { server: undefined, client: undefined };\n\n let previousUserSourceMapSetting: { client: UserSourceMapSetting; server: UserSourceMapSetting } = {\n client: undefined,\n server: undefined,\n };\n\n const nuxtSourceMap = nuxt.options.sourcemap;\n\n if (typeof nuxtSourceMap === 'string' || typeof nuxtSourceMap === 'boolean' || typeof nuxtSourceMap === 'undefined') {\n switch (nuxtSourceMap) {\n case false:\n warnExplicitlyDisabledSourceMap('sourcemap');\n previousUserSourceMapSetting = { client: 'disabled', server: 'disabled' };\n break;\n\n case 'hidden':\n case true:\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap', (nuxtSourceMap as true).toString());\n previousUserSourceMapSetting = { client: 'enabled', server: 'enabled' };\n break;\n case undefined:\n nuxt.options.sourcemap = { server: 'hidden', client: 'hidden' };\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting = { client: 'unset', server: 'unset' };\n break;\n }\n } else {\n if (nuxtSourceMap.client === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.client');\n previousUserSourceMapSetting.client = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.client)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.client', nuxtSourceMap.client.toString());\n previousUserSourceMapSetting.client = 'enabled';\n } else {\n nuxt.options.sourcemap.client = 'hidden';\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n previousUserSourceMapSetting.client = 'unset';\n }\n\n if (nuxtSourceMap.server === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.server');\n previousUserSourceMapSetting.server = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.server)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.server', nuxtSourceMap.server.toString());\n previousUserSourceMapSetting.server = 'enabled';\n } else {\n nuxt.options.sourcemap.server = 'hidden';\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting.server = 'unset';\n }\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** Logs warnings about potentially conflicting source map settings.\n * Configures `sourcemapExcludeSources` in Nitro to make source maps usable in Sentry.\n *\n * only exported for testing\n */\nexport function validateNitroSourceMapSettings(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting } } },\n nitroConfig: NitroConfig,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): void {\n const isDebug = sentryModuleOptions.debug;\n const nuxtSourceMap = extractNuxtSourceMapSetting(nuxt, 'server');\n\n // NITRO CONFIG ---\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: 'nitro.sourceMap',\n otherSettingValue: nitroConfig.sourceMap,\n });\n\n // ROLLUP CONFIG ---\n\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n const nitroRollupSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n // We don't override nitro.rollupConfig.output.sourcemap (undefined by default, but overrides all other server-side source map settings)\n if (typeof nitroRollupSourceMap !== 'undefined' && ['hidden', 'inline', true, false].includes(nitroRollupSourceMap)) {\n const settingKey = 'nitro.rollupConfig.output.sourcemap';\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: settingKey,\n otherSettingValue: nitroRollupSourceMap,\n });\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Set `sourcemapExcludeSources: false` in the Nuxt config (`nitro.rollupConfig.output`). Source maps will now include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n }\n}\n\nfunction validateDifferentSourceMapSettings({\n nuxtSettingKey,\n nuxtSettingValue,\n otherSettingKey,\n otherSettingValue,\n}: {\n nuxtSettingKey: string;\n nuxtSettingValue?: SourceMapSetting;\n otherSettingKey: string;\n otherSettingValue?: SourceMapSetting;\n}): void {\n if (nuxtSettingValue !== otherSettingValue) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation settings are conflicting. Sentry uses \\`${nuxtSettingKey}: ${nuxtSettingValue}\\`. However, a conflicting setting was discovered (\\`${otherSettingKey}: ${otherSettingValue}\\`). This setting was probably explicitly set in your configuration. Sentry won't override this setting but it may affect source maps generation and upload. Without source maps, code snippets on the Sentry Issues page will remain minified.`,\n );\n });\n }\n}\n\nfunction logKeepEnabledSourceMapSetting(\n sentryNuxtModuleOptions: SentryNuxtModuleOptions,\n settingKey: string,\n settingValue: string,\n): void {\n if (sentryNuxtModuleOptions.debug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] \\`${settingKey}\\` is enabled with \\`${settingValue}\\`. This will correctly un-minify the code snippet on the Sentry Issue Details page.`,\n );\n });\n }\n}\n\nfunction warnExplicitlyDisabledSourceMap(settingKey: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`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 });\n}\n\nfunction logSentryEnablesSourceMap(settingKey: string, settingValue: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Enabled source map generation in the build options with \\`${settingKey}: ${settingValue}\\`.`);\n });\n}\n"],"names":["consoleSandbox","sentryVitePlugin","sentryRollupPlugin"],"mappings":";;;;;;AAOA;AACA;AACA;;AAMA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F,EAAE,MAAM,OAAA,GAAU,aAAa,CAAC,KAAK;;AAErC,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAA,IAA2B,EAAE;AAC7E,EAAE,MAAM,iBAAA,GAAoB,uBAAuB,CAAC,OAAA,IAAW,IAAI;;AAEnE;AACA,EAAE,IAAI,yBAAA,GAA4B,EAAE,MAAM,EAAE,IAAI,E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A,UAAA,CAAA,0CAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;AACA;;AAEA,SAAA,yBAAA,CAAA,UAAA,EAAA,YAAA,EAAA;AACA,EAAAA,mBAAA,CAAA,MAAA;AACA;AACA,IAAA,OAAA,CAAA,GAAA,CAAA,CAAA,mEAAA,EAAA,UAAA,CAAA,EAAA,EAAA,YAAA,CAAA,GAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;;;;;"}
1
+ {"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import type { Nuxt } from '@nuxt/schema';\nimport { consoleSandbox } from '@sentry/core';\nimport { type SentryRollupPluginOptions, sentryRollupPlugin } from '@sentry/rollup-plugin';\nimport { type SentryVitePluginOptions, sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { NitroConfig } from 'nitropack';\nimport type { SentryNuxtModuleOptions } from '../common/types';\n\n/**\n * Whether the user enabled (true, 'hidden', 'inline') or disabled (false) source maps\n */\nexport type UserSourceMapSetting = 'enabled' | 'disabled' | 'unset' | undefined;\n\n/** A valid source map setting */\nexport type SourceMapSetting = boolean | 'hidden' | 'inline';\n\n/**\n * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).\n */\nexport function setupSourceMaps(moduleOptions: SentryNuxtModuleOptions, nuxt: Nuxt): void {\n // TODO(v11): remove deprecated options (also from SentryNuxtModuleOptions type)\n\n const isDebug = moduleOptions.debug;\n\n // eslint-disable-next-line deprecation/deprecation\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const sourceMapsEnabled =\n moduleOptions.sourcemaps?.disable === true\n ? false\n : moduleOptions.sourcemaps?.disable === false\n ? true\n : // eslint-disable-next-line deprecation/deprecation\n sourceMapsUploadOptions.enabled ?? true;\n\n // In case we overwrite the source map settings, we default to deleting the files\n let shouldDeleteFilesFallback = { client: true, server: true };\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n // Changing this setting will propagate:\n // - for client to viteConfig.build.sourceMap\n // - for server to viteConfig.build.sourceMap and nitro.sourceMap\n // On server, nitro.rollupConfig.output.sourcemap remains unaffected from this change.\n\n // ONLY THIS nuxt.sourcemap.(server/client) setting is the one Sentry will eventually overwrite with 'hidden'\n const previousSourceMapSettings = changeNuxtSourceMapSettings(nuxt, moduleOptions);\n\n shouldDeleteFilesFallback = {\n client: previousSourceMapSettings.client === 'unset',\n server: previousSourceMapSettings.server === 'unset',\n };\n\n if (\n isDebug &&\n !moduleOptions.sourcemaps?.filesToDeleteAfterUpload &&\n // eslint-disable-next-line deprecation/deprecation\n !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&\n (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)\n ) {\n consoleSandbox(() =>\n // eslint-disable-next-line no-console\n console.log(\n \"[Sentry] As Sentry enabled `'hidden'` source maps, source maps will be automatically deleted after uploading them to Sentry.\",\n ),\n );\n }\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const runtime = env.isServer ? 'server' : env.isClient ? 'client' : undefined;\n const nuxtSourceMapSetting = extractNuxtSourceMapSetting(nuxt, runtime);\n\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n // Vite source map options are the same as the Nuxt source map config options (unless overwritten)\n validateDifferentSourceMapSettings({\n nuxtSettingKey: `sourcemap.${runtime}`,\n nuxtSettingValue: nuxtSourceMapSetting,\n otherSettingKey: 'viteConfig.build.sourcemap',\n otherSettingValue: viteSourceMap,\n });\n\n if (isDebug) {\n consoleSandbox(() => {\n if (!runtime) {\n // eslint-disable-next-line no-console\n console.log(\"[Sentry] Cannot detect runtime (client/server) inside hook 'vite:extendConfig'.\");\n } else {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Adding Sentry Vite plugin to the ${runtime} runtime.`);\n }\n });\n }\n\n // Add Sentry plugin\n // Vite plugin is added on the client and server side (hook runs twice)\n // Nuxt client source map is 'false' by default. Warning about this will be shown already in an earlier step, and it's also documented that `nuxt.sourcemap.client` needs to be enabled.\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(sentryVitePlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)));\n }\n });\n\n nuxt.hook('nitro:config', (nitroConfig: NitroConfig) => {\n if (sourceMapsEnabled && !nitroConfig.dev) {\n if (!nitroConfig.rollupConfig) {\n nitroConfig.rollupConfig = {};\n }\n\n if (nitroConfig.rollupConfig.plugins === null || nitroConfig.rollupConfig.plugins === undefined) {\n nitroConfig.rollupConfig.plugins = [];\n } else if (!Array.isArray(nitroConfig.rollupConfig.plugins)) {\n // `rollupConfig.plugins` can be a single plugin, so we want to put it into an array so that we can push our own plugin\n nitroConfig.rollupConfig.plugins = [nitroConfig.rollupConfig.plugins];\n }\n\n validateNitroSourceMapSettings(nuxt, nitroConfig, moduleOptions);\n\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log('[Sentry] Adding Sentry Rollup plugin to the server runtime.');\n });\n }\n\n // Add Sentry plugin\n // Runs only on server-side (Nitro)\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)),\n );\n }\n });\n}\n\n/**\n * Normalizes the beginning of a path from e.g. ../../../ to ./\n */\nfunction normalizePath(path: string): string {\n return path.replace(/^(\\.\\.\\/)+/, './');\n}\n\n/**\n * Generates source maps upload options for the Sentry Vite and Rollup plugin.\n *\n * Only exported for Testing purposes.\n */\n// todo(v11): This \"eslint-disable\" can be removed again once we remove deprecated options.\n// eslint-disable-next-line complexity\nexport function getPluginOptions(\n moduleOptions: SentryNuxtModuleOptions,\n shouldDeleteFilesFallback?: { client: boolean; server: boolean },\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n // eslint-disable-next-line deprecation/deprecation\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;\n const fallbackFilesToDelete = [\n ...(shouldDeleteFilesFallback?.client ? ['.*/**/public/**/*.map'] : []),\n ...(shouldDeleteFilesFallback?.server\n ? ['.*/**/server/**/*.map', '.*/**/output/**/*.map', '.*/**/function/**/*.map']\n : []),\n ];\n\n // Check for filesToDeleteAfterUpload in new location first, then deprecated location\n const sourcemapsOptions = moduleOptions.sourcemaps || {};\n // eslint-disable-next-line deprecation/deprecation\n const deprecatedSourcemapsOptions = sourceMapsUploadOptions.sourcemaps || {};\n\n const filesToDeleteAfterUpload =\n sourcemapsOptions.filesToDeleteAfterUpload ??\n // eslint-disable-next-line deprecation/deprecation\n deprecatedSourcemapsOptions.filesToDeleteAfterUpload;\n\n if (typeof filesToDeleteAfterUpload === 'undefined' && shouldDeleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Setting \\`sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [${fallbackFilesToDelete\n // Logging it as strings in the array\n .map(path => `\"${path}\"`)\n .join(', ')}]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n });\n }\n\n return {\n // eslint-disable-next-line deprecation/deprecation\n org: moduleOptions.org ?? sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,\n // eslint-disable-next-line deprecation/deprecation\n project: moduleOptions.project ?? sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,\n // eslint-disable-next-line deprecation/deprecation\n authToken: moduleOptions.authToken ?? sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n // eslint-disable-next-line deprecation/deprecation\n telemetry: moduleOptions.telemetry ?? sourceMapsUploadOptions.telemetry ?? true,\n // eslint-disable-next-line deprecation/deprecation\n url: moduleOptions.sentryUrl ?? sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,\n headers: moduleOptions.headers,\n debug: moduleOptions.debug ?? false,\n // eslint-disable-next-line deprecation/deprecation\n silent: moduleOptions.silent ?? sourceMapsUploadOptions.silent ?? false,\n // eslint-disable-next-line deprecation/deprecation\n errorHandler: moduleOptions.errorHandler ?? sourceMapsUploadOptions.errorHandler,\n bundleSizeOptimizations: moduleOptions.bundleSizeOptimizations, // todo: test if this can be overridden by the user\n release: {\n // eslint-disable-next-line deprecation/deprecation\n name: moduleOptions.release?.name ?? sourceMapsUploadOptions.release?.name,\n // Support all release options from BuildTimeOptionsBase\n ...moduleOptions.release,\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'nuxt',\n },\n },\n ...moduleOptions?.unstable_sentryBundlerPluginOptions,\n\n sourcemaps: {\n disable: moduleOptions.sourcemaps?.disable,\n // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')\n // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).\n // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],\n // eslint-disable-next-line deprecation/deprecation\n assets: sourcemapsOptions.assets ?? deprecatedSourcemapsOptions.assets ?? undefined,\n // eslint-disable-next-line deprecation/deprecation\n ignore: sourcemapsOptions.ignore ?? deprecatedSourcemapsOptions.ignore ?? undefined,\n filesToDeleteAfterUpload: filesToDeleteAfterUpload\n ? filesToDeleteAfterUpload\n : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client\n ? fallbackFilesToDelete\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are multiple ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993 and https://github.com/getsentry/sentry-javascript/pull/15859)\n 1. User explicitly disabled source maps\n - keep this setting (emit a warning that errors won't be unminified in Sentry)\n - We will not upload anything\n 2. users enabled source map generation (true, hidden, inline).\n - keep this setting (don't do anything - like deletion - besides uploading)\n 3. users did not 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 Users only have to explicitly enable client source maps. Sentry only overwrites the base Nuxt source map settings as they propagate.\n */\n\n/** only exported for tests */\nexport function extractNuxtSourceMapSetting(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting; client?: SourceMapSetting } } },\n runtime: 'client' | 'server' | undefined,\n): SourceMapSetting | undefined {\n if (!runtime) {\n return undefined;\n } else {\n return typeof nuxt.options?.sourcemap === 'boolean' || typeof nuxt.options?.sourcemap === 'string'\n ? nuxt.options.sourcemap\n : nuxt.options?.sourcemap?.[runtime];\n }\n}\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options.sourcemap = nuxt.options.sourcemap ?? { server: undefined, client: undefined };\n\n let previousUserSourceMapSetting: { client: UserSourceMapSetting; server: UserSourceMapSetting } = {\n client: undefined,\n server: undefined,\n };\n\n const nuxtSourceMap = nuxt.options.sourcemap;\n\n if (typeof nuxtSourceMap === 'string' || typeof nuxtSourceMap === 'boolean' || typeof nuxtSourceMap === 'undefined') {\n switch (nuxtSourceMap) {\n case false:\n warnExplicitlyDisabledSourceMap('sourcemap');\n previousUserSourceMapSetting = { client: 'disabled', server: 'disabled' };\n break;\n\n case 'hidden':\n case true:\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap', (nuxtSourceMap as true).toString());\n previousUserSourceMapSetting = { client: 'enabled', server: 'enabled' };\n break;\n case undefined:\n nuxt.options.sourcemap = { server: 'hidden', client: 'hidden' };\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting = { client: 'unset', server: 'unset' };\n break;\n }\n } else {\n if (nuxtSourceMap.client === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.client');\n previousUserSourceMapSetting.client = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.client)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.client', nuxtSourceMap.client.toString());\n previousUserSourceMapSetting.client = 'enabled';\n } else {\n nuxt.options.sourcemap.client = 'hidden';\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n previousUserSourceMapSetting.client = 'unset';\n }\n\n if (nuxtSourceMap.server === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.server');\n previousUserSourceMapSetting.server = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.server)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.server', nuxtSourceMap.server.toString());\n previousUserSourceMapSetting.server = 'enabled';\n } else {\n nuxt.options.sourcemap.server = 'hidden';\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting.server = 'unset';\n }\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** Logs warnings about potentially conflicting source map settings.\n * Configures `sourcemapExcludeSources` in Nitro to make source maps usable in Sentry.\n *\n * only exported for testing\n */\nexport function validateNitroSourceMapSettings(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting } } },\n nitroConfig: NitroConfig,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): void {\n const isDebug = sentryModuleOptions.debug;\n const nuxtSourceMap = extractNuxtSourceMapSetting(nuxt, 'server');\n\n // NITRO CONFIG ---\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: 'nitro.sourceMap',\n otherSettingValue: nitroConfig.sourceMap,\n });\n\n // ROLLUP CONFIG ---\n\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n const nitroRollupSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n // We don't override nitro.rollupConfig.output.sourcemap (undefined by default, but overrides all other server-side source map settings)\n if (typeof nitroRollupSourceMap !== 'undefined' && ['hidden', 'inline', true, false].includes(nitroRollupSourceMap)) {\n const settingKey = 'nitro.rollupConfig.output.sourcemap';\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: settingKey,\n otherSettingValue: nitroRollupSourceMap,\n });\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Set `sourcemapExcludeSources: false` in the Nuxt config (`nitro.rollupConfig.output`). Source maps will now include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n }\n}\n\nfunction validateDifferentSourceMapSettings({\n nuxtSettingKey,\n nuxtSettingValue,\n otherSettingKey,\n otherSettingValue,\n}: {\n nuxtSettingKey: string;\n nuxtSettingValue?: SourceMapSetting;\n otherSettingKey: string;\n otherSettingValue?: SourceMapSetting;\n}): void {\n if (nuxtSettingValue !== otherSettingValue) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation settings are conflicting. Sentry uses \\`${nuxtSettingKey}: ${nuxtSettingValue}\\`. However, a conflicting setting was discovered (\\`${otherSettingKey}: ${otherSettingValue}\\`). This setting was probably explicitly set in your configuration. Sentry won't override this setting but it may affect source maps generation and upload. Without source maps, code snippets on the Sentry Issues page will remain minified.`,\n );\n });\n }\n}\n\nfunction logKeepEnabledSourceMapSetting(\n sentryNuxtModuleOptions: SentryNuxtModuleOptions,\n settingKey: string,\n settingValue: string,\n): void {\n if (sentryNuxtModuleOptions.debug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] \\`${settingKey}\\` is enabled with \\`${settingValue}\\`. This will correctly un-minify the code snippet on the Sentry Issue Details page.`,\n );\n });\n }\n}\n\nfunction warnExplicitlyDisabledSourceMap(settingKey: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`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 });\n}\n\nfunction logSentryEnablesSourceMap(settingKey: string, settingValue: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Enabled source map generation in the build options with \\`${settingKey}: ${settingValue}\\`.`);\n });\n}\n"],"names":["consoleSandbox","sentryVitePlugin","sentryRollupPlugin"],"mappings":";;;;;;AAOA;AACA;AACA;;AAMA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F;;AAEA,EAAE,MAAM,OAAA,GAAU,aAAa,CAAC,KAAK;;AAErC;AACA,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAA,IAA2B,EAAE;;AAE7E,EAAE,MAAM,iBAAA;AACR,IAAI,aAAa,CAAC,UAAU,EAAE,YAAY;AAC1C,QAAQ;AACR,QAAQ,aAAa,CAAC,UAAU,EAAE,YAAY;AAC9C,UAAU;AACV;AACA,UAAU,uBAAuB,CAAC,OAAA,IAAW,IAAI;;AAEjD;AACA,EAAE,IAAI,yBAAA,GAA4B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAA,EAAM;;AAEhE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM;AAClC,IAAI,IAAI,iBAAA,IAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;AAChD;AACA;AACA;AACA;;AAEA;AACA,MAAM,MAAM,4BAA4B,2BA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AA,8BAAA;AACA,EAAA,uBAAA;AACA,EAAA,UAAA;AACA,EAAA,YAAA;AACA,EAAA;AACA,EAAA,IAAA,uBAAA,CAAA,KAAA,EAAA;AACA,IAAAA,mBAAA,CAAA,MAAA;AACA;AACA,MAAA,OAAA,CAAA,GAAA;AACA,QAAA,CAAA,WAAA,EAAA,UAAA,CAAA,qBAAA,EAAA,YAAA,CAAA,oFAAA,CAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA;AACA;;AAEA,SAAA,+BAAA,CAAA,UAAA,EAAA;AACA,EAAAA,mBAAA,CAAA,MAAA;AACA;AACA,IAAA,OAAA,CAAA,IAAA;AACA,MAAA,CAAA,yBAAA,EAAA,UAAA,CAAA,sRAAA,EAAA,UAAA,CAAA,0CAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;AACA;;AAEA,SAAA,yBAAA,CAAA,UAAA,EAAA,YAAA,EAAA;AACA,EAAAA,mBAAA,CAAA,MAAA;AACA;AACA,IAAA,OAAA,CAAA,GAAA,CAAA,CAAA,mEAAA,EAAA,UAAA,CAAA,EAAA,EAAA,YAAA,CAAA,GAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"10.0.0-beta.0"}
1
+ {"type":"module","version":"10.1.0"}
@@ -10,10 +10,20 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
10
10
  * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).
11
11
  */
12
12
  function setupSourceMaps(moduleOptions, nuxt) {
13
+ // TODO(v11): remove deprecated options (also from SentryNuxtModuleOptions type)
14
+
13
15
  const isDebug = moduleOptions.debug;
14
16
 
17
+ // eslint-disable-next-line deprecation/deprecation
15
18
  const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};
16
- const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;
19
+
20
+ const sourceMapsEnabled =
21
+ moduleOptions.sourcemaps?.disable === true
22
+ ? false
23
+ : moduleOptions.sourcemaps?.disable === false
24
+ ? true
25
+ : // eslint-disable-next-line deprecation/deprecation
26
+ sourceMapsUploadOptions.enabled ?? true;
17
27
 
18
28
  // In case we overwrite the source map settings, we default to deleting the files
19
29
  let shouldDeleteFilesFallback = { client: true, server: true };
@@ -35,6 +45,8 @@ function setupSourceMaps(moduleOptions, nuxt) {
35
45
 
36
46
  if (
37
47
  isDebug &&
48
+ !moduleOptions.sourcemaps?.filesToDeleteAfterUpload &&
49
+ // eslint-disable-next-line deprecation/deprecation
38
50
  !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&
39
51
  (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)
40
52
  ) {
@@ -127,10 +139,13 @@ function normalizePath(path) {
127
139
  *
128
140
  * Only exported for Testing purposes.
129
141
  */
142
+ // todo(v11): This "eslint-disable" can be removed again once we remove deprecated options.
143
+ // eslint-disable-next-line complexity
130
144
  function getPluginOptions(
131
145
  moduleOptions,
132
146
  shouldDeleteFilesFallback,
133
147
  ) {
148
+ // eslint-disable-next-line deprecation/deprecation
134
149
  const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};
135
150
 
136
151
  const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;
@@ -141,10 +156,17 @@ function getPluginOptions(
141
156
  : []),
142
157
  ];
143
158
 
144
- if (
145
- typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&
146
- shouldDeleteFilesAfterUpload
147
- ) {
159
+ // Check for filesToDeleteAfterUpload in new location first, then deprecated location
160
+ const sourcemapsOptions = moduleOptions.sourcemaps || {};
161
+ // eslint-disable-next-line deprecation/deprecation
162
+ const deprecatedSourcemapsOptions = sourceMapsUploadOptions.sourcemaps || {};
163
+
164
+ const filesToDeleteAfterUpload =
165
+ sourcemapsOptions.filesToDeleteAfterUpload ??
166
+ // eslint-disable-next-line deprecation/deprecation
167
+ deprecatedSourcemapsOptions.filesToDeleteAfterUpload;
168
+
169
+ if (typeof filesToDeleteAfterUpload === 'undefined' && shouldDeleteFilesAfterUpload) {
148
170
  consoleSandbox(() => {
149
171
  // eslint-disable-next-line no-console
150
172
  console.log(
@@ -157,16 +179,28 @@ function getPluginOptions(
157
179
  }
158
180
 
159
181
  return {
160
- org: sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
161
- project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
162
- authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
163
- telemetry: sourceMapsUploadOptions.telemetry ?? true,
164
- url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
182
+ // eslint-disable-next-line deprecation/deprecation
183
+ org: moduleOptions.org ?? sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
184
+ // eslint-disable-next-line deprecation/deprecation
185
+ project: moduleOptions.project ?? sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
186
+ // eslint-disable-next-line deprecation/deprecation
187
+ authToken: moduleOptions.authToken ?? sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
188
+ // eslint-disable-next-line deprecation/deprecation
189
+ telemetry: moduleOptions.telemetry ?? sourceMapsUploadOptions.telemetry ?? true,
190
+ // eslint-disable-next-line deprecation/deprecation
191
+ url: moduleOptions.sentryUrl ?? sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
192
+ headers: moduleOptions.headers,
165
193
  debug: moduleOptions.debug ?? false,
166
- silent: sourceMapsUploadOptions.silent ?? false,
167
- errorHandler: sourceMapsUploadOptions.errorHandler,
194
+ // eslint-disable-next-line deprecation/deprecation
195
+ silent: moduleOptions.silent ?? sourceMapsUploadOptions.silent ?? false,
196
+ // eslint-disable-next-line deprecation/deprecation
197
+ errorHandler: moduleOptions.errorHandler ?? sourceMapsUploadOptions.errorHandler,
198
+ bundleSizeOptimizations: moduleOptions.bundleSizeOptimizations, // todo: test if this can be overridden by the user
168
199
  release: {
169
- name: sourceMapsUploadOptions.release?.name,
200
+ // eslint-disable-next-line deprecation/deprecation
201
+ name: moduleOptions.release?.name ?? sourceMapsUploadOptions.release?.name,
202
+ // Support all release options from BuildTimeOptionsBase
203
+ ...moduleOptions.release,
170
204
  ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,
171
205
  },
172
206
  _metaOptions: {
@@ -177,13 +211,16 @@ function getPluginOptions(
177
211
  ...moduleOptions?.unstable_sentryBundlerPluginOptions,
178
212
 
179
213
  sourcemaps: {
214
+ disable: moduleOptions.sourcemaps?.disable,
180
215
  // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')
181
216
  // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).
182
217
  // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],
183
- assets: sourceMapsUploadOptions.sourcemaps?.assets ?? undefined,
184
- ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? undefined,
185
- filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload
186
- ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload
218
+ // eslint-disable-next-line deprecation/deprecation
219
+ assets: sourcemapsOptions.assets ?? deprecatedSourcemapsOptions.assets ?? undefined,
220
+ // eslint-disable-next-line deprecation/deprecation
221
+ ignore: sourcemapsOptions.ignore ?? deprecatedSourcemapsOptions.ignore ?? undefined,
222
+ filesToDeleteAfterUpload: filesToDeleteAfterUpload
223
+ ? filesToDeleteAfterUpload
187
224
  : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client
188
225
  ? fallbackFilesToDelete
189
226
  : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import type { Nuxt } from '@nuxt/schema';\nimport { consoleSandbox } from '@sentry/core';\nimport { type SentryRollupPluginOptions, sentryRollupPlugin } from '@sentry/rollup-plugin';\nimport { type SentryVitePluginOptions, sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { NitroConfig } from 'nitropack';\nimport type { SentryNuxtModuleOptions } from '../common/types';\n\n/**\n * Whether the user enabled (true, 'hidden', 'inline') or disabled (false) source maps\n */\nexport type UserSourceMapSetting = 'enabled' | 'disabled' | 'unset' | undefined;\n\n/** A valid source map setting */\nexport type SourceMapSetting = boolean | 'hidden' | 'inline';\n\n/**\n * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).\n */\nexport function setupSourceMaps(moduleOptions: SentryNuxtModuleOptions, nuxt: Nuxt): void {\n const isDebug = moduleOptions.debug;\n\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n // In case we overwrite the source map settings, we default to deleting the files\n let shouldDeleteFilesFallback = { client: true, server: true };\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n // Changing this setting will propagate:\n // - for client to viteConfig.build.sourceMap\n // - for server to viteConfig.build.sourceMap and nitro.sourceMap\n // On server, nitro.rollupConfig.output.sourcemap remains unaffected from this change.\n\n // ONLY THIS nuxt.sourcemap.(server/client) setting is the one Sentry will eventually overwrite with 'hidden'\n const previousSourceMapSettings = changeNuxtSourceMapSettings(nuxt, moduleOptions);\n\n shouldDeleteFilesFallback = {\n client: previousSourceMapSettings.client === 'unset',\n server: previousSourceMapSettings.server === 'unset',\n };\n\n if (\n isDebug &&\n !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&\n (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)\n ) {\n consoleSandbox(() =>\n // eslint-disable-next-line no-console\n console.log(\n \"[Sentry] As Sentry enabled `'hidden'` source maps, source maps will be automatically deleted after uploading them to Sentry.\",\n ),\n );\n }\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const runtime = env.isServer ? 'server' : env.isClient ? 'client' : undefined;\n const nuxtSourceMapSetting = extractNuxtSourceMapSetting(nuxt, runtime);\n\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n // Vite source map options are the same as the Nuxt source map config options (unless overwritten)\n validateDifferentSourceMapSettings({\n nuxtSettingKey: `sourcemap.${runtime}`,\n nuxtSettingValue: nuxtSourceMapSetting,\n otherSettingKey: 'viteConfig.build.sourcemap',\n otherSettingValue: viteSourceMap,\n });\n\n if (isDebug) {\n consoleSandbox(() => {\n if (!runtime) {\n // eslint-disable-next-line no-console\n console.log(\"[Sentry] Cannot detect runtime (client/server) inside hook 'vite:extendConfig'.\");\n } else {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Adding Sentry Vite plugin to the ${runtime} runtime.`);\n }\n });\n }\n\n // Add Sentry plugin\n // Vite plugin is added on the client and server side (hook runs twice)\n // Nuxt client source map is 'false' by default. Warning about this will be shown already in an earlier step, and it's also documented that `nuxt.sourcemap.client` needs to be enabled.\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(sentryVitePlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)));\n }\n });\n\n nuxt.hook('nitro:config', (nitroConfig: NitroConfig) => {\n if (sourceMapsEnabled && !nitroConfig.dev) {\n if (!nitroConfig.rollupConfig) {\n nitroConfig.rollupConfig = {};\n }\n\n if (nitroConfig.rollupConfig.plugins === null || nitroConfig.rollupConfig.plugins === undefined) {\n nitroConfig.rollupConfig.plugins = [];\n } else if (!Array.isArray(nitroConfig.rollupConfig.plugins)) {\n // `rollupConfig.plugins` can be a single plugin, so we want to put it into an array so that we can push our own plugin\n nitroConfig.rollupConfig.plugins = [nitroConfig.rollupConfig.plugins];\n }\n\n validateNitroSourceMapSettings(nuxt, nitroConfig, moduleOptions);\n\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log('[Sentry] Adding Sentry Rollup plugin to the server runtime.');\n });\n }\n\n // Add Sentry plugin\n // Runs only on server-side (Nitro)\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)),\n );\n }\n });\n}\n\n/**\n * Normalizes the beginning of a path from e.g. ../../../ to ./\n */\nfunction normalizePath(path: string): string {\n return path.replace(/^(\\.\\.\\/)+/, './');\n}\n\n/**\n * Generates source maps upload options for the Sentry Vite and Rollup plugin.\n *\n * Only exported for Testing purposes.\n */\nexport function getPluginOptions(\n moduleOptions: SentryNuxtModuleOptions,\n shouldDeleteFilesFallback?: { client: boolean; server: boolean },\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;\n const fallbackFilesToDelete = [\n ...(shouldDeleteFilesFallback?.client ? ['.*/**/public/**/*.map'] : []),\n ...(shouldDeleteFilesFallback?.server\n ? ['.*/**/server/**/*.map', '.*/**/output/**/*.map', '.*/**/function/**/*.map']\n : []),\n ];\n\n if (\n typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n shouldDeleteFilesAfterUpload\n ) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Setting \\`sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [${fallbackFilesToDelete\n // Logging it as strings in the array\n .map(path => `\"${path}\"`)\n .join(', ')}]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n });\n }\n\n return {\n org: sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,\n project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,\n authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n telemetry: sourceMapsUploadOptions.telemetry ?? true,\n url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,\n debug: moduleOptions.debug ?? false,\n silent: sourceMapsUploadOptions.silent ?? false,\n errorHandler: sourceMapsUploadOptions.errorHandler,\n release: {\n name: sourceMapsUploadOptions.release?.name,\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'nuxt',\n },\n },\n ...moduleOptions?.unstable_sentryBundlerPluginOptions,\n\n sourcemaps: {\n // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')\n // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).\n // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],\n assets: sourceMapsUploadOptions.sourcemaps?.assets ?? undefined,\n ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? undefined,\n filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload\n ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload\n : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client\n ? fallbackFilesToDelete\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are multiple ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993 and https://github.com/getsentry/sentry-javascript/pull/15859)\n 1. User explicitly disabled source maps\n - keep this setting (emit a warning that errors won't be unminified in Sentry)\n - We will not upload anything\n 2. users enabled source map generation (true, hidden, inline).\n - keep this setting (don't do anything - like deletion - besides uploading)\n 3. users did not 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 Users only have to explicitly enable client source maps. Sentry only overwrites the base Nuxt source map settings as they propagate.\n */\n\n/** only exported for tests */\nexport function extractNuxtSourceMapSetting(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting; client?: SourceMapSetting } } },\n runtime: 'client' | 'server' | undefined,\n): SourceMapSetting | undefined {\n if (!runtime) {\n return undefined;\n } else {\n return typeof nuxt.options?.sourcemap === 'boolean' || typeof nuxt.options?.sourcemap === 'string'\n ? nuxt.options.sourcemap\n : nuxt.options?.sourcemap?.[runtime];\n }\n}\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options.sourcemap = nuxt.options.sourcemap ?? { server: undefined, client: undefined };\n\n let previousUserSourceMapSetting: { client: UserSourceMapSetting; server: UserSourceMapSetting } = {\n client: undefined,\n server: undefined,\n };\n\n const nuxtSourceMap = nuxt.options.sourcemap;\n\n if (typeof nuxtSourceMap === 'string' || typeof nuxtSourceMap === 'boolean' || typeof nuxtSourceMap === 'undefined') {\n switch (nuxtSourceMap) {\n case false:\n warnExplicitlyDisabledSourceMap('sourcemap');\n previousUserSourceMapSetting = { client: 'disabled', server: 'disabled' };\n break;\n\n case 'hidden':\n case true:\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap', (nuxtSourceMap as true).toString());\n previousUserSourceMapSetting = { client: 'enabled', server: 'enabled' };\n break;\n case undefined:\n nuxt.options.sourcemap = { server: 'hidden', client: 'hidden' };\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting = { client: 'unset', server: 'unset' };\n break;\n }\n } else {\n if (nuxtSourceMap.client === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.client');\n previousUserSourceMapSetting.client = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.client)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.client', nuxtSourceMap.client.toString());\n previousUserSourceMapSetting.client = 'enabled';\n } else {\n nuxt.options.sourcemap.client = 'hidden';\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n previousUserSourceMapSetting.client = 'unset';\n }\n\n if (nuxtSourceMap.server === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.server');\n previousUserSourceMapSetting.server = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.server)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.server', nuxtSourceMap.server.toString());\n previousUserSourceMapSetting.server = 'enabled';\n } else {\n nuxt.options.sourcemap.server = 'hidden';\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting.server = 'unset';\n }\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** Logs warnings about potentially conflicting source map settings.\n * Configures `sourcemapExcludeSources` in Nitro to make source maps usable in Sentry.\n *\n * only exported for testing\n */\nexport function validateNitroSourceMapSettings(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting } } },\n nitroConfig: NitroConfig,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): void {\n const isDebug = sentryModuleOptions.debug;\n const nuxtSourceMap = extractNuxtSourceMapSetting(nuxt, 'server');\n\n // NITRO CONFIG ---\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: 'nitro.sourceMap',\n otherSettingValue: nitroConfig.sourceMap,\n });\n\n // ROLLUP CONFIG ---\n\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n const nitroRollupSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n // We don't override nitro.rollupConfig.output.sourcemap (undefined by default, but overrides all other server-side source map settings)\n if (typeof nitroRollupSourceMap !== 'undefined' && ['hidden', 'inline', true, false].includes(nitroRollupSourceMap)) {\n const settingKey = 'nitro.rollupConfig.output.sourcemap';\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: settingKey,\n otherSettingValue: nitroRollupSourceMap,\n });\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Set `sourcemapExcludeSources: false` in the Nuxt config (`nitro.rollupConfig.output`). Source maps will now include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n }\n}\n\nfunction validateDifferentSourceMapSettings({\n nuxtSettingKey,\n nuxtSettingValue,\n otherSettingKey,\n otherSettingValue,\n}: {\n nuxtSettingKey: string;\n nuxtSettingValue?: SourceMapSetting;\n otherSettingKey: string;\n otherSettingValue?: SourceMapSetting;\n}): void {\n if (nuxtSettingValue !== otherSettingValue) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation settings are conflicting. Sentry uses \\`${nuxtSettingKey}: ${nuxtSettingValue}\\`. However, a conflicting setting was discovered (\\`${otherSettingKey}: ${otherSettingValue}\\`). This setting was probably explicitly set in your configuration. Sentry won't override this setting but it may affect source maps generation and upload. Without source maps, code snippets on the Sentry Issues page will remain minified.`,\n );\n });\n }\n}\n\nfunction logKeepEnabledSourceMapSetting(\n sentryNuxtModuleOptions: SentryNuxtModuleOptions,\n settingKey: string,\n settingValue: string,\n): void {\n if (sentryNuxtModuleOptions.debug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] \\`${settingKey}\\` is enabled with \\`${settingValue}\\`. This will correctly un-minify the code snippet on the Sentry Issue Details page.`,\n );\n });\n }\n}\n\nfunction warnExplicitlyDisabledSourceMap(settingKey: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`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 });\n}\n\nfunction logSentryEnablesSourceMap(settingKey: string, settingValue: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Enabled source map generation in the build options with \\`${settingKey}: ${settingValue}\\`.`);\n });\n}\n"],"names":[],"mappings":";;;;AAOA;AACA;AACA;;AAMA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F,EAAE,MAAM,OAAA,GAAU,aAAa,CAAC,KAAK;;AAErC,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAA,IAA2B,EAAE;AAC7E,EAAE,MAAM,iBAAA,GAAoB,uBAAuB,CAAC,OAAA,IAAW,IAAI;;AAEnE;AACA,EAAE,IAAI,yBAAA,GAA4B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAA,EAAM;;AAEhE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM;AAClC,IAAI,IAAI,iBAAA,IAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;AAChD;AACA;AACA;AACA;;AAEA;AACA,MAAM,MAAM,4BAA4B,2BAA2B,CAAC,IAAI,EAAE,aAAa,CAAC;;AAExF,MAAM,4BAA4B;AAClC,QAAQ,MAAM,EAAE,yBAAyB,CAAC,MAAA,KAAW,OAAO;AAC5D,QAAQ,MAAM,EAAE,yBAAyB,CAAC,MAAA,KAAW,OAAO;AAC5D,OAAO;;AAEP,MAAM;AACN,QAAQ,OAAA;AACR,QAAQ,CAAC,uBAAuB,CAAC,UAAU,EAAE,wBAAA;AAC7C,SAAS,yBAAyB,CAAC,UAAU,yBAAyB,CAAC,MAAM;AAC7E,QAAQ;AACR,QAAQ,cAA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A,CAAA,IAAA;AACA,QAAA,CAAA,uEAAA,EAAA,cAAA,CAAA,EAAA,EAAA,gBAAA,CAAA,qDAAA,EAAA,eAAA,CAAA,EAAA,EAAA,iBAAA,CAAA,+OAAA,CAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA;AACA;;AAEA,SAAA,8BAAA;AACA,EAAA,uBAAA;AACA,EAAA,UAAA;AACA,EAAA,YAAA;AACA,EAAA;AACA,EAAA,IAAA,uBAAA,CAAA,KAAA,EAAA;AACA,IAAA,cAAA,CAAA,MAAA;AACA;AACA,MAAA,OAAA,CAAA,GAAA;AACA,QAAA,CAAA,WAAA,EAAA,UAAA,CAAA,qBAAA,EAAA,YAAA,CAAA,oFAAA,CAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA;AACA;;AAEA,SAAA,+BAAA,CAAA,UAAA,EAAA;AACA,EAAA,cAAA,CAAA,MAAA;AACA;AACA,IAAA,OAAA,CAAA,IAAA;AACA,MAAA,CAAA,yBAAA,EAAA,UAAA,CAAA,sRAAA,EAAA,UAAA,CAAA,0CAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;AACA;;AAEA,SAAA,yBAAA,CAAA,UAAA,EAAA,YAAA,EAAA;AACA,EAAA,cAAA,CAAA,MAAA;AACA;AACA,IAAA,OAAA,CAAA,GAAA,CAAA,CAAA,mEAAA,EAAA,UAAA,CAAA,EAAA,EAAA,YAAA,CAAA,GAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"}
1
+ {"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import type { Nuxt } from '@nuxt/schema';\nimport { consoleSandbox } from '@sentry/core';\nimport { type SentryRollupPluginOptions, sentryRollupPlugin } from '@sentry/rollup-plugin';\nimport { type SentryVitePluginOptions, sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { NitroConfig } from 'nitropack';\nimport type { SentryNuxtModuleOptions } from '../common/types';\n\n/**\n * Whether the user enabled (true, 'hidden', 'inline') or disabled (false) source maps\n */\nexport type UserSourceMapSetting = 'enabled' | 'disabled' | 'unset' | undefined;\n\n/** A valid source map setting */\nexport type SourceMapSetting = boolean | 'hidden' | 'inline';\n\n/**\n * Setup source maps for Sentry inside the Nuxt module during build time (in Vite for Nuxt and Rollup for Nitro).\n */\nexport function setupSourceMaps(moduleOptions: SentryNuxtModuleOptions, nuxt: Nuxt): void {\n // TODO(v11): remove deprecated options (also from SentryNuxtModuleOptions type)\n\n const isDebug = moduleOptions.debug;\n\n // eslint-disable-next-line deprecation/deprecation\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const sourceMapsEnabled =\n moduleOptions.sourcemaps?.disable === true\n ? false\n : moduleOptions.sourcemaps?.disable === false\n ? true\n : // eslint-disable-next-line deprecation/deprecation\n sourceMapsUploadOptions.enabled ?? true;\n\n // In case we overwrite the source map settings, we default to deleting the files\n let shouldDeleteFilesFallback = { client: true, server: true };\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n // Changing this setting will propagate:\n // - for client to viteConfig.build.sourceMap\n // - for server to viteConfig.build.sourceMap and nitro.sourceMap\n // On server, nitro.rollupConfig.output.sourcemap remains unaffected from this change.\n\n // ONLY THIS nuxt.sourcemap.(server/client) setting is the one Sentry will eventually overwrite with 'hidden'\n const previousSourceMapSettings = changeNuxtSourceMapSettings(nuxt, moduleOptions);\n\n shouldDeleteFilesFallback = {\n client: previousSourceMapSettings.client === 'unset',\n server: previousSourceMapSettings.server === 'unset',\n };\n\n if (\n isDebug &&\n !moduleOptions.sourcemaps?.filesToDeleteAfterUpload &&\n // eslint-disable-next-line deprecation/deprecation\n !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload &&\n (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)\n ) {\n consoleSandbox(() =>\n // eslint-disable-next-line no-console\n console.log(\n \"[Sentry] As Sentry enabled `'hidden'` source maps, source maps will be automatically deleted after uploading them to Sentry.\",\n ),\n );\n }\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const runtime = env.isServer ? 'server' : env.isClient ? 'client' : undefined;\n const nuxtSourceMapSetting = extractNuxtSourceMapSetting(nuxt, runtime);\n\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n // Vite source map options are the same as the Nuxt source map config options (unless overwritten)\n validateDifferentSourceMapSettings({\n nuxtSettingKey: `sourcemap.${runtime}`,\n nuxtSettingValue: nuxtSourceMapSetting,\n otherSettingKey: 'viteConfig.build.sourcemap',\n otherSettingValue: viteSourceMap,\n });\n\n if (isDebug) {\n consoleSandbox(() => {\n if (!runtime) {\n // eslint-disable-next-line no-console\n console.log(\"[Sentry] Cannot detect runtime (client/server) inside hook 'vite:extendConfig'.\");\n } else {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Adding Sentry Vite plugin to the ${runtime} runtime.`);\n }\n });\n }\n\n // Add Sentry plugin\n // Vite plugin is added on the client and server side (hook runs twice)\n // Nuxt client source map is 'false' by default. Warning about this will be shown already in an earlier step, and it's also documented that `nuxt.sourcemap.client` needs to be enabled.\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(sentryVitePlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)));\n }\n });\n\n nuxt.hook('nitro:config', (nitroConfig: NitroConfig) => {\n if (sourceMapsEnabled && !nitroConfig.dev) {\n if (!nitroConfig.rollupConfig) {\n nitroConfig.rollupConfig = {};\n }\n\n if (nitroConfig.rollupConfig.plugins === null || nitroConfig.rollupConfig.plugins === undefined) {\n nitroConfig.rollupConfig.plugins = [];\n } else if (!Array.isArray(nitroConfig.rollupConfig.plugins)) {\n // `rollupConfig.plugins` can be a single plugin, so we want to put it into an array so that we can push our own plugin\n nitroConfig.rollupConfig.plugins = [nitroConfig.rollupConfig.plugins];\n }\n\n validateNitroSourceMapSettings(nuxt, nitroConfig, moduleOptions);\n\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log('[Sentry] Adding Sentry Rollup plugin to the server runtime.');\n });\n }\n\n // Add Sentry plugin\n // Runs only on server-side (Nitro)\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, shouldDeleteFilesFallback)),\n );\n }\n });\n}\n\n/**\n * Normalizes the beginning of a path from e.g. ../../../ to ./\n */\nfunction normalizePath(path: string): string {\n return path.replace(/^(\\.\\.\\/)+/, './');\n}\n\n/**\n * Generates source maps upload options for the Sentry Vite and Rollup plugin.\n *\n * Only exported for Testing purposes.\n */\n// todo(v11): This \"eslint-disable\" can be removed again once we remove deprecated options.\n// eslint-disable-next-line complexity\nexport function getPluginOptions(\n moduleOptions: SentryNuxtModuleOptions,\n shouldDeleteFilesFallback?: { client: boolean; server: boolean },\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n // eslint-disable-next-line deprecation/deprecation\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n const shouldDeleteFilesAfterUpload = shouldDeleteFilesFallback?.client || shouldDeleteFilesFallback?.server;\n const fallbackFilesToDelete = [\n ...(shouldDeleteFilesFallback?.client ? ['.*/**/public/**/*.map'] : []),\n ...(shouldDeleteFilesFallback?.server\n ? ['.*/**/server/**/*.map', '.*/**/output/**/*.map', '.*/**/function/**/*.map']\n : []),\n ];\n\n // Check for filesToDeleteAfterUpload in new location first, then deprecated location\n const sourcemapsOptions = moduleOptions.sourcemaps || {};\n // eslint-disable-next-line deprecation/deprecation\n const deprecatedSourcemapsOptions = sourceMapsUploadOptions.sourcemaps || {};\n\n const filesToDeleteAfterUpload =\n sourcemapsOptions.filesToDeleteAfterUpload ??\n // eslint-disable-next-line deprecation/deprecation\n deprecatedSourcemapsOptions.filesToDeleteAfterUpload;\n\n if (typeof filesToDeleteAfterUpload === 'undefined' && shouldDeleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Setting \\`sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [${fallbackFilesToDelete\n // Logging it as strings in the array\n .map(path => `\"${path}\"`)\n .join(', ')}]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n });\n }\n\n return {\n // eslint-disable-next-line deprecation/deprecation\n org: moduleOptions.org ?? sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,\n // eslint-disable-next-line deprecation/deprecation\n project: moduleOptions.project ?? sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,\n // eslint-disable-next-line deprecation/deprecation\n authToken: moduleOptions.authToken ?? sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n // eslint-disable-next-line deprecation/deprecation\n telemetry: moduleOptions.telemetry ?? sourceMapsUploadOptions.telemetry ?? true,\n // eslint-disable-next-line deprecation/deprecation\n url: moduleOptions.sentryUrl ?? sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,\n headers: moduleOptions.headers,\n debug: moduleOptions.debug ?? false,\n // eslint-disable-next-line deprecation/deprecation\n silent: moduleOptions.silent ?? sourceMapsUploadOptions.silent ?? false,\n // eslint-disable-next-line deprecation/deprecation\n errorHandler: moduleOptions.errorHandler ?? sourceMapsUploadOptions.errorHandler,\n bundleSizeOptimizations: moduleOptions.bundleSizeOptimizations, // todo: test if this can be overridden by the user\n release: {\n // eslint-disable-next-line deprecation/deprecation\n name: moduleOptions.release?.name ?? sourceMapsUploadOptions.release?.name,\n // Support all release options from BuildTimeOptionsBase\n ...moduleOptions.release,\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'nuxt',\n },\n },\n ...moduleOptions?.unstable_sentryBundlerPluginOptions,\n\n sourcemaps: {\n disable: moduleOptions.sourcemaps?.disable,\n // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')\n // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).\n // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],\n // eslint-disable-next-line deprecation/deprecation\n assets: sourcemapsOptions.assets ?? deprecatedSourcemapsOptions.assets ?? undefined,\n // eslint-disable-next-line deprecation/deprecation\n ignore: sourcemapsOptions.ignore ?? deprecatedSourcemapsOptions.ignore ?? undefined,\n filesToDeleteAfterUpload: filesToDeleteAfterUpload\n ? filesToDeleteAfterUpload\n : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client\n ? fallbackFilesToDelete\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are multiple ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993 and https://github.com/getsentry/sentry-javascript/pull/15859)\n 1. User explicitly disabled source maps\n - keep this setting (emit a warning that errors won't be unminified in Sentry)\n - We will not upload anything\n 2. users enabled source map generation (true, hidden, inline).\n - keep this setting (don't do anything - like deletion - besides uploading)\n 3. users did not 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 Users only have to explicitly enable client source maps. Sentry only overwrites the base Nuxt source map settings as they propagate.\n */\n\n/** only exported for tests */\nexport function extractNuxtSourceMapSetting(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting; client?: SourceMapSetting } } },\n runtime: 'client' | 'server' | undefined,\n): SourceMapSetting | undefined {\n if (!runtime) {\n return undefined;\n } else {\n return typeof nuxt.options?.sourcemap === 'boolean' || typeof nuxt.options?.sourcemap === 'string'\n ? nuxt.options.sourcemap\n : nuxt.options?.sourcemap?.[runtime];\n }\n}\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options.sourcemap = nuxt.options.sourcemap ?? { server: undefined, client: undefined };\n\n let previousUserSourceMapSetting: { client: UserSourceMapSetting; server: UserSourceMapSetting } = {\n client: undefined,\n server: undefined,\n };\n\n const nuxtSourceMap = nuxt.options.sourcemap;\n\n if (typeof nuxtSourceMap === 'string' || typeof nuxtSourceMap === 'boolean' || typeof nuxtSourceMap === 'undefined') {\n switch (nuxtSourceMap) {\n case false:\n warnExplicitlyDisabledSourceMap('sourcemap');\n previousUserSourceMapSetting = { client: 'disabled', server: 'disabled' };\n break;\n\n case 'hidden':\n case true:\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap', (nuxtSourceMap as true).toString());\n previousUserSourceMapSetting = { client: 'enabled', server: 'enabled' };\n break;\n case undefined:\n nuxt.options.sourcemap = { server: 'hidden', client: 'hidden' };\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting = { client: 'unset', server: 'unset' };\n break;\n }\n } else {\n if (nuxtSourceMap.client === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.client');\n previousUserSourceMapSetting.client = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.client)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.client', nuxtSourceMap.client.toString());\n previousUserSourceMapSetting.client = 'enabled';\n } else {\n nuxt.options.sourcemap.client = 'hidden';\n logSentryEnablesSourceMap('sourcemap.client', 'hidden');\n previousUserSourceMapSetting.client = 'unset';\n }\n\n if (nuxtSourceMap.server === false) {\n warnExplicitlyDisabledSourceMap('sourcemap.server');\n previousUserSourceMapSetting.server = 'disabled';\n } else if (['hidden', true].includes(nuxtSourceMap.server)) {\n logKeepEnabledSourceMapSetting(sentryModuleOptions, 'sourcemap.server', nuxtSourceMap.server.toString());\n previousUserSourceMapSetting.server = 'enabled';\n } else {\n nuxt.options.sourcemap.server = 'hidden';\n logSentryEnablesSourceMap('sourcemap.server', 'hidden');\n previousUserSourceMapSetting.server = 'unset';\n }\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** Logs warnings about potentially conflicting source map settings.\n * Configures `sourcemapExcludeSources` in Nitro to make source maps usable in Sentry.\n *\n * only exported for testing\n */\nexport function validateNitroSourceMapSettings(\n nuxt: { options: { sourcemap?: SourceMapSetting | { server?: SourceMapSetting } } },\n nitroConfig: NitroConfig,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): void {\n const isDebug = sentryModuleOptions.debug;\n const nuxtSourceMap = extractNuxtSourceMapSetting(nuxt, 'server');\n\n // NITRO CONFIG ---\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: 'nitro.sourceMap',\n otherSettingValue: nitroConfig.sourceMap,\n });\n\n // ROLLUP CONFIG ---\n\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n const nitroRollupSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n // We don't override nitro.rollupConfig.output.sourcemap (undefined by default, but overrides all other server-side source map settings)\n if (typeof nitroRollupSourceMap !== 'undefined' && ['hidden', 'inline', true, false].includes(nitroRollupSourceMap)) {\n const settingKey = 'nitro.rollupConfig.output.sourcemap';\n\n validateDifferentSourceMapSettings({\n nuxtSettingKey: 'sourcemap.server',\n nuxtSettingValue: nuxtSourceMap,\n otherSettingKey: settingKey,\n otherSettingValue: nitroRollupSourceMap,\n });\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n if (isDebug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Set `sourcemapExcludeSources: false` in the Nuxt config (`nitro.rollupConfig.output`). Source maps will now include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n }\n}\n\nfunction validateDifferentSourceMapSettings({\n nuxtSettingKey,\n nuxtSettingValue,\n otherSettingKey,\n otherSettingValue,\n}: {\n nuxtSettingKey: string;\n nuxtSettingValue?: SourceMapSetting;\n otherSettingKey: string;\n otherSettingValue?: SourceMapSetting;\n}): void {\n if (nuxtSettingValue !== otherSettingValue) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation settings are conflicting. Sentry uses \\`${nuxtSettingKey}: ${nuxtSettingValue}\\`. However, a conflicting setting was discovered (\\`${otherSettingKey}: ${otherSettingValue}\\`). This setting was probably explicitly set in your configuration. Sentry won't override this setting but it may affect source maps generation and upload. Without source maps, code snippets on the Sentry Issues page will remain minified.`,\n );\n });\n }\n}\n\nfunction logKeepEnabledSourceMapSetting(\n sentryNuxtModuleOptions: SentryNuxtModuleOptions,\n settingKey: string,\n settingValue: string,\n): void {\n if (sentryNuxtModuleOptions.debug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] \\`${settingKey}\\` is enabled with \\`${settingValue}\\`. This will correctly un-minify the code snippet on the Sentry Issue Details page.`,\n );\n });\n }\n}\n\nfunction warnExplicitlyDisabledSourceMap(settingKey: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`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 });\n}\n\nfunction logSentryEnablesSourceMap(settingKey: string, settingValue: string): void {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(`[Sentry] Enabled source map generation in the build options with \\`${settingKey}: ${settingValue}\\`.`);\n });\n}\n"],"names":[],"mappings":";;;;AAOA;AACA;AACA;;AAMA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI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A,CAAA,EAAA,EAAA,YAAA,CAAA,GAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"}
@@ -1,4 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
+ import { BuildTimeOptionsBase } from '@sentry/core';
2
3
  import { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
4
  import { SentryVitePluginOptions } from '@sentry/vite-plugin';
4
5
 
@@ -7,6 +8,7 @@ type SourceMapsOptions = {
7
8
  * Suppresses all logs.
8
9
  *
9
10
  * @default false
11
+ * @deprecated Use option `silent` instead of `sourceMapsUploadOptions.silent`
10
12
  */
11
13
  silent?: boolean;
12
14
  /**
@@ -23,12 +25,16 @@ type SourceMapsOptions = {
23
25
  * console.warn(err);
24
26
  * }
25
27
  * ```
28
+ *
29
+ * @deprecated Use option `errorHandler` instead of `sourceMapsUploadOptions.errorHandler`
26
30
  */
27
31
  errorHandler?: (err: Error) => void;
28
32
  /**
29
33
  * Options related to managing the Sentry releases for a build.
30
34
  *
31
35
  * More info: https://docs.sentry.io/product/releases/
36
+ *
37
+ * @deprecated Use option `release` instead of `sourceMapsUploadOptions.release`
32
38
  */
33
39
  release?: {
34
40
  /**
@@ -41,6 +47,8 @@ type SourceMapsOptions = {
41
47
  * (the latter requires access to git CLI and for the root directory to be a valid repository)
42
48
  *
43
49
  * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
50
+ *
51
+ * @deprecated Use `release.name` instead of `sourceMapsUploadOptions.release.name`
44
52
  */
45
53
  name?: string;
46
54
  };
@@ -49,6 +57,7 @@ type SourceMapsOptions = {
49
57
  * automatically generate and upload source maps to Sentry during a production build.
50
58
  *
51
59
  * @default true
60
+ * @deprecated Use option `sourcemaps.disable` instead of `sourceMapsUploadOptions.enabled`
52
61
  */
53
62
  enabled?: boolean;
54
63
  /**
@@ -58,22 +67,27 @@ type SourceMapsOptions = {
58
67
  *
59
68
  * To create an auth token, follow this guide:
60
69
  * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
70
+ * @deprecated Use option `authToken` instead of `sourceMapsUploadOptions.authToken`
61
71
  */
62
72
  authToken?: string;
63
73
  /**
64
74
  * The organization slug of your Sentry organization.
65
75
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
76
+ * @deprecated Use option `org` instead of `sourceMapsUploadOptions.org`
66
77
  */
67
78
  org?: string;
68
79
  /**
69
80
  * The URL of your Sentry instance if you're using self-hosted Sentry.
70
81
  *
71
82
  * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
83
+ * @deprecated Use `sentryUrl` instead of `sourceMapsUploadOptions.url`
72
84
  */
73
85
  url?: string;
74
86
  /**
75
87
  * The project slug of your Sentry project.
76
88
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
89
+ *
90
+ * @deprecated Use option `project` instead of `sourceMapsUploadOptions.project`
77
91
  */
78
92
  project?: string;
79
93
  /**
@@ -81,10 +95,13 @@ type SourceMapsOptions = {
81
95
  * It will not collect any sensitive or user-specific data.
82
96
  *
83
97
  * @default true
98
+ * @deprecated Use option `telemetry` instead of `sourceMapsUploadOptions.telemetry`
84
99
  */
85
100
  telemetry?: boolean;
86
101
  /**
87
102
  * Options related to sourcemaps
103
+ *
104
+ * @deprecated Use option `sourcemaps` instead of `sourceMapsUploadOptions.sourcemaps`
88
105
  */
89
106
  sourcemaps?: {
90
107
  /**
@@ -96,6 +113,8 @@ type SourceMapsOptions = {
96
113
  *
97
114
  * The globbing patterns must follow the implementation of the `glob` package.
98
115
  * @see https://www.npmjs.com/package/glob#glob-primer
116
+ *
117
+ * @deprecated Use option `sourcemaps.assets` instead of `sourceMapsUploadOptions.sourcemaps.assets`
99
118
  */
100
119
  assets?: string | Array<string>;
101
120
  /**
@@ -105,6 +124,8 @@ type SourceMapsOptions = {
105
124
  * or the default value for `assets` are uploaded.
106
125
  *
107
126
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
127
+ *
128
+ * @deprecated Use option `sourcemaps.ignore` instead of `sourceMapsUploadOptions.sourcemaps.ignore`
108
129
  */
109
130
  ignore?: string | Array<string>;
110
131
  /**
@@ -114,6 +135,8 @@ type SourceMapsOptions = {
114
135
  * @default [] - By default no files are deleted.
115
136
  *
116
137
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
138
+ *
139
+ * @deprecated Use option `sourcemaps.filesToDeleteAfterUpload` instead of `sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload`
117
140
  */
118
141
  filesToDeleteAfterUpload?: string | Array<string>;
119
142
  };
@@ -121,7 +144,7 @@ type SourceMapsOptions = {
121
144
  /**
122
145
  * Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
123
146
  */
124
- type SentryNuxtModuleOptions = {
147
+ type SentryNuxtModuleOptions = BuildTimeOptionsBase & {
125
148
  /**
126
149
  * Enable the Sentry Nuxt Module.
127
150
  *
@@ -133,13 +156,11 @@ type SentryNuxtModuleOptions = {
133
156
  *
134
157
  * These options are always read from the `sentry` module options in the `nuxt.config.(js|ts).
135
158
  * Do not define them in the `sentry.client.config.(js|ts)` or `sentry.server.config.(js|ts)` files.
159
+ *
160
+ * @deprecated This option was deprecated as it adds unnecessary nesting.
161
+ * Put the options one level higher to the root-level of the `sentry` module options.
136
162
  */
137
163
  sourceMapsUploadOptions?: SourceMapsOptions;
138
- /**
139
- * Enable debug functionality of the SDK during build-time.
140
- * Enabling this will give you, for example, logs about source maps.
141
- */
142
- debug?: boolean;
143
164
  /**
144
165
  *
145
166
  * Enables (partial) server tracing by automatically injecting Sentry for environments where modifying the node option `--import` is not possible.
@@ -1,4 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
+ import { BuildTimeOptionsBase } from '@sentry/core';
2
3
  import { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
4
  import { SentryVitePluginOptions } from '@sentry/vite-plugin';
4
5
 
@@ -7,6 +8,7 @@ type SourceMapsOptions = {
7
8
  * Suppresses all logs.
8
9
  *
9
10
  * @default false
11
+ * @deprecated Use option `silent` instead of `sourceMapsUploadOptions.silent`
10
12
  */
11
13
  silent?: boolean;
12
14
  /**
@@ -23,12 +25,16 @@ type SourceMapsOptions = {
23
25
  * console.warn(err);
24
26
  * }
25
27
  * ```
28
+ *
29
+ * @deprecated Use option `errorHandler` instead of `sourceMapsUploadOptions.errorHandler`
26
30
  */
27
31
  errorHandler?: (err: Error) => void;
28
32
  /**
29
33
  * Options related to managing the Sentry releases for a build.
30
34
  *
31
35
  * More info: https://docs.sentry.io/product/releases/
36
+ *
37
+ * @deprecated Use option `release` instead of `sourceMapsUploadOptions.release`
32
38
  */
33
39
  release?: {
34
40
  /**
@@ -41,6 +47,8 @@ type SourceMapsOptions = {
41
47
  * (the latter requires access to git CLI and for the root directory to be a valid repository)
42
48
  *
43
49
  * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
50
+ *
51
+ * @deprecated Use `release.name` instead of `sourceMapsUploadOptions.release.name`
44
52
  */
45
53
  name?: string;
46
54
  };
@@ -49,6 +57,7 @@ type SourceMapsOptions = {
49
57
  * automatically generate and upload source maps to Sentry during a production build.
50
58
  *
51
59
  * @default true
60
+ * @deprecated Use option `sourcemaps.disable` instead of `sourceMapsUploadOptions.enabled`
52
61
  */
53
62
  enabled?: boolean;
54
63
  /**
@@ -58,22 +67,27 @@ type SourceMapsOptions = {
58
67
  *
59
68
  * To create an auth token, follow this guide:
60
69
  * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
70
+ * @deprecated Use option `authToken` instead of `sourceMapsUploadOptions.authToken`
61
71
  */
62
72
  authToken?: string;
63
73
  /**
64
74
  * The organization slug of your Sentry organization.
65
75
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
76
+ * @deprecated Use option `org` instead of `sourceMapsUploadOptions.org`
66
77
  */
67
78
  org?: string;
68
79
  /**
69
80
  * The URL of your Sentry instance if you're using self-hosted Sentry.
70
81
  *
71
82
  * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
83
+ * @deprecated Use `sentryUrl` instead of `sourceMapsUploadOptions.url`
72
84
  */
73
85
  url?: string;
74
86
  /**
75
87
  * The project slug of your Sentry project.
76
88
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
89
+ *
90
+ * @deprecated Use option `project` instead of `sourceMapsUploadOptions.project`
77
91
  */
78
92
  project?: string;
79
93
  /**
@@ -81,10 +95,13 @@ type SourceMapsOptions = {
81
95
  * It will not collect any sensitive or user-specific data.
82
96
  *
83
97
  * @default true
98
+ * @deprecated Use option `telemetry` instead of `sourceMapsUploadOptions.telemetry`
84
99
  */
85
100
  telemetry?: boolean;
86
101
  /**
87
102
  * Options related to sourcemaps
103
+ *
104
+ * @deprecated Use option `sourcemaps` instead of `sourceMapsUploadOptions.sourcemaps`
88
105
  */
89
106
  sourcemaps?: {
90
107
  /**
@@ -96,6 +113,8 @@ type SourceMapsOptions = {
96
113
  *
97
114
  * The globbing patterns must follow the implementation of the `glob` package.
98
115
  * @see https://www.npmjs.com/package/glob#glob-primer
116
+ *
117
+ * @deprecated Use option `sourcemaps.assets` instead of `sourceMapsUploadOptions.sourcemaps.assets`
99
118
  */
100
119
  assets?: string | Array<string>;
101
120
  /**
@@ -105,6 +124,8 @@ type SourceMapsOptions = {
105
124
  * or the default value for `assets` are uploaded.
106
125
  *
107
126
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
127
+ *
128
+ * @deprecated Use option `sourcemaps.ignore` instead of `sourceMapsUploadOptions.sourcemaps.ignore`
108
129
  */
109
130
  ignore?: string | Array<string>;
110
131
  /**
@@ -114,6 +135,8 @@ type SourceMapsOptions = {
114
135
  * @default [] - By default no files are deleted.
115
136
  *
116
137
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
138
+ *
139
+ * @deprecated Use option `sourcemaps.filesToDeleteAfterUpload` instead of `sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload`
117
140
  */
118
141
  filesToDeleteAfterUpload?: string | Array<string>;
119
142
  };
@@ -121,7 +144,7 @@ type SourceMapsOptions = {
121
144
  /**
122
145
  * Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
123
146
  */
124
- type SentryNuxtModuleOptions = {
147
+ type SentryNuxtModuleOptions = BuildTimeOptionsBase & {
125
148
  /**
126
149
  * Enable the Sentry Nuxt Module.
127
150
  *
@@ -133,13 +156,11 @@ type SentryNuxtModuleOptions = {
133
156
  *
134
157
  * These options are always read from the `sentry` module options in the `nuxt.config.(js|ts).
135
158
  * Do not define them in the `sentry.client.config.(js|ts)` or `sentry.server.config.(js|ts)` files.
159
+ *
160
+ * @deprecated This option was deprecated as it adds unnecessary nesting.
161
+ * Put the options one level higher to the root-level of the `sentry` module options.
136
162
  */
137
163
  sourceMapsUploadOptions?: SourceMapsOptions;
138
- /**
139
- * Enable debug functionality of the SDK during build-time.
140
- * Enabling this will give you, for example, logs about source maps.
141
- */
142
- debug?: boolean;
143
164
  /**
144
165
  *
145
166
  * Enables (partial) server tracing by automatically injecting Sentry for environments where modifying the node option `--import` is not possible.
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.7.0"
6
6
  },
7
- "version": "10.0.0-beta.0",
7
+ "version": "10.1.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -256,7 +256,10 @@ ${reExportedFunctions}
256
256
  function setupSourceMaps(moduleOptions, nuxt) {
257
257
  const isDebug = moduleOptions.debug;
258
258
  const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};
259
- const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;
259
+ const sourceMapsEnabled = moduleOptions.sourcemaps?.disable === true ? false : moduleOptions.sourcemaps?.disable === false ? true : (
260
+ // eslint-disable-next-line deprecation/deprecation
261
+ sourceMapsUploadOptions.enabled ?? true
262
+ );
260
263
  let shouldDeleteFilesFallback = { client: true, server: true };
261
264
  nuxt.hook("modules:done", () => {
262
265
  if (sourceMapsEnabled && !nuxt.options.dev) {
@@ -265,7 +268,8 @@ function setupSourceMaps(moduleOptions, nuxt) {
265
268
  client: previousSourceMapSettings.client === "unset",
266
269
  server: previousSourceMapSettings.server === "unset"
267
270
  };
268
- if (isDebug && !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload && (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)) {
271
+ if (isDebug && !moduleOptions.sourcemaps?.filesToDeleteAfterUpload && // eslint-disable-next-line deprecation/deprecation
272
+ !sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload && (shouldDeleteFilesFallback.client || shouldDeleteFilesFallback.server)) {
269
273
  consoleSandbox(
270
274
  () => (
271
275
  // eslint-disable-next-line no-console
@@ -334,7 +338,11 @@ function getPluginOptions(moduleOptions, shouldDeleteFilesFallback) {
334
338
  ...shouldDeleteFilesFallback?.client ? [".*/**/public/**/*.map"] : [],
335
339
  ...shouldDeleteFilesFallback?.server ? [".*/**/server/**/*.map", ".*/**/output/**/*.map", ".*/**/function/**/*.map"] : []
336
340
  ];
337
- if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === "undefined" && shouldDeleteFilesAfterUpload) {
341
+ const sourcemapsOptions = moduleOptions.sourcemaps || {};
342
+ const deprecatedSourcemapsOptions = sourceMapsUploadOptions.sourcemaps || {};
343
+ const filesToDeleteAfterUpload = sourcemapsOptions.filesToDeleteAfterUpload ?? // eslint-disable-next-line deprecation/deprecation
344
+ deprecatedSourcemapsOptions.filesToDeleteAfterUpload;
345
+ if (typeof filesToDeleteAfterUpload === "undefined" && shouldDeleteFilesAfterUpload) {
338
346
  consoleSandbox(() => {
339
347
  console.log(
340
348
  `[Sentry] Setting \`sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [${fallbackFilesToDelete.map((path) => `"${path}"`).join(", ")}]\` to delete generated source maps after they were uploaded to Sentry.`
@@ -342,16 +350,29 @@ function getPluginOptions(moduleOptions, shouldDeleteFilesFallback) {
342
350
  });
343
351
  }
344
352
  return {
345
- org: sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
346
- project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
347
- authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
348
- telemetry: sourceMapsUploadOptions.telemetry ?? true,
349
- url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
353
+ // eslint-disable-next-line deprecation/deprecation
354
+ org: moduleOptions.org ?? sourceMapsUploadOptions.org ?? process.env.SENTRY_ORG,
355
+ // eslint-disable-next-line deprecation/deprecation
356
+ project: moduleOptions.project ?? sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
357
+ // eslint-disable-next-line deprecation/deprecation
358
+ authToken: moduleOptions.authToken ?? sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
359
+ // eslint-disable-next-line deprecation/deprecation
360
+ telemetry: moduleOptions.telemetry ?? sourceMapsUploadOptions.telemetry ?? true,
361
+ // eslint-disable-next-line deprecation/deprecation
362
+ url: moduleOptions.sentryUrl ?? sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
363
+ headers: moduleOptions.headers,
350
364
  debug: moduleOptions.debug ?? false,
351
- silent: sourceMapsUploadOptions.silent ?? false,
352
- errorHandler: sourceMapsUploadOptions.errorHandler,
365
+ // eslint-disable-next-line deprecation/deprecation
366
+ silent: moduleOptions.silent ?? sourceMapsUploadOptions.silent ?? false,
367
+ // eslint-disable-next-line deprecation/deprecation
368
+ errorHandler: moduleOptions.errorHandler ?? sourceMapsUploadOptions.errorHandler,
369
+ bundleSizeOptimizations: moduleOptions.bundleSizeOptimizations,
370
+ // todo: test if this can be overridden by the user
353
371
  release: {
354
- name: sourceMapsUploadOptions.release?.name,
372
+ // eslint-disable-next-line deprecation/deprecation
373
+ name: moduleOptions.release?.name ?? sourceMapsUploadOptions.release?.name,
374
+ // Support all release options from BuildTimeOptionsBase
375
+ ...moduleOptions.release,
355
376
  ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release
356
377
  },
357
378
  _metaOptions: {
@@ -361,12 +382,15 @@ function getPluginOptions(moduleOptions, shouldDeleteFilesFallback) {
361
382
  },
362
383
  ...moduleOptions?.unstable_sentryBundlerPluginOptions,
363
384
  sourcemaps: {
385
+ disable: moduleOptions.sourcemaps?.disable,
364
386
  // The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')
365
387
  // We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).
366
388
  // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],
367
- assets: sourceMapsUploadOptions.sourcemaps?.assets ?? void 0,
368
- ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? void 0,
369
- filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client ? fallbackFilesToDelete : void 0,
389
+ // eslint-disable-next-line deprecation/deprecation
390
+ assets: sourcemapsOptions.assets ?? deprecatedSourcemapsOptions.assets ?? void 0,
391
+ // eslint-disable-next-line deprecation/deprecation
392
+ ignore: sourcemapsOptions.ignore ?? deprecatedSourcemapsOptions.ignore ?? void 0,
393
+ filesToDeleteAfterUpload: filesToDeleteAfterUpload ? filesToDeleteAfterUpload : shouldDeleteFilesFallback?.server || shouldDeleteFilesFallback?.client ? fallbackFilesToDelete : void 0,
370
394
  rewriteSources: (source) => normalizePath(source),
371
395
  ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps
372
396
  }
@@ -1,3 +1,4 @@
1
+ import type { BuildTimeOptionsBase } from '@sentry/core';
1
2
  import type { init as initNode } from '@sentry/node';
2
3
  import type { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
4
  import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
@@ -22,6 +23,7 @@ type SourceMapsOptions = {
22
23
  * Suppresses all logs.
23
24
  *
24
25
  * @default false
26
+ * @deprecated Use option `silent` instead of `sourceMapsUploadOptions.silent`
25
27
  */
26
28
  silent?: boolean;
27
29
  /**
@@ -38,12 +40,16 @@ type SourceMapsOptions = {
38
40
  * console.warn(err);
39
41
  * }
40
42
  * ```
43
+ *
44
+ * @deprecated Use option `errorHandler` instead of `sourceMapsUploadOptions.errorHandler`
41
45
  */
42
46
  errorHandler?: (err: Error) => void;
43
47
  /**
44
48
  * Options related to managing the Sentry releases for a build.
45
49
  *
46
50
  * More info: https://docs.sentry.io/product/releases/
51
+ *
52
+ * @deprecated Use option `release` instead of `sourceMapsUploadOptions.release`
47
53
  */
48
54
  release?: {
49
55
  /**
@@ -56,6 +62,8 @@ type SourceMapsOptions = {
56
62
  * (the latter requires access to git CLI and for the root directory to be a valid repository)
57
63
  *
58
64
  * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
65
+ *
66
+ * @deprecated Use `release.name` instead of `sourceMapsUploadOptions.release.name`
59
67
  */
60
68
  name?: string;
61
69
  };
@@ -64,6 +72,7 @@ type SourceMapsOptions = {
64
72
  * automatically generate and upload source maps to Sentry during a production build.
65
73
  *
66
74
  * @default true
75
+ * @deprecated Use option `sourcemaps.disable` instead of `sourceMapsUploadOptions.enabled`
67
76
  */
68
77
  enabled?: boolean;
69
78
  /**
@@ -73,22 +82,27 @@ type SourceMapsOptions = {
73
82
  *
74
83
  * To create an auth token, follow this guide:
75
84
  * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
85
+ * @deprecated Use option `authToken` instead of `sourceMapsUploadOptions.authToken`
76
86
  */
77
87
  authToken?: string;
78
88
  /**
79
89
  * The organization slug of your Sentry organization.
80
90
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
91
+ * @deprecated Use option `org` instead of `sourceMapsUploadOptions.org`
81
92
  */
82
93
  org?: string;
83
94
  /**
84
95
  * The URL of your Sentry instance if you're using self-hosted Sentry.
85
96
  *
86
97
  * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
98
+ * @deprecated Use `sentryUrl` instead of `sourceMapsUploadOptions.url`
87
99
  */
88
100
  url?: string;
89
101
  /**
90
102
  * The project slug of your Sentry project.
91
103
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
104
+ *
105
+ * @deprecated Use option `project` instead of `sourceMapsUploadOptions.project`
92
106
  */
93
107
  project?: string;
94
108
  /**
@@ -96,10 +110,13 @@ type SourceMapsOptions = {
96
110
  * It will not collect any sensitive or user-specific data.
97
111
  *
98
112
  * @default true
113
+ * @deprecated Use option `telemetry` instead of `sourceMapsUploadOptions.telemetry`
99
114
  */
100
115
  telemetry?: boolean;
101
116
  /**
102
117
  * Options related to sourcemaps
118
+ *
119
+ * @deprecated Use option `sourcemaps` instead of `sourceMapsUploadOptions.sourcemaps`
103
120
  */
104
121
  sourcemaps?: {
105
122
  /**
@@ -111,6 +128,8 @@ type SourceMapsOptions = {
111
128
  *
112
129
  * The globbing patterns must follow the implementation of the `glob` package.
113
130
  * @see https://www.npmjs.com/package/glob#glob-primer
131
+ *
132
+ * @deprecated Use option `sourcemaps.assets` instead of `sourceMapsUploadOptions.sourcemaps.assets`
114
133
  */
115
134
  assets?: string | Array<string>;
116
135
  /**
@@ -120,6 +139,8 @@ type SourceMapsOptions = {
120
139
  * or the default value for `assets` are uploaded.
121
140
  *
122
141
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
142
+ *
143
+ * @deprecated Use option `sourcemaps.ignore` instead of `sourceMapsUploadOptions.sourcemaps.ignore`
123
144
  */
124
145
  ignore?: string | Array<string>;
125
146
  /**
@@ -129,6 +150,8 @@ type SourceMapsOptions = {
129
150
  * @default [] - By default no files are deleted.
130
151
  *
131
152
  * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
153
+ *
154
+ * @deprecated Use option `sourcemaps.filesToDeleteAfterUpload` instead of `sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload`
132
155
  */
133
156
  filesToDeleteAfterUpload?: string | Array<string>;
134
157
  };
@@ -136,7 +159,7 @@ type SourceMapsOptions = {
136
159
  /**
137
160
  * Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
138
161
  */
139
- export type SentryNuxtModuleOptions = {
162
+ export type SentryNuxtModuleOptions = BuildTimeOptionsBase & {
140
163
  /**
141
164
  * Enable the Sentry Nuxt Module.
142
165
  *
@@ -148,13 +171,11 @@ export type SentryNuxtModuleOptions = {
148
171
  *
149
172
  * These options are always read from the `sentry` module options in the `nuxt.config.(js|ts).
150
173
  * Do not define them in the `sentry.client.config.(js|ts)` or `sentry.server.config.(js|ts)` files.
174
+ *
175
+ * @deprecated This option was deprecated as it adds unnecessary nesting.
176
+ * Put the options one level higher to the root-level of the `sentry` module options.
151
177
  */
152
178
  sourceMapsUploadOptions?: SourceMapsOptions;
153
- /**
154
- * Enable debug functionality of the SDK during build-time.
155
- * Enabling this will give you, for example, logs about source maps.
156
- */
157
- debug?: boolean;
158
179
  /**
159
180
  *
160
181
  * Enables (partial) server tracing by automatically injecting Sentry for environments where modifying the node option `--import` is not possible.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,UAAU,CAAC,OA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CAAC,EAAE,gBAAgB,GAAG;YAAE,MAAM,CAAC,EAAE,gBAAgB,CAAC;YAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,EAC9G,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GACvC,gBAAgB,GAAG,SAAS,CAQ9B;AAED,iCAAiC;AACjC,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,IAAI,EACV,mBAAmB,EAAE,uBAAuB,GAC3C;IAAE,MAAM,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAwDhE;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,gBAAgB,GAAG;YAAE,MAAM,CAAC,EAAE,gBAAgB,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,EACnF,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,uBAAuB,GAC3C,IAAI,CAwCN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/nuxt",
3
- "version": "10.0.0-beta.0",
3
+ "version": "10.1.0",
4
4
  "description": "Official Sentry SDK for Nuxt (EXPERIMENTAL)",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt",
@@ -47,13 +47,13 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@nuxt/kit": "^3.13.2",
50
- "@sentry/browser": "10.0.0-beta.0",
51
- "@sentry/cloudflare": "10.0.0-beta.0",
52
- "@sentry/core": "10.0.0-beta.0",
53
- "@sentry/node": "10.0.0-beta.0",
50
+ "@sentry/browser": "10.1.0",
51
+ "@sentry/cloudflare": "10.1.0",
52
+ "@sentry/core": "10.1.0",
53
+ "@sentry/node": "10.1.0",
54
54
  "@sentry/rollup-plugin": "^4.0.0",
55
55
  "@sentry/vite-plugin": "^4.0.0",
56
- "@sentry/vue": "10.0.0-beta.0"
56
+ "@sentry/vue": "10.1.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@nuxt/module-builder": "^0.8.4",