11import type { BrowserOptions } from '@sentry/browser' ;
22import type { Options } from '@sentry/types' ;
3- import type { SentryVitePluginOptions } from '@sentry/vite-plugin' ;
43
54type SdkInitPaths = {
65 /**
76 * Path to a `sentry.client.config.(js|ts)` file that contains a `Sentry.init` call.
8- * If this option is not specified, the default location (`src/sentry.client.config.(js|ts)`) will be used.
9- * If there is no file at the default location, a default `Sentry.init` call will made.
7+ *
8+ * If this option is not specified, the default location (`<projectRoot>/sentry.client.config.(js|ts)`)
9+ * will be used to look up the config file.
10+ * If there is no file at the default location either, the SDK will initalize with the options
11+ * specified in the `sentryAstro` integration or with default options.
1012 */
1113 clientInitPath ?: string ;
14+
1215 /**
13- * Path to a `sentry.client.config.(js|ts)` file that contains a `Sentry.init` call.
14- * If this option is not specified, the default location (`src/sentry.client.config.(js|ts)`) will be used.
15- * If there is no file at the default location, a default `Sentry.init` call will made.
16+ * Path to a `sentry.server.config.(js|ts)` file that contains a `Sentry.init` call.
17+ *
18+ * If this option is not specified, the default location (`<projectRoot>/sentry.server.config.(js|ts)`)
19+ * will be used to look up the config file.
20+ * If there is no file at the default location either, the SDK will initalize with the options
21+ * specified in the `sentryAstro` integration or with default options.
1622 */
1723 serverInitPath ?: string ;
1824} ;
1925
26+ type SourceMapsOptions = {
27+ /**
28+ * Options for the Sentry Vite plugin to customize the source maps upload process.
29+ *
30+ * These options are always read from the `sentryAstro` integration.
31+ * Do not define them in the `sentry.client.config.(js|ts)` or `sentry.server.config.(js|ts)` files.
32+ */
33+ sourceMapsUploadOptions ?: {
34+ /**
35+ * If this flag is `true`, and an auth token is detected, the Sentry integration will
36+ * automatically generate and upload source maps to Sentry during a production build.
37+ *
38+ * @default true
39+ */
40+ enabled ?: boolean ;
41+
42+ /**
43+ * The auth token to use when uploading source maps to Sentry.
44+ *
45+ * Instead of specifying this option, you can also set the `SENTRY_AUTH_TOKEN` environment variable.
46+ *
47+ * To create an auth token, follow this guide:
48+ * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
49+ */
50+ authToken ?: string ;
51+
52+ /**
53+ * The organization slug of your Sentry organization.
54+ * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
55+ */
56+ org ?: string ;
57+
58+ /**
59+ * The project slug of your Sentry project.
60+ * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
61+ */
62+ project ?: string ;
63+
64+ /**
65+ * If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
66+ * It will not collect any sensitive or user-specific data.
67+ *
68+ * @default true
69+ */
70+ telemetry ?: boolean ;
71+ } ;
72+ } ;
73+
2074/**
2175 * A subset of Sentry SDK options that can be set via the `sentryAstro` integration.
2276 * Some options (e.g. integrations) are set by default and cannot be changed here.
@@ -29,4 +83,4 @@ type SdkInitPaths = {
2983export type SentryOptions = SdkInitPaths &
3084 Pick < Options , 'dsn' | 'release' | 'environment' | 'sampleRate' | 'tracesSampleRate' | 'debug' > &
3185 Pick < BrowserOptions , 'replaysSessionSampleRate' | 'replaysOnErrorSampleRate' > &
32- Pick < SentryVitePluginOptions , 'authToken' | 'org' | 'project' | 'telemetry' > ;
86+ SourceMapsOptions ;
0 commit comments