{"version":3,"file":"index.js","sources":["../../../src/integration/index.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport type { AstroConfig, AstroIntegration, AstroIntegrationLogger } from 'astro';\nimport * as fs from 'fs';\nimport { createRequire } from 'module';\nimport * as path from 'path';\nimport { sentryCloudflareNodeWarningPlugin, sentryCloudflareVitePlugin } from './cloudflare';\nimport { buildClientSnippet, buildSdkInitFileImportSnippet, buildServerSnippet } from './snippets';\nimport type { SentryOptions } from './types';\n\nconst PKG_NAME = '@sentry/astro';\n\nexport const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {\n  return {\n    name: PKG_NAME,\n    hooks: {\n      // eslint-disable-next-line complexity\n      'astro:config:setup': async ({ updateConfig, injectScript, addMiddleware, config, command, logger }) => {\n        // The third param here enables loading of all env vars, regardless of prefix\n        // see: https://main.vitejs.dev/config/#using-environment-variables-in-config\n\n        // TODO: Ideally, we want to load the environment with vite like this:\n        // const env = loadEnv('production', process.cwd(), '');\n        // However, this currently throws a build error.\n        // Will revisit this later.\n        const env = process.env;\n\n        const {\n          enabled,\n          clientInitPath,\n          serverInitPath,\n          autoInstrumentation,\n          // eslint-disable-next-line deprecation/deprecation\n          sourceMapsUploadOptions,\n          sourcemaps,\n          // todo(v11): Extract `release` build time option here - cannot be done currently, because it conflicts with the `DeprecatedRuntimeOptions` type\n          // release,\n          bundleSizeOptimizations,\n          applicationKey,\n          unstable_sentryVitePluginOptions,\n          debug,\n          org,\n          project,\n          authToken,\n          sentryUrl,\n          headers,\n          telemetry,\n          silent,\n          errorHandler,\n          ...deprecatedOptions\n        } = options;\n\n        const deprecatedOptionsKeys = Object.keys(deprecatedOptions);\n        if (deprecatedOptionsKeys.length > 0) {\n          logger.warn(\n            `You passed in additional options (${deprecatedOptionsKeys.join(\n              ', ',\n            )}) to the Sentry integration. This is deprecated and will stop working in a future version. Instead, configure the Sentry SDK in your \\`sentry.client.config.(js|ts)\\` or \\`sentry.server.config.(js|ts)\\` files.`,\n          );\n        }\n\n        const sdkEnabled = {\n          client: typeof enabled === 'boolean' ? enabled : (enabled?.client ?? true),\n          server: typeof enabled === 'boolean' ? enabled : (enabled?.server ?? true),\n        };\n\n        const sourceMapsNeeded = sdkEnabled.client || sdkEnabled.server;\n        // eslint-disable-next-line deprecation/deprecation\n        const { unstable_sentryVitePluginOptions: deprecatedVitePluginOptions, ...uploadOptions } =\n          sourceMapsUploadOptions || {};\n\n        const unstableMerged_sentryVitePluginOptions = {\n          ...deprecatedVitePluginOptions,\n          ...unstable_sentryVitePluginOptions,\n        };\n\n        const shouldUploadSourcemaps =\n          (sourceMapsNeeded &&\n            sourcemaps?.disable !== true &&\n            // eslint-disable-next-line deprecation/deprecation\n            uploadOptions?.enabled) ??\n          true;\n\n        // We don't need to check for AUTH_TOKEN here, because the plugin will pick it up from the env\n        if (shouldUploadSourcemaps && command !== 'dev') {\n          const computedSourceMapSettings = _getUpdatedSourceMapSettings(config, options, logger);\n\n          let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n          if (\n            // eslint-disable-next-line deprecation/deprecation\n            typeof uploadOptions?.filesToDeleteAfterUpload === 'undefined' &&\n            typeof sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n            computedSourceMapSettings.previousUserSourceMapSetting === 'unset'\n          ) {\n            // This also works for adapters, as the source maps are also copied to e.g. the .vercel folder\n            updatedFilesToDeleteAfterUpload = ['./dist/**/client/**/*.map', './dist/**/server/**/*.map'];\n\n            debug &&\n              logger.info(\n                `Automatically setting \\`sourceMapsUploadOptions.filesToDeleteAfterUpload: ${JSON.stringify(\n                  updatedFilesToDeleteAfterUpload,\n                )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n              );\n          }\n\n          updateConfig({\n            vite: {\n              build: {\n                sourcemap: computedSourceMapSettings.updatedSourceMapSetting,\n              },\n              plugins: [\n                sentryVitePlugin({\n                  applicationKey,\n                  // Priority: top-level options > deprecated options > env vars\n                  // eslint-disable-next-line deprecation/deprecation\n                  org: org ?? uploadOptions.org ?? env.SENTRY_ORG,\n                  // eslint-disable-next-line deprecation/deprecation\n                  project: project ?? uploadOptions.project ?? env.SENTRY_PROJECT,\n                  // eslint-disable-next-line deprecation/deprecation\n                  authToken: authToken ?? uploadOptions.authToken ?? env.SENTRY_AUTH_TOKEN,\n                  url: sentryUrl ?? env.SENTRY_URL,\n                  headers,\n                  // eslint-disable-next-line deprecation/deprecation\n                  telemetry: telemetry ?? uploadOptions.telemetry ?? true,\n                  silent: silent ?? false,\n                  errorHandler,\n                  _metaOptions: {\n                    telemetry: {\n                      metaFramework: 'astro',\n                    },\n                  },\n                  ...unstableMerged_sentryVitePluginOptions,\n                  debug: debug ?? false,\n                  sourcemaps: {\n                    ...sourcemaps,\n                    // eslint-disable-next-line deprecation/deprecation\n                    assets: sourcemaps?.assets ?? uploadOptions.assets ?? [getSourcemapsAssetsGlob(config)],\n                    filesToDeleteAfterUpload:\n                      sourcemaps?.filesToDeleteAfterUpload ??\n                      // eslint-disable-next-line deprecation/deprecation\n                      uploadOptions?.filesToDeleteAfterUpload ??\n                      updatedFilesToDeleteAfterUpload,\n                    ...unstableMerged_sentryVitePluginOptions?.sourcemaps,\n                  },\n                  bundleSizeOptimizations: {\n                    ...bundleSizeOptimizations,\n                    ...unstableMerged_sentryVitePluginOptions?.bundleSizeOptimizations,\n                  },\n                }),\n              ],\n            },\n          });\n        }\n\n        if (sdkEnabled.client) {\n          const pathToClientInit = clientInitPath ? path.resolve(clientInitPath) : findDefaultSdkInitFile('client');\n\n          if (pathToClientInit) {\n            debug && logger.info(`Using ${pathToClientInit} for client init.`);\n            injectScript('page', buildSdkInitFileImportSnippet(pathToClientInit));\n          } else {\n            debug && logger.info('Using default client init.');\n            injectScript('page', buildClientSnippet(options || {}));\n          }\n        }\n\n        const isCloudflare = config?.adapter?.name?.startsWith('@astrojs/cloudflare');\n        const isCloudflareWorkers = isCloudflare && !isCloudflarePages();\n\n        if (isCloudflare) {\n          try {\n            const _require = createRequire(`${process.cwd()}/`);\n            _require.resolve('@sentry/cloudflare');\n          } catch {\n            logger.error(\n              'You are using the Cloudflare adapter but `@sentry/cloudflare` is not installed. ' +\n                'Please install the `@sentry/cloudflare` package in your project.',\n            );\n            process.exit(1);\n          }\n        }\n\n        if (sdkEnabled.server) {\n          const pathToServerInit = serverInitPath ? path.resolve(serverInitPath) : findDefaultSdkInitFile('server');\n\n          if (pathToServerInit) {\n            debug && logger.info(`Using ${pathToServerInit} for server init.`);\n            // Always inject the server config via `injectScript('page-ssr')`.\n            // This ensures Sentry.init() runs in dev mode (where the Vite plugin doesn't fire)\n            // and also serves as the fallback for non-Cloudflare adapters in production.\n            injectScript('page-ssr', buildSdkInitFileImportSnippet(pathToServerInit));\n          } else {\n            debug && logger.info('Using default server init.');\n            injectScript('page-ssr', buildServerSnippet(options || {}));\n          }\n\n          if (isCloudflareWorkers && command !== 'dev') {\n            // For Cloudflare Workers production builds, additionally use a Vite plugin to:\n            // 1. Import the server config at the Worker entry level (so Sentry.init() runs\n            //    for ALL requests, not just SSR pages — covers actions and API routes)\n            // 2. Wrap the default export with `withSentry` from @sentry/cloudflare for\n            //    per-request isolation, async context, and trace propagation\n            //\n            // Note: We do NOT set `ssr.noExternal` here. The `@astrojs/cloudflare` adapter\n            // already configures Vite to bundle all dependencies for Workers. Explicitly\n            // adding `@sentry/node` to `noExternal` would cause Vite to emit dozens of\n            // warnings about auto-externalizing Node.js built-in modules that @sentry/node\n            // and its transitive dependencies (OpenTelemetry, etc.) import.\n            debug && logger.info('Adding Cloudflare Vite plugin to wrap Worker entry with withSentry.');\n            updateConfig({\n              vite: {\n                plugins: [sentryCloudflareNodeWarningPlugin(), sentryCloudflareVitePlugin()],\n              },\n            });\n          } else if (isCloudflare) {\n            // Prevent Sentry from being externalized for SSR.\n            // Cloudflare environments have Node.js APIs available under `node:` prefix.\n            // Ref: https://developers.cloudflare.com/workers/runtime-apis/nodejs/\n            updateConfig({\n              vite: {\n                plugins: [sentryCloudflareNodeWarningPlugin()],\n                ssr: {\n                  // @sentry/node is required in case we have 2 different @sentry/node\n                  // packages installed in the same project.\n                  // Ref: https://github.com/getsentry/sentry-javascript/issues/10121\n                  noExternal: ['@sentry/astro', '@sentry/node'],\n                },\n              },\n            });\n          }\n        }\n\n        // In Astro 5+, `config.output` is no longer explicitly set — having an adapter\n        // implies SSR capability. We check for the adapter to handle this correctly.\n        const isSSR = config && (config.output === 'server' || config.output === 'hybrid' || !!config.adapter);\n        const shouldAddMiddleware = sdkEnabled.server && autoInstrumentation?.requestHandler !== false;\n\n        // Guarding calling the addMiddleware function because it was only introduced in astro@3.5.0\n        // Users on older versions of astro will need to add the middleware manually.\n        const supportsAddMiddleware = typeof addMiddleware === 'function';\n\n        if (supportsAddMiddleware && isSSR && shouldAddMiddleware) {\n          addMiddleware({\n            order: 'pre',\n            entrypoint: '@sentry/astro/middleware',\n          });\n        }\n      },\n    },\n  };\n};\n\nconst possibleFileExtensions = ['ts', 'js', 'tsx', 'jsx', 'mjs', 'cjs', 'mts'];\n\nfunction findDefaultSdkInitFile(type: 'server' | 'client'): string | undefined {\n  const cwd = process.cwd();\n  return possibleFileExtensions\n    .map(e => path.resolve(path.join(cwd, `sentry.${type}.config.${e}`)))\n    .find(filename => fs.existsSync(filename));\n}\n\n/**\n * Detects if the project is a Cloudflare Pages project by checking for\n * `pages_build_output_dir` in the wrangler configuration file.\n *\n * Cloudflare Pages projects use `pages_build_output_dir` while Workers projects\n * use `assets.directory` or `main` fields instead.\n */\nfunction isCloudflarePages(): boolean {\n  const cwd = process.cwd();\n  const configFiles = ['wrangler.jsonc', 'wrangler.json', 'wrangler.toml'];\n\n  for (const configFile of configFiles) {\n    const configPath = path.join(cwd, configFile);\n\n    if (!fs.existsSync(configPath)) {\n      continue;\n    }\n\n    const content = fs.readFileSync(configPath, 'utf-8');\n\n    if (configFile.endsWith('.toml')) {\n      // https://regex101.com/r/Uxe4p0/1\n      // Match pages_build_output_dir as a TOML key (at start of line, ignoring whitespace)\n      // This avoids false positives from comments (lines starting with #)\n      return /^\\s*pages_build_output_dir\\s*=/m.test(content);\n    }\n\n    // Match \"pages_build_output_dir\" as a JSON key (followed by :)\n    // This works for both .json and .jsonc without needing to strip comments\n    return /\"pages_build_output_dir\"\\s*:/.test(content);\n  }\n\n  return false;\n}\n\nfunction getSourcemapsAssetsGlob(config: AstroConfig): string {\n  // The vercel adapter puts the output into its .vercel directory\n  // However, the way this adapter is written, the config.outDir value is update too late for\n  // us to reliably detect it. Also, server files are first temporarily written to <root>/dist and then\n  // only copied over to <root>/.vercel. This seems to happen too late though.\n  // So we glob on both of these directories.\n  // Another case of \"it ain't pretty but it works\":(\n  if (config.adapter?.name?.startsWith('@astrojs/vercel')) {\n    return '{.vercel,dist}/**/*';\n  }\n\n  // paths are stored as \"file://\" URLs\n  const outDirPathname = config.outDir && path.resolve(config.outDir.pathname);\n  const rootDirName = path.resolve(config.root?.pathname || process.cwd());\n\n  if (outDirPathname) {\n    const relativePath = path.relative(rootDirName, outDirPathname);\n    return `${relativePath}/**/*`;\n  }\n\n  // fallback to default output dir\n  return 'dist/**/*';\n}\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/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n *     1. User explicitly disabled source maps\n *       - keep this setting (emit a warning that errors won't be unminified in Sentry)\n *       - We won't upload anything\n *\n *     2. Users enabled source map generation (true, 'hidden', 'inline').\n *       - keep this setting (don't do anything - like deletion - besides uploading)\n *\n *     3. Users didn't set source maps generation\n *       - we enable 'hidden' source maps generation\n *       - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function _getUpdatedSourceMapSettings(\n  astroConfig: AstroConfig,\n  sentryOptions: SentryOptions | undefined,\n  logger: AstroIntegrationLogger,\n): { previousUserSourceMapSetting: UserSourceMapSetting; updatedSourceMapSetting: boolean | 'inline' | 'hidden' } {\n  let previousUserSourceMapSetting: UserSourceMapSetting = undefined;\n\n  astroConfig.build = astroConfig.build || {};\n\n  const viteSourceMap = astroConfig?.vite?.build?.sourcemap;\n  let updatedSourceMapSetting = viteSourceMap;\n\n  const settingKey = 'vite.build.sourcemap';\n  const debug = sentryOptions?.debug;\n\n  if (viteSourceMap === false) {\n    previousUserSourceMapSetting = 'disabled';\n    updatedSourceMapSetting = viteSourceMap;\n\n    if (debug) {\n      // Longer debug message with more details\n      logger.warn(\n        `Source map generation is currently disabled in your Astro configuration (\\`${settingKey}: false\\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n      );\n    } else {\n      logger.warn('Source map generation is disabled in your Astro configuration.');\n    }\n  } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n    previousUserSourceMapSetting = 'enabled';\n    updatedSourceMapSetting = viteSourceMap;\n\n    debug &&\n      logger.info(\n        `We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n      );\n  } else {\n    previousUserSourceMapSetting = 'unset';\n    updatedSourceMapSetting = 'hidden';\n\n    debug &&\n      logger.info(\n        `Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n      );\n  }\n\n  return { previousUserSourceMapSetting, updatedSourceMapSetting };\n}\n"],"names":[],"mappings":";;;;;;;AASA,MAAM,QAAA,GAAW,eAAe;;AAEzB,MAAM,cAAc,CAAC,OAAO,GAAkB,EAAE,KAAuB;AAC9E,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,KAAK,EAAE;AACX;AACA,MAAM,oBAAoB,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,aA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