@@ -2,3 +2,99 @@ import type { init } from '@sentry/vue';
2
2
3
3
// Omitting 'app' as the Nuxt SDK will add the app instance in the client plugin (users do not have to provide this)
4
4
export type SentryNuxtOptions = Omit < Parameters < typeof init > [ 0 ] & object , 'app' > ;
5
+
6
+ type SourceMapsOptions = {
7
+ /**
8
+ * Options for the Sentry Vite plugin to customize the source maps upload process.
9
+ *
10
+ * These options are always read from the `sentry` module options in the `nuxt.config.(js|ts).
11
+ * Do not define them in the `sentry.client.config.(js|ts)` or `sentry.server.config.(js|ts)` files.
12
+ */
13
+ sourceMapsUploadOptions ?: {
14
+ /**
15
+ * If this flag is `true`, and an auth token is detected, the Sentry integration will
16
+ * automatically generate and upload source maps to Sentry during a production build.
17
+ *
18
+ * @default true
19
+ */
20
+ enabled ?: boolean ;
21
+
22
+ /**
23
+ * The auth token to use when uploading source maps to Sentry.
24
+ *
25
+ * Instead of specifying this option, you can also set the `SENTRY_AUTH_TOKEN` environment variable.
26
+ *
27
+ * To create an auth token, follow this guide:
28
+ * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
29
+ */
30
+ authToken ?: string ;
31
+
32
+ /**
33
+ * The organization slug of your Sentry organization.
34
+ * Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
35
+ */
36
+ org ?: string ;
37
+
38
+ /**
39
+ * The project slug of your Sentry project.
40
+ * Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
41
+ */
42
+ project ?: string ;
43
+
44
+ /**
45
+ * If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
46
+ * It will not collect any sensitive or user-specific data.
47
+ *
48
+ * @default true
49
+ */
50
+ telemetry ?: boolean ;
51
+
52
+ /**
53
+ * Options related to sourcemaps
54
+ */
55
+ sourcemaps ?: {
56
+ /**
57
+ * A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
58
+ *
59
+ * If this option is not specified, sensible defaults based on your adapter and nuxt.config.js
60
+ * setup will be used. Use this option to override these defaults, for instance if you have a
61
+ * customized build setup that diverges from Nuxt's defaults.
62
+ *
63
+ * The globbing patterns must follow the implementation of the `glob` package.
64
+ * @see https://www.npmjs.com/package/glob#glob-primer
65
+ */
66
+ assets ?: string | Array < string > ;
67
+
68
+ /**
69
+ * A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
70
+ *
71
+ * @default [] - By default no files are ignored. Thus, all files matching the `assets` glob
72
+ * or the default value for `assets` are uploaded.
73
+ *
74
+ * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
75
+ */
76
+ ignore ?: string | Array < string > ;
77
+
78
+ /**
79
+ * A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact
80
+ * upload to Sentry has been completed.
81
+ *
82
+ * @default [] - By default no files are deleted.
83
+ *
84
+ * The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
85
+ */
86
+ filesToDeleteAfterUpload ?: string | Array < string > ;
87
+ } ;
88
+ } ;
89
+ } ;
90
+
91
+ /**
92
+ * Build options for the Sentry module. These options are used during build-time by the Sentry SDK.
93
+ */
94
+ export type SentryNuxtModuleOptions = SourceMapsOptions & {
95
+ /**
96
+ * Enable debug functionality of the SDK during build-time.
97
+ * Enabling this will give you, for example, logs about source maps.
98
+ */
99
+ debug ?: boolean ;
100
+ } ;
0 commit comments