@sentry/nitro 10.76.1 → 10.76.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.
@@ -1 +1 @@
1
- {"type":"module","version":"10.76.1","sideEffects":false}
1
+ {"type":"module","version":"10.76.2","sideEffects":false}
@@ -1,4 +1,4 @@
1
- import { createSentryBuildPluginManager } from '@sentry/bundler-plugin-core';
1
+ import { createSentryBuildPluginManager } from '@sentry/bundler-plugins/core';
2
2
 
3
3
  function setupSourceMaps(nitro, options, sentryEnabledSourcemaps) {
4
4
  if (shouldSkipSourcemapUpload(nitro, options)) {
@@ -1 +1 @@
1
- {"version":3,"file":"sourceMaps.js","sources":["../../src/sourceMaps.ts"],"sourcesContent":["import type { Options as BundlerPluginOptions } from '@sentry/bundler-plugin-core';\nimport { createSentryBuildPluginManager } from '@sentry/bundler-plugin-core';\nimport type { Nitro, NitroConfig } from 'nitro/types';\nimport type { SentryNitroOptions } from './config';\n\n/**\n * Registers a `compiled` hook to upload source maps after the build completes.\n */\nexport function setupSourceMaps(nitro: Nitro, options?: SentryNitroOptions, sentryEnabledSourcemaps?: boolean): void {\n // The `compiled` hook fires on EVERY rebuild during `nitro dev` watch mode.\n // nitro.options.dev is reliably set by the time module setup runs.\n if (shouldSkipSourcemapUpload(nitro, options)) {\n return;\n }\n\n nitro.hooks.hook('compiled', async (_nitro: Nitro) => {\n await handleSourceMapUpload(_nitro, options, sentryEnabledSourcemaps);\n });\n}\n\n/**\n * Determines if sourcemap uploads should be skipped.\n */\nfunction shouldSkipSourcemapUpload(nitro: Nitro, options?: SentryNitroOptions): boolean {\n return !!(\n nitro.options.dev ||\n nitro.options.preset === 'nitro-prerender' ||\n nitro.options.sourcemap === false ||\n (nitro.options.sourcemap as unknown) === 'inline' ||\n options?.sourcemaps?.disable === true\n );\n}\n\n/**\n * Handles the actual source map upload after the build completes.\n */\nasync function handleSourceMapUpload(\n nitro: Nitro,\n options?: SentryNitroOptions,\n sentryEnabledSourcemaps?: boolean,\n): Promise<void> {\n const outputDir = nitro.options.output.serverDir;\n const pluginOptions = getPluginOptions(options, sentryEnabledSourcemaps, outputDir);\n\n const sentryBuildPluginManager = createSentryBuildPluginManager(pluginOptions, {\n buildTool: 'nitro',\n loggerPrefix: '[@sentry/nitro]',\n });\n\n await sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();\n await sentryBuildPluginManager.createRelease();\n\n await sentryBuildPluginManager.injectDebugIds([outputDir]);\n\n if (options?.sourcemaps?.disable !== 'disable-upload') {\n await sentryBuildPluginManager.uploadSourcemaps([outputDir], {\n // We don't prepare the artifacts because we injected debug IDs manually before\n prepareArtifacts: false,\n });\n await sentryBuildPluginManager.deleteArtifacts();\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 * Removes a trailing slash from a path so glob patterns can be appended cleanly.\n */\nfunction removeTrailingSlash(path: string): string {\n return path.replace(/\\/$/, '');\n}\n\n/**\n * Builds the plugin options for `createSentryBuildPluginManager` from the Sentry Nitro options.\n *\n * Only exported for testing purposes.\n */\n// oxlint-disable-next-line complexity\nexport function getPluginOptions(\n options?: SentryNitroOptions,\n sentryEnabledSourcemaps?: boolean,\n outputDir?: string,\n): BundlerPluginOptions {\n const defaultFilesToDelete =\n sentryEnabledSourcemaps && outputDir ? [`${removeTrailingSlash(outputDir)}/**/*.map`] : undefined;\n\n if (options?.debug && defaultFilesToDelete && options?.sourcemaps?.filesToDeleteAfterUpload === undefined) {\n // eslint-disable-next-line no-console\n console.log(\n `[@sentry/nitro] Setting \\`sourcemaps.filesToDeleteAfterUpload: [\"${defaultFilesToDelete[0]}\"]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return {\n org: options?.org ?? process.env.SENTRY_ORG,\n project: options?.project ?? process.env.SENTRY_PROJECT,\n authToken: options?.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n url: options?.sentryUrl ?? process.env.SENTRY_URL,\n headers: options?.headers,\n telemetry: options?.telemetry ?? true,\n debug: options?.debug ?? false,\n silent: options?.silent ?? false,\n errorHandler: options?.errorHandler,\n sourcemaps: {\n disable: options?.sourcemaps?.disable,\n assets: options?.sourcemaps?.assets,\n ignore: options?.sourcemaps?.ignore,\n filesToDeleteAfterUpload: options?.sourcemaps?.filesToDeleteAfterUpload ?? defaultFilesToDelete,\n rewriteSources: options?.sourcemaps?.rewriteSources ?? ((source: string) => normalizePath(source)),\n },\n release: options?.release,\n bundleSizeOptimizations: options?.bundleSizeOptimizations,\n _metaOptions: {\n telemetry: {\n metaFramework: 'nitro',\n },\n },\n };\n}\n\n/* Source map configuration rules:\n 1. User explicitly disabled source maps (sourcemap: false)\n - Keep their setting, emit a warning that errors won't be unminified in Sentry\n - We will not upload anything\n 2. User enabled source map generation (true)\n - Keep their setting (don't modify besides uploading)\n 3. User did not set source maps (undefined)\n - We enable source maps for Sentry\n - Configure `filesToDeleteAfterUpload` to clean up .map files after upload\n*/\nexport function configureSourcemapSettings(\n config: NitroConfig,\n moduleOptions?: SentryNitroOptions,\n): { sentryEnabledSourcemaps: boolean } {\n const sourcemapUploadDisabled = moduleOptions?.sourcemaps?.disable === true;\n if (sourcemapUploadDisabled) {\n return { sentryEnabledSourcemaps: false };\n }\n\n // Nitro types `sourcemap` as `boolean`, but it forwards the value to Vite which also accepts `'hidden'` and `'inline'`.\n const userSourcemap = (config as { sourcemap?: boolean | 'hidden' | 'inline' }).sourcemap;\n\n if (userSourcemap === false) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nitro] You have explicitly disabled source maps (`sourcemap: false`). Sentry will not upload source maps, and errors will not be unminified. To let Sentry handle source maps, remove the `sourcemap` option from your Nitro config, or use `sourcemaps: { disable: true }` in your Sentry options to silence this warning.',\n );\n return { sentryEnabledSourcemaps: false };\n }\n\n if (userSourcemap === 'inline') {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nitro] You have set `sourcemap: \"inline\"`. Inline source maps are embedded in the output bundle, so there are no `.map` files to upload. Sentry will not upload source maps. Set `sourcemap: \"hidden\"` (or leave it unset) to let Sentry upload source maps and un-minify errors.',\n );\n return { sentryEnabledSourcemaps: false };\n }\n\n let sentryEnabledSourcemaps = false;\n if (userSourcemap === true || userSourcemap === 'hidden') {\n if (moduleOptions?.debug) {\n // eslint-disable-next-line no-console\n console.log(\n `[@sentry/nitro] Source maps are already enabled (\\`sourcemap: ${JSON.stringify(userSourcemap)}\\`). Sentry will upload them for error unminification.`,\n );\n }\n } else {\n // User did not explicitly set sourcemap, enable hidden source maps for Sentry.\n // `'hidden'` emits .map files without adding a `//# sourceMappingURL=` comment to the output, avoiding public exposure.\n (config as { sourcemap?: unknown }).sourcemap = 'hidden';\n sentryEnabledSourcemaps = true;\n if (moduleOptions?.debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[@sentry/nitro] Enabled hidden source map generation for Sentry. Source map files will be deleted after upload.',\n );\n }\n }\n\n // Nitro v3 has a `sourcemapMinify` plugin that destructively deletes `sourcesContent`,\n // `x_google_ignoreList`, and clears `mappings` for any chunk containing `node_modules`.\n // This makes sourcemaps unusable for Sentry.\n config.experimental = config.experimental || {};\n config.experimental.sourcemapMinify = false;\n\n return { sentryEnabledSourcemaps };\n}\n"],"names":[],"mappings":";;AAQO,SAAS,eAAA,CAAgB,KAAA,EAAc,OAAA,EAA8B,uBAAA,EAAyC;AAGnH,EAAA,IAAI,yBAAA,CAA0B,KAAA,EAAO,OAAO,CAAA,EAAG;AAC7C,IAAA;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,KAAA,CAAM,IAAA,CAAK,UAAA,EAAY,OAAO,MAAA,KAAkB;AACpD,IAAA,MAAM,qBAAA,CAAsB,MAAA,EAAQ,OAAA,EAAS,uBAAuB,CAAA;AAAA,EACtE,CAAC,CAAA;AACH;AAKA,SAAS,yBAAA,CAA0B,OAAc,OAAA,EAAuC;AACtF,EAAA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;AAAA,EACF;AAKA,EAAA,MAAA,CAAO,YAAA,GAAe,MAAA,CAAO,YAAA,IAAgB,EAAC;AAC9C,EAAA,MAAA,CAAO,aAAa,eAAA,GAAkB,KAAA;AAEtC,EAAA,OAAO,EAAE,uBAAA,EAAwB;AACnC;;;;"}
1
+ {"version":3,"file":"sourceMaps.js","sources":["../../src/sourceMaps.ts"],"sourcesContent":["import type { Options as BundlerPluginOptions } from '@sentry/bundler-plugins/core';\nimport { createSentryBuildPluginManager } from '@sentry/bundler-plugins/core';\nimport type { Nitro, NitroConfig } from 'nitro/types';\nimport type { SentryNitroOptions } from './config';\n\n/**\n * Registers a `compiled` hook to upload source maps after the build completes.\n */\nexport function setupSourceMaps(nitro: Nitro, options?: SentryNitroOptions, sentryEnabledSourcemaps?: boolean): void {\n // The `compiled` hook fires on EVERY rebuild during `nitro dev` watch mode.\n // nitro.options.dev is reliably set by the time module setup runs.\n if (shouldSkipSourcemapUpload(nitro, options)) {\n return;\n }\n\n nitro.hooks.hook('compiled', async (_nitro: Nitro) => {\n await handleSourceMapUpload(_nitro, options, sentryEnabledSourcemaps);\n });\n}\n\n/**\n * Determines if sourcemap uploads should be skipped.\n */\nfunction shouldSkipSourcemapUpload(nitro: Nitro, options?: SentryNitroOptions): boolean {\n return !!(\n nitro.options.dev ||\n nitro.options.preset === 'nitro-prerender' ||\n nitro.options.sourcemap === false ||\n (nitro.options.sourcemap as unknown) === 'inline' ||\n options?.sourcemaps?.disable === true\n );\n}\n\n/**\n * Handles the actual source map upload after the build completes.\n */\nasync function handleSourceMapUpload(\n nitro: Nitro,\n options?: SentryNitroOptions,\n sentryEnabledSourcemaps?: boolean,\n): Promise<void> {\n const outputDir = nitro.options.output.serverDir;\n const pluginOptions = getPluginOptions(options, sentryEnabledSourcemaps, outputDir);\n\n const sentryBuildPluginManager = createSentryBuildPluginManager(pluginOptions, {\n buildTool: 'nitro',\n loggerPrefix: '[@sentry/nitro]',\n });\n\n await sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();\n await sentryBuildPluginManager.createRelease();\n\n await sentryBuildPluginManager.injectDebugIds([outputDir]);\n\n if (options?.sourcemaps?.disable !== 'disable-upload') {\n await sentryBuildPluginManager.uploadSourcemaps([outputDir], {\n // We don't prepare the artifacts because we injected debug IDs manually before\n prepareArtifacts: false,\n });\n await sentryBuildPluginManager.deleteArtifacts();\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 * Removes a trailing slash from a path so glob patterns can be appended cleanly.\n */\nfunction removeTrailingSlash(path: string): string {\n return path.replace(/\\/$/, '');\n}\n\n/**\n * Builds the plugin options for `createSentryBuildPluginManager` from the Sentry Nitro options.\n *\n * Only exported for testing purposes.\n */\n// oxlint-disable-next-line complexity\nexport function getPluginOptions(\n options?: SentryNitroOptions,\n sentryEnabledSourcemaps?: boolean,\n outputDir?: string,\n): BundlerPluginOptions {\n const defaultFilesToDelete =\n sentryEnabledSourcemaps && outputDir ? [`${removeTrailingSlash(outputDir)}/**/*.map`] : undefined;\n\n if (options?.debug && defaultFilesToDelete && options?.sourcemaps?.filesToDeleteAfterUpload === undefined) {\n // eslint-disable-next-line no-console\n console.log(\n `[@sentry/nitro] Setting \\`sourcemaps.filesToDeleteAfterUpload: [\"${defaultFilesToDelete[0]}\"]\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return {\n org: options?.org ?? process.env.SENTRY_ORG,\n project: options?.project ?? process.env.SENTRY_PROJECT,\n authToken: options?.authToken ?? process.env.SENTRY_AUTH_TOKEN,\n url: options?.sentryUrl ?? process.env.SENTRY_URL,\n headers: options?.headers,\n telemetry: options?.telemetry ?? true,\n debug: options?.debug ?? false,\n silent: options?.silent ?? false,\n errorHandler: options?.errorHandler,\n sourcemaps: {\n disable: options?.sourcemaps?.disable,\n assets: options?.sourcemaps?.assets,\n ignore: options?.sourcemaps?.ignore,\n filesToDeleteAfterUpload: options?.sourcemaps?.filesToDeleteAfterUpload ?? defaultFilesToDelete,\n rewriteSources: options?.sourcemaps?.rewriteSources ?? ((source: string) => normalizePath(source)),\n },\n release: options?.release,\n bundleSizeOptimizations: options?.bundleSizeOptimizations,\n _metaOptions: {\n telemetry: {\n metaFramework: 'nitro',\n },\n },\n };\n}\n\n/* Source map configuration rules:\n 1. User explicitly disabled source maps (sourcemap: false)\n - Keep their setting, emit a warning that errors won't be unminified in Sentry\n - We will not upload anything\n 2. User enabled source map generation (true)\n - Keep their setting (don't modify besides uploading)\n 3. User did not set source maps (undefined)\n - We enable source maps for Sentry\n - Configure `filesToDeleteAfterUpload` to clean up .map files after upload\n*/\nexport function configureSourcemapSettings(\n config: NitroConfig,\n moduleOptions?: SentryNitroOptions,\n): { sentryEnabledSourcemaps: boolean } {\n const sourcemapUploadDisabled = moduleOptions?.sourcemaps?.disable === true;\n if (sourcemapUploadDisabled) {\n return { sentryEnabledSourcemaps: false };\n }\n\n // Nitro types `sourcemap` as `boolean`, but it forwards the value to Vite which also accepts `'hidden'` and `'inline'`.\n const userSourcemap = (config as { sourcemap?: boolean | 'hidden' | 'inline' }).sourcemap;\n\n if (userSourcemap === false) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nitro] You have explicitly disabled source maps (`sourcemap: false`). Sentry will not upload source maps, and errors will not be unminified. To let Sentry handle source maps, remove the `sourcemap` option from your Nitro config, or use `sourcemaps: { disable: true }` in your Sentry options to silence this warning.',\n );\n return { sentryEnabledSourcemaps: false };\n }\n\n if (userSourcemap === 'inline') {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nitro] You have set `sourcemap: \"inline\"`. Inline source maps are embedded in the output bundle, so there are no `.map` files to upload. Sentry will not upload source maps. Set `sourcemap: \"hidden\"` (or leave it unset) to let Sentry upload source maps and un-minify errors.',\n );\n return { sentryEnabledSourcemaps: false };\n }\n\n let sentryEnabledSourcemaps = false;\n if (userSourcemap === true || userSourcemap === 'hidden') {\n if (moduleOptions?.debug) {\n // eslint-disable-next-line no-console\n console.log(\n `[@sentry/nitro] Source maps are already enabled (\\`sourcemap: ${JSON.stringify(userSourcemap)}\\`). Sentry will upload them for error unminification.`,\n );\n }\n } else {\n // User did not explicitly set sourcemap, enable hidden source maps for Sentry.\n // `'hidden'` emits .map files without adding a `//# sourceMappingURL=` comment to the output, avoiding public exposure.\n (config as { sourcemap?: unknown }).sourcemap = 'hidden';\n sentryEnabledSourcemaps = true;\n if (moduleOptions?.debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[@sentry/nitro] Enabled hidden source map generation for Sentry. Source map files will be deleted after upload.',\n );\n }\n }\n\n // Nitro v3 has a `sourcemapMinify` plugin that destructively deletes `sourcesContent`,\n // `x_google_ignoreList`, and clears `mappings` for any chunk containing `node_modules`.\n // This makes sourcemaps unusable for Sentry.\n config.experimental = config.experimental || {};\n config.experimental.sourcemapMinify = false;\n\n return { sentryEnabledSourcemaps };\n}\n"],"names":[],"mappings":";;AAQO,SAAS,eAAA,CAAgB,KAAA,EAAc,OAAA,EAA8B,uBAAA,EAAyC;AAGnH,EAAA,IAAI,yBAAA,CAA0B,KAAA,EAAO,OAAO,CAAA,EAAG;AAC7C,IAAA;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,KAAA,CAAM,IAAA,CAAK,UAAA,EAAY,OAAO,MAAA,KAAkB;AACpD,IAAA,MAAM,qBAAA,CAAsB,MAAA,EAAQ,OAAA,EAAS,uBAAuB,CAAA;AAAA,EACtE,CAAC,CAAA;AACH;AAKA,SAAS,yBAAA,CAA0B,OAAc,OAAA,EAAuC;AACtF,EAAA,OAAO,CAAC,EACN,KAAA,CAAM,QAAQ,GAAA,IACd,KAAA,CAAM,QAAQ,MAAA,KAAW,iBAAA,IACzB,MAAM,OAAA,CAAQ,SAAA,KAAc,SAC3B,KAAA,CAAM,OAAA,CAAQ,cAA0B,QAAA,IACzC,OAAA,EAAS,YAAY,OAAA,KAAY,IAAA,CAAA;AA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ginOptions } from '@sentry/bundler-plugin-core';
1
+ import type { Options as BundlerPluginOptions } from '@sentry/bundler-plugins/core';
2
2
  import type { Nitro, NitroConfig } from 'nitro/types';
3
3
  import type { SentryNitroOptions } from './config';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../src/sourceMaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,kBAAkB,EAAE,uBAAuB,CAAC,EAAE,OAAO,GAAG,IAAI,CAUnH;AA2DD;;;;GAIG;AAEH,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,kBAAkB,EAC5B,uBAAuB,CAAC,EAAE,OAAO,EACjC,SAAS,CAAC,EAAE,MAAM,GACjB,oBAAoB,CAoCtB;AAYD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,aAAa,CAAC,EAAE,kBAAkB,GACjC;IAAE,uBAAuB,EAAE,OAAO,CAAA;CAAE,CAqDtC"}
1
+ {"version":3,"file":"sourceMaps.d.ts","sourceRoot":"","sources":["../../src/sourceMaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,kBAAkB,EAAE,uBAAuB,CAAC,EAAE,OAAO,GAAG,IAAI,CAUnH;AA2DD;;;;GAIG;AAEH,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,kBAAkB,EAC5B,uBAAuB,CAAC,EAAE,OAAO,EACjC,SAAS,CAAC,EAAE,MAAM,GACjB,oBAAoB,CAoCtB;AAYD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,aAAa,CAAC,EAAE,kBAAkB,GACjC;IAAE,uBAAuB,EAAE,OAAO,CAAA;CAAE,CAqDtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/nitro",
3
- "version": "10.76.1",
3
+ "version": "10.76.2",
4
4
  "description": "Official Sentry SDK for Nitro",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nitro",
@@ -36,10 +36,10 @@
36
36
  "nitro": ">=3.0.0-0 <4.0.0 || 3.0.260311-beta || 3.0.260415-beta"
37
37
  },
38
38
  "dependencies": {
39
- "@sentry/bundler-plugin-core": "^5.3.0",
40
- "@sentry/core": "10.76.1",
41
- "@sentry/node": "10.76.1",
42
- "@sentry/server-utils": "10.76.1"
39
+ "@sentry/bundler-plugins": "10.76.2",
40
+ "@sentry/core": "10.76.2",
41
+ "@sentry/node": "10.76.2",
42
+ "@sentry/server-utils": "10.76.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "nitro": "^3.0.260415-beta"