@@ -35,13 +35,21 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
3535 bundleSizeOptimizations,
3636 unstable_sentryVitePluginOptions,
3737 debug,
38- ...otherOptions
38+ org,
39+ project,
40+ authToken,
41+ sentryUrl,
42+ headers,
43+ telemetry,
44+ silent,
45+ errorHandler,
46+ ...deprecatedOptions
3947 } = options ;
4048
41- const otherOptionsKeys = Object . keys ( otherOptions ) ;
42- if ( otherOptionsKeys . length > 0 ) {
49+ const deprecatedOptionsKeys = Object . keys ( deprecatedOptions ) ;
50+ if ( deprecatedOptionsKeys . length > 0 ) {
4351 logger . warn (
44- `You passed in additional options (${ otherOptionsKeys . join (
52+ `You passed in additional options (${ deprecatedOptionsKeys . join (
4553 ', ' ,
4654 ) } ) 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.`,
4755 ) ;
@@ -101,26 +109,26 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
101109 sentryVitePlugin ( {
102110 // Priority: top-level options > deprecated options > env vars
103111 // eslint-disable-next-line deprecation/deprecation
104- org : options . org ?? uploadOptions . org ?? env . SENTRY_ORG ,
112+ org : org ?? uploadOptions . org ?? env . SENTRY_ORG ,
105113 // eslint-disable-next-line deprecation/deprecation
106- project : options . project ?? uploadOptions . project ?? env . SENTRY_PROJECT ,
114+ project : project ?? uploadOptions . project ?? env . SENTRY_PROJECT ,
107115 // eslint-disable-next-line deprecation/deprecation
108- authToken : options . authToken ?? uploadOptions . authToken ?? env . SENTRY_AUTH_TOKEN ,
109- url : options . sentryUrl ?? env . SENTRY_URL ,
110- headers : options . headers ,
116+ authToken : authToken ?? uploadOptions . authToken ?? env . SENTRY_AUTH_TOKEN ,
117+ url : sentryUrl ?? env . SENTRY_URL ,
118+ headers,
111119 // eslint-disable-next-line deprecation/deprecation
112- telemetry : options . telemetry ?? uploadOptions . telemetry ?? true ,
113- silent : options . silent ?? false ,
114- errorHandler : options . errorHandler ,
120+ telemetry : telemetry ?? uploadOptions . telemetry ?? true ,
121+ silent : silent ?? false ,
122+ errorHandler,
115123 _metaOptions : {
116124 telemetry : {
117125 metaFramework : 'astro' ,
118126 } ,
119127 } ,
120128 ...unstableMerged_sentryVitePluginOptions ,
121- debug : options . debug ?? false ,
129+ debug : debug ?? false ,
122130 sourcemaps : {
123- ...options . sourcemaps ,
131+ ...sourcemaps ,
124132 // eslint-disable-next-line deprecation/deprecation
125133 assets : sourcemaps ?. assets ?? uploadOptions . assets ?? [ getSourcemapsAssetsGlob ( config ) ] ,
126134 filesToDeleteAfterUpload :
0 commit comments