@sentry/nuxt 9.0.0-alpha.0 → 9.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023-2024 Functional Software, Inc. dba Sentry
3
+ Copyright (c) 2023 Functional Software, Inc. dba Sentry
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
@@ -88,7 +88,14 @@ function getPluginOptions(
88
88
  project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
89
89
  authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
90
90
  telemetry: sourceMapsUploadOptions.telemetry ?? true,
91
+ url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
91
92
  debug: moduleOptions.debug ?? false,
93
+ silent: sourceMapsUploadOptions.silent ?? false,
94
+ errorHandler: sourceMapsUploadOptions.errorHandler,
95
+ release: {
96
+ name: sourceMapsUploadOptions.release?.name,
97
+ ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,
98
+ },
92
99
  _metaOptions: {
93
100
  telemetry: {
94
101
  metaFramework: 'nuxt',
@@ -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 { OutputOptions } from 'rollup';\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/**\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 sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n changeNuxtSourceMapSettings(nuxt, moduleOptions);\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, _env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const previousUserSourceMapSetting = changeViteSourceMapSettings(viteConfig, moduleOptions);\n\n // Add Sentry plugin\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(\n sentryVitePlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\n );\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 const previousUserSourceMapSetting = changeRollupSourceMapSettings(nitroConfig, moduleOptions);\n\n // Add Sentry plugin\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\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 deleteFilesAfterUpload: boolean,\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' && deleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [\".*/**/public/**/*.map\"]` 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 debug: moduleOptions.debug ?? false,\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 : deleteFilesAfterUpload\n ? ['.*/**/public/**/*.map']\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are 3 ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993)\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 Nuxt has 3 places to set source maps: vite options, rollup options, nuxt itself\n Ideally, all 3 are enabled to get all source maps.\n */\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options = nuxt.options || {};\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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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/** only exported for testing */\nexport function changeViteSourceMapSettings(\n viteConfig: { build?: { sourcemap?: boolean | 'inline' | 'hidden' } },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n if (viteSourceMap === false) {\n warnExplicitlyDisabledSourceMap('vite.build.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'vite.build.sourcemap', viteSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n viteConfig.build.sourcemap = 'hidden';\n logSentryEnablesSourceMap('vite.build.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** only exported for testing */\nexport function changeRollupSourceMapSettings(\n nitroConfig: {\n rollupConfig?: {\n output?: {\n sourcemap?: OutputOptions['sourcemap'];\n sourcemapExcludeSources?: OutputOptions['sourcemapExcludeSources'];\n };\n };\n },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n const nitroSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n if (nitroSourceMap === false) {\n warnExplicitlyDisabledSourceMap('nitro.rollupConfig.output.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (nitroSourceMap && ['hidden', 'inline', true].includes(nitroSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'nitro.rollupConfig.output.sourcemap', nitroSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n nitroConfig.rollupConfig.output.sourcemap = 'hidden';\n logSentryEnablesSourceMap('nitro.rollupConfig.output.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Disabled source map setting in the Nuxt config: `nitro.rollupConfig.output.sourcemapExcludeSources`. Source maps will include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n\n return previousUserSourceMapSetting;\n}\n\nfunction logKeepSourceMapSetting(\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] We discovered \\`${settingKey}\\` is set to \\`${settingValue}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue 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] Parts of source map generation are currently disabled in your Nuxt configuration (\\`${settingKey}: false\\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n });\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":["sentryVitePlugin","sentryRollupPlugin","consoleSandbox"],"mappings":";;;;;;AAQA;AACA;AACA;;AAGA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAwB,IAAG,EAAE;AAC7E,EAAE,MAAM,iBAAkB,GAAE,uBAAuB,CAAC,OAAA,IAAW,IAAI;;AAEnE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM;AAClC,IAAI,IAAI,iBAAA,IAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;AAChD,MAAM,2BAA2B,CAAC,IAAI,EAAE,aAAa,CAAC;AACtD;AACA,GAAG,CAAC;;AAEJ,EAAE,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,UAAU,EAAE,IAAI,KAAK;AAC7D,IAAI,IAAI,iBAAkB,IAAG,UAAU,CAAC,IAAA,KAAS,aAAa,EAAE;AAChE,MAAM,MAAM,+BAA+B,2BAA2B,CAAC,UAAU,EAAE,aAAa,CAAC;;AAEjG;AACA,MAAM,UAAU,CAAC,OAAQ,GAAE,UAAU,CAAC,OAAA,IAAW,EAAE;AACnD,MAAM,UAAU,CAAC,OAAO,CAAC,IAAI;AAC7B,QAAQA,2BAAgB,CAAC,gBAAgB,CAAC,aAAa,EAAE,4BAA6B,KAAI,OAAO,CAAC,CAAC;AACnG,OAAO;AACP;AACA,GAAG,CAAC;;AAEJ,EAAE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AACA,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,mEAAmE,EAAE,UAAU,CAAC,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;AACvH,GAAG,CAAC;AACJ;;;;;;;;"}
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 { OutputOptions } from 'rollup';\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/**\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 sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n changeNuxtSourceMapSettings(nuxt, moduleOptions);\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, _env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const previousUserSourceMapSetting = changeViteSourceMapSettings(viteConfig, moduleOptions);\n\n // Add Sentry plugin\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(\n sentryVitePlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\n );\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 const previousUserSourceMapSetting = changeRollupSourceMapSettings(nitroConfig, moduleOptions);\n\n // Add Sentry plugin\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\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 deleteFilesAfterUpload: boolean,\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' && deleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [\".*/**/public/**/*.map\"]` 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 : deleteFilesAfterUpload\n ? ['.*/**/public/**/*.map']\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are 3 ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993)\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 Nuxt has 3 places to set source maps: vite options, rollup options, nuxt itself\n Ideally, all 3 are enabled to get all source maps.\n */\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options = nuxt.options || {};\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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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/** only exported for testing */\nexport function changeViteSourceMapSettings(\n viteConfig: { build?: { sourcemap?: boolean | 'inline' | 'hidden' } },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n if (viteSourceMap === false) {\n warnExplicitlyDisabledSourceMap('vite.build.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'vite.build.sourcemap', viteSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n viteConfig.build.sourcemap = 'hidden';\n logSentryEnablesSourceMap('vite.build.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** only exported for testing */\nexport function changeRollupSourceMapSettings(\n nitroConfig: {\n rollupConfig?: {\n output?: {\n sourcemap?: OutputOptions['sourcemap'];\n sourcemapExcludeSources?: OutputOptions['sourcemapExcludeSources'];\n };\n };\n },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n const nitroSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n if (nitroSourceMap === false) {\n warnExplicitlyDisabledSourceMap('nitro.rollupConfig.output.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (nitroSourceMap && ['hidden', 'inline', true].includes(nitroSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'nitro.rollupConfig.output.sourcemap', nitroSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n nitroConfig.rollupConfig.output.sourcemap = 'hidden';\n logSentryEnablesSourceMap('nitro.rollupConfig.output.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Disabled source map setting in the Nuxt config: `nitro.rollupConfig.output.sourcemapExcludeSources`. Source maps will include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n\n return previousUserSourceMapSetting;\n}\n\nfunction logKeepSourceMapSetting(\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] We discovered \\`${settingKey}\\` is set to \\`${settingValue}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue 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] Parts of source map generation are currently disabled in your Nuxt configuration (\\`${settingKey}: false\\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n });\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":["sentryVitePlugin","sentryRollupPlugin","consoleSandbox"],"mappings":";;;;;;AAQA;AACA;AACA;;AAGA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAwB,IAAG,EAAE;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"module","version":"9.0.0-alpha.0"}
1
+ {"type":"module","version":"9.0.0-alpha.2"}
@@ -86,7 +86,14 @@ function getPluginOptions(
86
86
  project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
87
87
  authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
88
88
  telemetry: sourceMapsUploadOptions.telemetry ?? true,
89
+ url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
89
90
  debug: moduleOptions.debug ?? false,
91
+ silent: sourceMapsUploadOptions.silent ?? false,
92
+ errorHandler: sourceMapsUploadOptions.errorHandler,
93
+ release: {
94
+ name: sourceMapsUploadOptions.release?.name,
95
+ ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release,
96
+ },
90
97
  _metaOptions: {
91
98
  telemetry: {
92
99
  metaFramework: 'nuxt',
@@ -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 { OutputOptions } from 'rollup';\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/**\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 sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n changeNuxtSourceMapSettings(nuxt, moduleOptions);\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, _env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const previousUserSourceMapSetting = changeViteSourceMapSettings(viteConfig, moduleOptions);\n\n // Add Sentry plugin\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(\n sentryVitePlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\n );\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 const previousUserSourceMapSetting = changeRollupSourceMapSettings(nitroConfig, moduleOptions);\n\n // Add Sentry plugin\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\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 deleteFilesAfterUpload: boolean,\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' && deleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [\".*/**/public/**/*.map\"]` 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 debug: moduleOptions.debug ?? false,\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 : deleteFilesAfterUpload\n ? ['.*/**/public/**/*.map']\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are 3 ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993)\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 Nuxt has 3 places to set source maps: vite options, rollup options, nuxt itself\n Ideally, all 3 are enabled to get all source maps.\n */\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options = nuxt.options || {};\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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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/** only exported for testing */\nexport function changeViteSourceMapSettings(\n viteConfig: { build?: { sourcemap?: boolean | 'inline' | 'hidden' } },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n if (viteSourceMap === false) {\n warnExplicitlyDisabledSourceMap('vite.build.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'vite.build.sourcemap', viteSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n viteConfig.build.sourcemap = 'hidden';\n logSentryEnablesSourceMap('vite.build.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** only exported for testing */\nexport function changeRollupSourceMapSettings(\n nitroConfig: {\n rollupConfig?: {\n output?: {\n sourcemap?: OutputOptions['sourcemap'];\n sourcemapExcludeSources?: OutputOptions['sourcemapExcludeSources'];\n };\n };\n },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n const nitroSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n if (nitroSourceMap === false) {\n warnExplicitlyDisabledSourceMap('nitro.rollupConfig.output.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (nitroSourceMap && ['hidden', 'inline', true].includes(nitroSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'nitro.rollupConfig.output.sourcemap', nitroSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n nitroConfig.rollupConfig.output.sourcemap = 'hidden';\n logSentryEnablesSourceMap('nitro.rollupConfig.output.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Disabled source map setting in the Nuxt config: `nitro.rollupConfig.output.sourcemapExcludeSources`. Source maps will include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n\n return previousUserSourceMapSetting;\n}\n\nfunction logKeepSourceMapSetting(\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] We discovered \\`${settingKey}\\` is set to \\`${settingValue}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue 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] Parts of source map generation are currently disabled in your Nuxt configuration (\\`${settingKey}: false\\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n });\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}\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AAC;AAC9E,IAAI,4BAAA,GAA+B,OAAO;AAC1C;;AAEA,EAAE,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,uBAAA,GAA0B,KAAK;AACjE,EAAE,cAAc,CAAC,MAAM;AACvB;AACA,IAAI,OAAO,CAAC,GAAG;AACf,MAAM,yMAAyM;AAC/M,KAAK;AACL,GAAG,CAAC;;AAEJ,EAAE,OAAO,4BAA4B;AACrC;;AAEA,SAAS,uBAAuB;AAChC,EAAE,uBAAuB;AACzB,EAAE,UAAU;AACZ,EAAE,YAAY;AACd,EAAQ;AACR,EAAE,IAAI,uBAAuB,CAAC,KAAK,EAAE;AACrC,IAAI,cAAc,CAAC,MAAM;AACzB;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,yBAAyB,EAAE,UAAU,CAAC,eAAe,EAAE,YAAY,CAAC,4GAA4G,CAAC;AAC1L,OAAO;AACP,KAAK,CAAC;AACN;AACA;;AAEA,SAAS,+BAA+B,CAAC,UAAU,EAAgB;AACnE,EAAE,cAAc,CAAC,MAAM;AACvB;AACA,IAAI,OAAO,CAAC,IAAI;AAChB,MAAM,CAAC,6FAA6F,EAAE,UAAU,CAAC,0QAA0Q,EAAE,UAAU,CAAC,wCAAwC,CAAC;AACjb,KAAK;AACL,GAAG,CAAC;AACJ;;AAEA,SAAS,yBAAyB,CAAC,UAAU,EAAU,YAAY,EAAgB;AACnF,EAAE,cAAc,CAAC,MAAM;AACvB;AACA,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,mEAAmE,EAAE,UAAU,CAAC,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;AACvH,GAAG,CAAC;AACJ;;;;"}
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 { OutputOptions } from 'rollup';\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/**\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 sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n const sourceMapsEnabled = sourceMapsUploadOptions.enabled ?? true;\n\n nuxt.hook('modules:done', () => {\n if (sourceMapsEnabled && !nuxt.options.dev) {\n changeNuxtSourceMapSettings(nuxt, moduleOptions);\n }\n });\n\n nuxt.hook('vite:extendConfig', async (viteConfig, _env) => {\n if (sourceMapsEnabled && viteConfig.mode !== 'development') {\n const previousUserSourceMapSetting = changeViteSourceMapSettings(viteConfig, moduleOptions);\n\n // Add Sentry plugin\n viteConfig.plugins = viteConfig.plugins || [];\n viteConfig.plugins.push(\n sentryVitePlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\n );\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 const previousUserSourceMapSetting = changeRollupSourceMapSettings(nitroConfig, moduleOptions);\n\n // Add Sentry plugin\n nitroConfig.rollupConfig.plugins.push(\n sentryRollupPlugin(getPluginOptions(moduleOptions, previousUserSourceMapSetting === 'unset')),\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 deleteFilesAfterUpload: boolean,\n): SentryVitePluginOptions | SentryRollupPluginOptions {\n const sourceMapsUploadOptions = moduleOptions.sourceMapsUploadOptions || {};\n\n if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === 'undefined' && deleteFilesAfterUpload) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [\".*/**/public/**/*.map\"]` 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 : deleteFilesAfterUpload\n ? ['.*/**/public/**/*.map']\n : undefined,\n rewriteSources: (source: string) => normalizePath(source),\n ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps,\n },\n };\n}\n\n/* There are 3 ways to set up source maps (https://github.com/getsentry/sentry-javascript/issues/13993)\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 Nuxt has 3 places to set source maps: vite options, rollup options, nuxt itself\n Ideally, all 3 are enabled to get all source maps.\n */\n\n/** only exported for testing */\nexport function changeNuxtSourceMapSettings(\n nuxt: Nuxt,\n sentryModuleOptions: SentryNuxtModuleOptions,\n): { client: UserSourceMapSetting; server: UserSourceMapSetting } {\n nuxt.options = nuxt.options || {};\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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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 logKeepSourceMapSetting(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/** only exported for testing */\nexport function changeViteSourceMapSettings(\n viteConfig: { build?: { sourcemap?: boolean | 'inline' | 'hidden' } },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n viteConfig.build = viteConfig.build || {};\n const viteSourceMap = viteConfig.build.sourcemap;\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n if (viteSourceMap === false) {\n warnExplicitlyDisabledSourceMap('vite.build.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'vite.build.sourcemap', viteSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n viteConfig.build.sourcemap = 'hidden';\n logSentryEnablesSourceMap('vite.build.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n return previousUserSourceMapSetting;\n}\n\n/** only exported for testing */\nexport function changeRollupSourceMapSettings(\n nitroConfig: {\n rollupConfig?: {\n output?: {\n sourcemap?: OutputOptions['sourcemap'];\n sourcemapExcludeSources?: OutputOptions['sourcemapExcludeSources'];\n };\n };\n },\n sentryModuleOptions: SentryNuxtModuleOptions,\n): UserSourceMapSetting {\n nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};\n nitroConfig.rollupConfig.output = nitroConfig.rollupConfig.output || { sourcemap: undefined };\n\n let previousUserSourceMapSetting: UserSourceMapSetting;\n\n const nitroSourceMap = nitroConfig.rollupConfig.output.sourcemap;\n\n if (nitroSourceMap === false) {\n warnExplicitlyDisabledSourceMap('nitro.rollupConfig.output.sourcemap');\n previousUserSourceMapSetting = 'disabled';\n } else if (nitroSourceMap && ['hidden', 'inline', true].includes(nitroSourceMap)) {\n logKeepSourceMapSetting(sentryModuleOptions, 'nitro.rollupConfig.output.sourcemap', nitroSourceMap.toString());\n previousUserSourceMapSetting = 'enabled';\n } else {\n nitroConfig.rollupConfig.output.sourcemap = 'hidden';\n logSentryEnablesSourceMap('nitro.rollupConfig.output.sourcemap', 'hidden');\n previousUserSourceMapSetting = 'unset';\n }\n\n nitroConfig.rollupConfig.output.sourcemapExcludeSources = false;\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Disabled source map setting in the Nuxt config: `nitro.rollupConfig.output.sourcemapExcludeSources`. Source maps will include the actual code to be able to un-minify code snippets in Sentry.',\n );\n });\n\n return previousUserSourceMapSetting;\n}\n\nfunction logKeepSourceMapSetting(\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] We discovered \\`${settingKey}\\` is set to \\`${settingValue}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue 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] Parts of source map generation are currently disabled in your Nuxt configuration (\\`${settingKey}: false\\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n });\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":";;;;AAQA;AACA;AACA;;AAGA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAA2B,IAAI,EAAc;AAC1F,EAAE,MAAM,0BAA0B,aAAa,CAAC,uBAAwB,IAAG,EAAE;AAC7E,EAAE,MAAM,iBAAkB,GAAE,uBAAuB,CAAC,OAAA,IAAW,IAAI;;AAEnE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM;AAClC,IAAI,IAAI,iBAAA,IAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;AAChD,MAAM,2BAA2B,CAAC,IAAI,EAAE,aAAa,CAAC;AACtD;AACA,GAAG,CAAC;;AAEJ,EAAE,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,UAAU,EAAE,IAAI,KAAK;AAC7D,IAAI,IAA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,CAAC;;AAEJ,EAAE,OAAO,4BAA4B;AACrC;;AAEA,SAAS,uBAAuB;AAChC,EAAE,uBAAuB;AACzB,EAAE,UAAU;AACZ,EAAE,YAAY;AACd,EAAQ;AACR,EAAE,IAAI,uBAAuB,CAAC,KAAK,EAAE;AACrC,IAAI,cAAc,CAAC,MAAM;AACzB;AACA,MAAM,OAAO,CAAC,GAAG;AACjB,QAAQ,CAAC,yBAAyB,EAAE,UAAU,CAAC,eAAe,EAAE,YAAY,CAAC,4GAA4G,CAAC;AAC1L,OAAO;AACP,KAAK,CAAC;AACN;AACA;;AAEA,SAAS,+BAA+B,CAAC,UAAU,EAAgB;AACnE,EAAE,cAAc,CAAC,MAAM;AACvB;AACA,IAAI,OAAO,CAAC,IAAI;AAChB,MAAM,CAAC,6FAA6F,EAAE,UAAU,CAAC,0QAA0Q,EAAE,UAAU,CAAC,wCAAwC,CAAC;AACjb,KAAK;AACL,GAAG,CAAC;AACJ;;AAEA,SAAS,yBAAyB,CAAC,UAAU,EAAU,YAAY,EAAgB;AACnF,EAAE,cAAc,CAAC,MAAM;AACvB;AACA,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,mEAAmE,EAAE,UAAU,CAAC,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;AACvH,GAAG,CAAC;AACJ;;;;"}
@@ -3,6 +3,47 @@ import { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
3
  import { SentryVitePluginOptions } from '@sentry/vite-plugin';
4
4
 
5
5
  type SourceMapsOptions = {
6
+ /**
7
+ * Suppresses all logs.
8
+ *
9
+ * @default false
10
+ */
11
+ silent?: boolean;
12
+ /**
13
+ * When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
14
+ *
15
+ * By default, the plugin will simply throw an error, thereby stopping the bundling process.
16
+ * If an `errorHandler` callback is provided, compilation will continue, unless an error is
17
+ * thrown in the provided callback.
18
+ *
19
+ * To allow compilation to continue but still emit a warning, set this option to the following:
20
+ *
21
+ * ```js
22
+ * (err) => {
23
+ * console.warn(err);
24
+ * }
25
+ * ```
26
+ */
27
+ errorHandler?: (err: Error) => void;
28
+ /**
29
+ * Options related to managing the Sentry releases for a build.
30
+ *
31
+ * More info: https://docs.sentry.io/product/releases/
32
+ */
33
+ release?: {
34
+ /**
35
+ * Unique identifier for the release you want to create.
36
+ *
37
+ * This value can also be specified via the `SENTRY_RELEASE` environment variable.
38
+ *
39
+ * Defaults to automatically detecting a value for your environment.
40
+ * This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA.
41
+ * (the latter requires access to git CLI and for the root directory to be a valid repository)
42
+ *
43
+ * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
44
+ */
45
+ name?: string;
46
+ };
6
47
  /**
7
48
  * If this flag is `true`, and an auth token is detected, the Sentry SDK will
8
49
  * automatically generate and upload source maps to Sentry during a production build.
@@ -24,6 +65,12 @@ type SourceMapsOptions = {
24
65
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
25
66
  */
26
67
  org?: string;
68
+ /**
69
+ * The URL of your Sentry instance if you're using self-hosted Sentry.
70
+ *
71
+ * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
72
+ */
73
+ url?: string;
27
74
  /**
28
75
  * The project slug of your Sentry project.
29
76
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
@@ -3,6 +3,47 @@ import { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
3
  import { SentryVitePluginOptions } from '@sentry/vite-plugin';
4
4
 
5
5
  type SourceMapsOptions = {
6
+ /**
7
+ * Suppresses all logs.
8
+ *
9
+ * @default false
10
+ */
11
+ silent?: boolean;
12
+ /**
13
+ * When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
14
+ *
15
+ * By default, the plugin will simply throw an error, thereby stopping the bundling process.
16
+ * If an `errorHandler` callback is provided, compilation will continue, unless an error is
17
+ * thrown in the provided callback.
18
+ *
19
+ * To allow compilation to continue but still emit a warning, set this option to the following:
20
+ *
21
+ * ```js
22
+ * (err) => {
23
+ * console.warn(err);
24
+ * }
25
+ * ```
26
+ */
27
+ errorHandler?: (err: Error) => void;
28
+ /**
29
+ * Options related to managing the Sentry releases for a build.
30
+ *
31
+ * More info: https://docs.sentry.io/product/releases/
32
+ */
33
+ release?: {
34
+ /**
35
+ * Unique identifier for the release you want to create.
36
+ *
37
+ * This value can also be specified via the `SENTRY_RELEASE` environment variable.
38
+ *
39
+ * Defaults to automatically detecting a value for your environment.
40
+ * This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA.
41
+ * (the latter requires access to git CLI and for the root directory to be a valid repository)
42
+ *
43
+ * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
44
+ */
45
+ name?: string;
46
+ };
6
47
  /**
7
48
  * If this flag is `true`, and an auth token is detected, the Sentry SDK will
8
49
  * automatically generate and upload source maps to Sentry during a production build.
@@ -24,6 +65,12 @@ type SourceMapsOptions = {
24
65
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
25
66
  */
26
67
  org?: string;
68
+ /**
69
+ * The URL of your Sentry instance if you're using self-hosted Sentry.
70
+ *
71
+ * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
72
+ */
73
+ url?: string;
27
74
  /**
28
75
  * The project slug of your Sentry project.
29
76
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.7.0"
6
6
  },
7
- "version": "9.0.0-alpha.0",
7
+ "version": "9.0.0-alpha.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -272,7 +272,14 @@ function getPluginOptions(moduleOptions, deleteFilesAfterUpload) {
272
272
  project: sourceMapsUploadOptions.project ?? process.env.SENTRY_PROJECT,
273
273
  authToken: sourceMapsUploadOptions.authToken ?? process.env.SENTRY_AUTH_TOKEN,
274
274
  telemetry: sourceMapsUploadOptions.telemetry ?? true,
275
+ url: sourceMapsUploadOptions.url ?? process.env.SENTRY_URL,
275
276
  debug: moduleOptions.debug ?? false,
277
+ silent: sourceMapsUploadOptions.silent ?? false,
278
+ errorHandler: sourceMapsUploadOptions.errorHandler,
279
+ release: {
280
+ name: sourceMapsUploadOptions.release?.name,
281
+ ...moduleOptions?.unstable_sentryBundlerPluginOptions?.release
282
+ },
276
283
  _metaOptions: {
277
284
  telemetry: {
278
285
  metaFramework: "nuxt"
@@ -39,7 +39,9 @@ export default defineNitroPlugin((nitroApp) => {
39
39
  });
40
40
  });
41
41
  async function flushIfServerless() {
42
- const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL || !!process.env.NETLIFY;
42
+ const isServerless = !!process.env.FUNCTIONS_WORKER_RUNTIME || // Azure Functions
43
+ !!process.env.LAMBDA_TASK_ROOT || // AWS Lambda
44
+ !!process.env.VERCEL || !!process.env.NETLIFY;
43
45
  if (GLOBAL_OBJ[Symbol.for("@vercel/request-context")]) {
44
46
  vercelWaitUntil(flushWithTimeout());
45
47
  } else if (isServerless) {
@@ -6,7 +6,7 @@
6
6
  export declare const piniaIntegration: (pinia: unknown, options?: {
7
7
  attachPiniaState?: boolean | undefined;
8
8
  addBreadcrumbs?: boolean | undefined;
9
- actionTransformer?: ((action: any) => any) | undefined;
10
- stateTransformer?: ((state: any) => any) | undefined;
9
+ actionTransformer?: ((action: string) => any) | undefined;
10
+ stateTransformer?: ((state: Record<string, unknown>) => any) | undefined;
11
11
  } | undefined) => import("@sentry/core").Integration;
12
12
  //# sourceMappingURL=piniaIntegration.d.ts.map
@@ -5,6 +5,47 @@ import type { init as initVue } from '@sentry/vue';
5
5
  export type SentryNuxtClientOptions = Omit<Parameters<typeof initVue>[0] & object, 'app'>;
6
6
  export type SentryNuxtServerOptions = Omit<Parameters<typeof initNode>[0] & object, 'app'>;
7
7
  type SourceMapsOptions = {
8
+ /**
9
+ * Suppresses all logs.
10
+ *
11
+ * @default false
12
+ */
13
+ silent?: boolean;
14
+ /**
15
+ * When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
16
+ *
17
+ * By default, the plugin will simply throw an error, thereby stopping the bundling process.
18
+ * If an `errorHandler` callback is provided, compilation will continue, unless an error is
19
+ * thrown in the provided callback.
20
+ *
21
+ * To allow compilation to continue but still emit a warning, set this option to the following:
22
+ *
23
+ * ```js
24
+ * (err) => {
25
+ * console.warn(err);
26
+ * }
27
+ * ```
28
+ */
29
+ errorHandler?: (err: Error) => void;
30
+ /**
31
+ * Options related to managing the Sentry releases for a build.
32
+ *
33
+ * More info: https://docs.sentry.io/product/releases/
34
+ */
35
+ release?: {
36
+ /**
37
+ * Unique identifier for the release you want to create.
38
+ *
39
+ * This value can also be specified via the `SENTRY_RELEASE` environment variable.
40
+ *
41
+ * Defaults to automatically detecting a value for your environment.
42
+ * This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA.
43
+ * (the latter requires access to git CLI and for the root directory to be a valid repository)
44
+ *
45
+ * If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
46
+ */
47
+ name?: string;
48
+ };
8
49
  /**
9
50
  * If this flag is `true`, and an auth token is detected, the Sentry SDK will
10
51
  * automatically generate and upload source maps to Sentry during a production build.
@@ -26,6 +67,12 @@ type SourceMapsOptions = {
26
67
  * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
27
68
  */
28
69
  org?: string;
70
+ /**
71
+ * The URL of your Sentry instance if you're using self-hosted Sentry.
72
+ *
73
+ * @default https://sentry.io by default the plugin will point towards the Sentry SaaS URL
74
+ */
75
+ url?: string;
29
76
  /**
30
77
  * The project slug of your Sentry project.
31
78
  * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"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ACD,mBAAmB,EAAE,uBAAuB,GAC3C,oBAAoB,CA6BtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/nuxt",
3
- "version": "9.0.0-alpha.0",
3
+ "version": "9.0.0-alpha.2",
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",
@@ -43,13 +43,13 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@nuxt/kit": "^3.13.2",
46
- "@sentry/browser": "9.0.0-alpha.0",
47
- "@sentry/core": "9.0.0-alpha.0",
48
- "@sentry/node": "9.0.0-alpha.0",
49
- "@sentry/opentelemetry": "9.0.0-alpha.0",
46
+ "@sentry/browser": "9.0.0-alpha.2",
47
+ "@sentry/core": "9.0.0-alpha.2",
48
+ "@sentry/node": "9.0.0-alpha.2",
49
+ "@sentry/opentelemetry": "9.0.0-alpha.2",
50
50
  "@sentry/rollup-plugin": "2.22.7",
51
51
  "@sentry/vite-plugin": "2.22.6",
52
- "@sentry/vue": "9.0.0-alpha.0"
52
+ "@sentry/vue": "9.0.0-alpha.2"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@nuxt/module-builder": "^0.8.4",