@sentry/nuxt 8.36.0 → 8.37.0
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.
- package/build/cjs/client/index.js +2 -0
- package/build/cjs/client/index.js.map +1 -1
- package/build/cjs/client/piniaIntegration.js +40 -0
- package/build/cjs/client/piniaIntegration.js.map +1 -0
- package/build/cjs/index.client.js +2 -0
- package/build/cjs/index.client.js.map +1 -1
- package/build/cjs/module.js +2 -1
- package/build/cjs/module.js.map +1 -1
- package/build/cjs/vite/addServerConfig.js +22 -11
- package/build/cjs/vite/addServerConfig.js.map +1 -1
- package/build/cjs/vite/utils.js +100 -28
- package/build/cjs/vite/utils.js.map +1 -1
- package/build/esm/client/index.js +1 -0
- package/build/esm/client/index.js.map +1 -1
- package/build/esm/client/piniaIntegration.js +38 -0
- package/build/esm/client/piniaIntegration.js.map +1 -0
- package/build/esm/index.client.js +1 -0
- package/build/esm/index.client.js.map +1 -1
- package/build/esm/module.js +2 -1
- package/build/esm/module.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/vite/addServerConfig.js +24 -13
- package/build/esm/vite/addServerConfig.js.map +1 -1
- package/build/esm/vite/utils.js +98 -28
- package/build/esm/vite/utils.js.map +1 -1
- package/build/module/module.d.mts +12 -0
- package/build/module/module.d.ts +12 -0
- package/build/module/module.json +1 -1
- package/build/module/module.mjs +64 -17
- package/build/types/client/index.d.ts +1 -0
- package/build/types/client/index.d.ts.map +1 -1
- package/build/types/client/piniaIntegration.d.ts +12 -0
- package/build/types/client/piniaIntegration.d.ts.map +1 -0
- package/build/types/common/types.d.ts +12 -0
- package/build/types/common/types.d.ts.map +1 -1
- package/build/types/index.types.d.ts.map +1 -1
- package/build/types/module.d.ts.map +1 -1
- package/build/types/vite/addServerConfig.d.ts +1 -1
- package/build/types/vite/addServerConfig.d.ts.map +1 -1
- package/build/types/vite/utils.d.ts +15 -6
- package/build/types/vite/utils.d.ts.map +1 -1
- package/package.json +8 -8
package/build/module/module.json
CHANGED
package/build/module/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
2
|
import { createResolver, defineNuxtModule, addPluginTemplate, addPlugin, addServerPlugin } from '@nuxt/kit';
|
|
3
|
-
import {
|
|
3
|
+
import { flatten, consoleSandbox } from '@sentry/utils';
|
|
4
4
|
import * as fs from 'fs';
|
|
5
5
|
import { sentryRollupPlugin } from '@sentry/rollup-plugin';
|
|
6
6
|
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
@@ -22,29 +22,67 @@ function findDefaultSdkInitFile(type) {
|
|
|
22
22
|
return filePaths.find((filename) => fs.existsSync(filename));
|
|
23
23
|
}
|
|
24
24
|
const SENTRY_WRAPPED_ENTRY = "?sentry-query-wrapped-entry";
|
|
25
|
-
const
|
|
25
|
+
const SENTRY_WRAPPED_FUNCTIONS = "?sentry-query-wrapped-functions=";
|
|
26
|
+
const SENTRY_REEXPORTED_FUNCTIONS = "?sentry-query-reexported-functions=";
|
|
26
27
|
const QUERY_END_INDICATOR = "SENTRY-QUERY-END";
|
|
27
28
|
function removeSentryQueryFromPath(url) {
|
|
28
29
|
const regex = new RegExp(`\\${SENTRY_WRAPPED_ENTRY}.*?\\${QUERY_END_INDICATOR}`);
|
|
29
30
|
return url.replace(regex, "");
|
|
30
31
|
}
|
|
31
32
|
function extractFunctionReexportQueryParameters(query) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const wrapRegex = new RegExp(
|
|
34
|
+
`\\${SENTRY_WRAPPED_FUNCTIONS}(.*?)(\\${QUERY_END_INDICATOR}|\\${SENTRY_REEXPORTED_FUNCTIONS})`
|
|
35
|
+
);
|
|
36
|
+
const reexportRegex = new RegExp(`\\${SENTRY_REEXPORTED_FUNCTIONS}(.*?)(\\${QUERY_END_INDICATOR})`);
|
|
37
|
+
const wrapMatch = query.match(wrapRegex);
|
|
38
|
+
const reexportMatch = query.match(reexportRegex);
|
|
39
|
+
const wrap = wrapMatch && wrapMatch[1] ? wrapMatch[1].split(",").filter((param) => param !== "").map((str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")) : [];
|
|
40
|
+
const reexport = reexportMatch && reexportMatch[1] ? reexportMatch[1].split(",").filter((param) => param !== "" && param !== "default").map((str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")) : [];
|
|
41
|
+
return { wrap, reexport };
|
|
42
|
+
}
|
|
43
|
+
function constructWrappedFunctionExportQuery(exportedBindings, entrypointWrappedFunctions, debug) {
|
|
44
|
+
const functionsToExport = flatten(Object.values(exportedBindings || {})).reduce(
|
|
45
|
+
(functions, currFunctionName) => {
|
|
46
|
+
if (entrypointWrappedFunctions.includes(currFunctionName)) {
|
|
47
|
+
functions.wrap.push(currFunctionName);
|
|
48
|
+
} else {
|
|
49
|
+
functions.reexport.push(currFunctionName);
|
|
50
|
+
}
|
|
51
|
+
return functions;
|
|
52
|
+
},
|
|
53
|
+
{ wrap: [], reexport: [] }
|
|
54
|
+
);
|
|
55
|
+
if (debug && functionsToExport.wrap.length === 0) {
|
|
56
|
+
consoleSandbox(
|
|
57
|
+
() => (
|
|
58
|
+
// eslint-disable-next-line no-console
|
|
59
|
+
console.warn(
|
|
60
|
+
"[Sentry] No functions found to wrap. In case the server needs to export async functions other than `handler` or `server`, consider adding the name(s) to Sentry's build options `sentry.entrypointWrappedFunctions` in `nuxt.config.ts`."
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const wrapQuery = functionsToExport.wrap.length ? `${SENTRY_WRAPPED_FUNCTIONS}${functionsToExport.wrap.join(",")}` : "";
|
|
66
|
+
const reexportQuery = functionsToExport.reexport.length ? `${SENTRY_REEXPORTED_FUNCTIONS}${functionsToExport.reexport.join(",")}` : "";
|
|
67
|
+
return [wrapQuery, reexportQuery].join("");
|
|
35
68
|
}
|
|
36
69
|
function constructFunctionReExport(pathWithQuery, entryId) {
|
|
37
|
-
const
|
|
38
|
-
return
|
|
70
|
+
const { wrap: wrapFunctions, reexport: reexportFunctions } = extractFunctionReexportQueryParameters(pathWithQuery);
|
|
71
|
+
return wrapFunctions.reduce(
|
|
39
72
|
(functionsCode, currFunctionName) => functionsCode.concat(
|
|
40
|
-
`async function
|
|
73
|
+
`async function ${currFunctionName}_sentryWrapped(...args) {
|
|
41
74
|
const res = await import(${JSON.stringify(entryId)});
|
|
42
75
|
return res.${currFunctionName}.call(this, ...args);
|
|
43
76
|
}
|
|
44
|
-
export {
|
|
77
|
+
export { ${currFunctionName}_sentryWrapped as ${currFunctionName} };
|
|
45
78
|
`
|
|
46
79
|
),
|
|
47
80
|
""
|
|
81
|
+
).concat(
|
|
82
|
+
reexportFunctions.reduce(
|
|
83
|
+
(functionsCode, currFunctionName) => functionsCode.concat(`export { ${currFunctionName} } from ${JSON.stringify(entryId)};`),
|
|
84
|
+
""
|
|
85
|
+
)
|
|
48
86
|
);
|
|
49
87
|
}
|
|
50
88
|
|
|
@@ -82,7 +120,7 @@ function addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile) {
|
|
|
82
120
|
});
|
|
83
121
|
});
|
|
84
122
|
}
|
|
85
|
-
function addDynamicImportEntryFileWrapper(nitro, serverConfigFile) {
|
|
123
|
+
function addDynamicImportEntryFileWrapper(nitro, serverConfigFile, moduleOptions) {
|
|
86
124
|
if (!nitro.options.rollupConfig) {
|
|
87
125
|
nitro.options.rollupConfig = { output: {} };
|
|
88
126
|
}
|
|
@@ -92,10 +130,17 @@ function addDynamicImportEntryFileWrapper(nitro, serverConfigFile) {
|
|
|
92
130
|
nitro.options.rollupConfig.plugins = [nitro.options.rollupConfig.plugins];
|
|
93
131
|
}
|
|
94
132
|
nitro.options.rollupConfig.plugins.push(
|
|
95
|
-
wrapEntryWithDynamicImport(
|
|
133
|
+
wrapEntryWithDynamicImport({
|
|
134
|
+
resolvedSentryConfigPath: createResolver(nitro.options.srcDir).resolve(`/${serverConfigFile}`),
|
|
135
|
+
entrypointWrappedFunctions: moduleOptions.entrypointWrappedFunctions
|
|
136
|
+
})
|
|
96
137
|
);
|
|
97
138
|
}
|
|
98
|
-
function wrapEntryWithDynamicImport(
|
|
139
|
+
function wrapEntryWithDynamicImport({
|
|
140
|
+
resolvedSentryConfigPath,
|
|
141
|
+
entrypointWrappedFunctions,
|
|
142
|
+
debug
|
|
143
|
+
}) {
|
|
99
144
|
return {
|
|
100
145
|
name: "sentry-wrap-entry-with-dynamic-import",
|
|
101
146
|
async resolveId(source, importer, options) {
|
|
@@ -111,15 +156,16 @@ function wrapEntryWithDynamicImport(resolvedSentryConfigPath) {
|
|
|
111
156
|
return resolution;
|
|
112
157
|
const moduleInfo = await this.load(resolution);
|
|
113
158
|
moduleInfo.moduleSideEffects = true;
|
|
114
|
-
|
|
115
|
-
|
|
159
|
+
return resolution.id.includes(`.mjs${SENTRY_WRAPPED_ENTRY}`) ? resolution.id : resolution.id.concat(SENTRY_WRAPPED_ENTRY).concat(
|
|
160
|
+
constructWrappedFunctionExportQuery(moduleInfo.exportedBindings, entrypointWrappedFunctions, debug)
|
|
161
|
+
).concat(QUERY_END_INDICATOR);
|
|
116
162
|
}
|
|
117
163
|
return null;
|
|
118
164
|
},
|
|
119
165
|
load(id) {
|
|
120
166
|
if (id.includes(`.mjs${SENTRY_WRAPPED_ENTRY}`)) {
|
|
121
167
|
const entryId = removeSentryQueryFromPath(id);
|
|
122
|
-
const reExportedFunctions = id.includes(
|
|
168
|
+
const reExportedFunctions = id.includes(SENTRY_WRAPPED_FUNCTIONS) || id.includes(SENTRY_REEXPORTED_FUNCTIONS) ? constructFunctionReExport(id, entryId) : "";
|
|
123
169
|
return (
|
|
124
170
|
// Regular `import` of the Sentry config
|
|
125
171
|
`import ${JSON.stringify(resolvedSentryConfigPath)};
|
|
@@ -331,8 +377,9 @@ const module = defineNuxtModule({
|
|
|
331
377
|
setup(moduleOptionsParam, nuxt) {
|
|
332
378
|
const moduleOptions = {
|
|
333
379
|
...moduleOptionsParam,
|
|
334
|
-
dynamicImportForServerEntry: moduleOptionsParam.dynamicImportForServerEntry !== false
|
|
380
|
+
dynamicImportForServerEntry: moduleOptionsParam.dynamicImportForServerEntry !== false,
|
|
335
381
|
// default: true
|
|
382
|
+
entrypointWrappedFunctions: moduleOptionsParam.entrypointWrappedFunctions || ["default", "handler", "server"]
|
|
336
383
|
};
|
|
337
384
|
const moduleDirResolver = createResolver(import.meta.url);
|
|
338
385
|
const buildDirResolver = createResolver(nuxt.options.buildDir);
|
|
@@ -393,7 +440,7 @@ export default defineNuxtPlugin(() => {})`
|
|
|
393
440
|
});
|
|
394
441
|
}
|
|
395
442
|
} else {
|
|
396
|
-
addDynamicImportEntryFileWrapper(nitro, serverConfigFile);
|
|
443
|
+
addDynamicImportEntryFileWrapper(nitro, serverConfigFile, moduleOptions);
|
|
397
444
|
if (moduleOptions.debug) {
|
|
398
445
|
consoleSandbox(() => {
|
|
399
446
|
console.log(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monitor an existing Pinia store.
|
|
3
|
+
*
|
|
4
|
+
* This only works if "@pinia/nuxt" is added to the `modules` array.
|
|
5
|
+
*/
|
|
6
|
+
export declare const piniaIntegration: (pinia: unknown, options?: {
|
|
7
|
+
attachPiniaState?: boolean | undefined;
|
|
8
|
+
addBreadcrumbs?: boolean | undefined;
|
|
9
|
+
actionTransformer?: ((action: any) => any) | undefined;
|
|
10
|
+
stateTransformer?: ((state: any) => any) | undefined;
|
|
11
|
+
} | undefined) => import("@sentry/types").Integration;
|
|
12
|
+
//# sourceMappingURL=piniaIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"piniaIntegration.d.ts","sourceRoot":"","sources":["../../../src/client/piniaIntegration.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;qDAAuC,CAAC"}
|
|
@@ -103,6 +103,18 @@ export type SentryNuxtModuleOptions = {
|
|
|
103
103
|
* @default true
|
|
104
104
|
*/
|
|
105
105
|
dynamicImportForServerEntry?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* By default—unless you configure `dynamicImportForServerEntry: false`—the SDK will try to wrap your Nitro server entrypoint
|
|
108
|
+
* with a dynamic `import()` to ensure all dependencies can be properly instrumented. Any previous exports from the entrypoint are still exported.
|
|
109
|
+
* Most exports of the server entrypoint are serverless functions and those are wrapped by Sentry. Other exports stay as-is.
|
|
110
|
+
*
|
|
111
|
+
* By default, the SDK will wrap the default export as well as a `handler` or `server` export from the entrypoint.
|
|
112
|
+
* If your server has a different main export that is used to run the server, you can overwrite this by providing an array of export names to wrap.
|
|
113
|
+
* Any wrapped export is expected to be an async function.
|
|
114
|
+
*
|
|
115
|
+
* @default ['default', 'handler', 'server']
|
|
116
|
+
*/
|
|
117
|
+
entrypointWrappedFunctions?: string[];
|
|
106
118
|
/**
|
|
107
119
|
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/rollup-plugin`) and Sentry Vite Plugin (`@sentry/vite-plugin`) that ship with the Sentry Nuxt SDK.
|
|
108
120
|
* You can use this option to override any options the SDK passes to the Vite (for Nuxt) and Rollup (for Nitro) plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"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,GAAG,OAAO,SAAS,CAAC,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAK9D,MAAM,MAAM,aAAa,GAAG,uBAAuB,CAAC;;AAEpD,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAK9D,MAAM,MAAM,aAAa,GAAG,uBAAuB,CAAC;;AAEpD,wBA4GG"}
|
|
@@ -15,5 +15,5 @@ export declare function addServerConfigToBuild(moduleOptions: SentryNuxtModuleOp
|
|
|
15
15
|
* With this, the Sentry server config can be loaded before all other modules of the application (which is needed for import-in-the-middle).
|
|
16
16
|
* See: https://nodejs.org/api/module.html#enabling
|
|
17
17
|
*/
|
|
18
|
-
export declare function addDynamicImportEntryFileWrapper(nitro: Nitro, serverConfigFile: string): void;
|
|
18
|
+
export declare function addDynamicImportEntryFileWrapper(nitro: Nitro, serverConfigFile: string, moduleOptions: Omit<SentryNuxtModuleOptions, 'entrypointWrappedFunctions'> & Required<Pick<SentryNuxtModuleOptions, 'entrypointWrappedFunctions'>>): void;
|
|
19
19
|
//# sourceMappingURL=addServerConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addServerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/addServerConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"addServerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/addServerConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAa/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,uBAAuB,EACtC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,MAAM,GACvB,IAAI,CA8CN;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,IAAI,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,GACxE,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,CAAC,GACtE,IAAI,CAkBN"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function findDefaultSdkInitFile(type: 'server' | 'client'): string | undefined;
|
|
6
6
|
export declare const SENTRY_WRAPPED_ENTRY = "?sentry-query-wrapped-entry";
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SENTRY_WRAPPED_FUNCTIONS = "?sentry-query-wrapped-functions=";
|
|
8
|
+
export declare const SENTRY_REEXPORTED_FUNCTIONS = "?sentry-query-reexported-functions=";
|
|
8
9
|
export declare const QUERY_END_INDICATOR = "SENTRY-QUERY-END";
|
|
9
10
|
/**
|
|
10
11
|
* Strips the Sentry query part from a path.
|
|
@@ -14,15 +15,23 @@ export declare const QUERY_END_INDICATOR = "SENTRY-QUERY-END";
|
|
|
14
15
|
*/
|
|
15
16
|
export declare function removeSentryQueryFromPath(url: string): string;
|
|
16
17
|
/**
|
|
17
|
-
* Extracts and sanitizes function re-export query parameters from a query string.
|
|
18
|
-
* If it is a default export, it is not considered for re-exporting.
|
|
19
|
-
* serverless `handler` functions.
|
|
18
|
+
* Extracts and sanitizes function re-export and function wrap query parameters from a query string.
|
|
19
|
+
* If it is a default export, it is not considered for re-exporting.
|
|
20
20
|
*
|
|
21
21
|
* Only exported for testing.
|
|
22
22
|
*/
|
|
23
|
-
export declare function extractFunctionReexportQueryParameters(query: string):
|
|
23
|
+
export declare function extractFunctionReexportQueryParameters(query: string): {
|
|
24
|
+
wrap: string[];
|
|
25
|
+
reexport: string[];
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
28
|
+
* Constructs a comma-separated string with all functions that need to be re-exported later from the server entry.
|
|
29
|
+
* It uses Rollup's `exportedBindings` to determine the functions to re-export. Functions which should be wrapped
|
|
30
|
+
* (e.g. serverless handlers) are wrapped by Sentry.
|
|
31
|
+
*/
|
|
32
|
+
export declare function constructWrappedFunctionExportQuery(exportedBindings: Record<string, string[]> | null, entrypointWrappedFunctions: string[], debug?: boolean): string;
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a code snippet with function reexports (can be used in Rollup plugins as a return value for `load()`)
|
|
26
35
|
*/
|
|
27
36
|
export declare function constructFunctionReExport(pathWithQuery: string, entryId: string): string;
|
|
28
37
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAkBpF;AAED,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAC3E,eAAO,MAAM,2BAA2B,wCAAwC,CAAC;AACjF,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA+B5G;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EACjD,0BAA0B,EAAE,MAAM,EAAE,EACpC,KAAK,CAAC,EAAE,OAAO,GACd,MAAM,CAgCR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBxF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/nuxt",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.0",
|
|
4
4
|
"description": "Official Sentry SDK for Nuxt (EXPERIMENTAL)",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@nuxt/kit": "^3.13.2",
|
|
46
|
-
"@sentry/browser": "8.
|
|
47
|
-
"@sentry/core": "8.
|
|
48
|
-
"@sentry/node": "8.
|
|
49
|
-
"@sentry/opentelemetry": "8.
|
|
46
|
+
"@sentry/browser": "8.37.0",
|
|
47
|
+
"@sentry/core": "8.37.0",
|
|
48
|
+
"@sentry/node": "8.37.0",
|
|
49
|
+
"@sentry/opentelemetry": "8.37.0",
|
|
50
50
|
"@sentry/rollup-plugin": "2.22.6",
|
|
51
|
-
"@sentry/types": "8.
|
|
52
|
-
"@sentry/utils": "8.
|
|
51
|
+
"@sentry/types": "8.37.0",
|
|
52
|
+
"@sentry/utils": "8.37.0",
|
|
53
53
|
"@sentry/vite-plugin": "2.22.6",
|
|
54
|
-
"@sentry/vue": "8.
|
|
54
|
+
"@sentry/vue": "8.37.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@nuxt/module-builder": "^0.8.4",
|