@sentry/nuxt 10.53.1 → 10.55.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/piniaIntegration.js +7 -19
- package/build/cjs/client/piniaIntegration.js.map +1 -1
- package/build/cjs/client/sdk.js +2 -9
- package/build/cjs/client/sdk.js.map +1 -1
- package/build/cjs/client/vueIntegration.js +3 -10
- package/build/cjs/client/vueIntegration.js.map +1 -1
- package/build/cjs/common/debug-build.js +0 -5
- package/build/cjs/common/debug-build.js.map +1 -1
- package/build/cjs/module.js +52 -107
- package/build/cjs/module.js.map +1 -1
- package/build/cjs/server/sdk.js +20 -60
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/cjs/vendor/server-template.js +0 -6
- package/build/cjs/vendor/server-template.js.map +1 -1
- package/build/cjs/vite/addServerConfig.js +45 -144
- package/build/cjs/vite/addServerConfig.js.map +1 -1
- package/build/cjs/vite/databaseConfig.js +10 -32
- package/build/cjs/vite/databaseConfig.js.map +1 -1
- package/build/cjs/vite/middlewareConfig.js +11 -46
- package/build/cjs/vite/middlewareConfig.js.map +1 -1
- package/build/cjs/vite/sentryVitePlugin.js +7 -24
- package/build/cjs/vite/sentryVitePlugin.js.map +1 -1
- package/build/cjs/vite/sourceMaps.js +89 -248
- package/build/cjs/vite/sourceMaps.js.map +1 -1
- package/build/cjs/vite/storageConfig.js +4 -10
- package/build/cjs/vite/storageConfig.js.map +1 -1
- package/build/cjs/vite/utils.js +51 -143
- package/build/cjs/vite/utils.js.map +1 -1
- package/build/esm/client/piniaIntegration.js +7 -19
- package/build/esm/client/piniaIntegration.js.map +1 -1
- package/build/esm/client/sdk.js +2 -9
- package/build/esm/client/sdk.js.map +1 -1
- package/build/esm/client/vueIntegration.js +3 -10
- package/build/esm/client/vueIntegration.js.map +1 -1
- package/build/esm/common/debug-build.js +0 -5
- package/build/esm/common/debug-build.js.map +1 -1
- package/build/esm/module.js +52 -107
- package/build/esm/module.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/sdk.js +20 -60
- package/build/esm/server/sdk.js.map +1 -1
- package/build/esm/vendor/server-template.js +0 -6
- package/build/esm/vendor/server-template.js.map +1 -1
- package/build/esm/vite/addServerConfig.js +45 -144
- package/build/esm/vite/addServerConfig.js.map +1 -1
- package/build/esm/vite/databaseConfig.js +10 -32
- package/build/esm/vite/databaseConfig.js.map +1 -1
- package/build/esm/vite/middlewareConfig.js +11 -46
- package/build/esm/vite/middlewareConfig.js.map +1 -1
- package/build/esm/vite/sentryVitePlugin.js +7 -24
- package/build/esm/vite/sentryVitePlugin.js.map +1 -1
- package/build/esm/vite/sourceMaps.js +89 -248
- package/build/esm/vite/sourceMaps.js.map +1 -1
- package/build/esm/vite/storageConfig.js +4 -10
- package/build/esm/vite/storageConfig.js.map +1 -1
- package/build/esm/vite/utils.js +51 -143
- package/build/esm/vite/utils.js.map +1 -1
- package/build/module/module.d.mts +17 -0
- package/build/module/module.d.ts +17 -0
- package/build/module/module.json +1 -1
- package/build/module/module.mjs +6 -6
- package/build/types/common/types.d.ts +17 -0
- package/build/types/common/types.d.ts.map +1 -1
- package/build/types/vite/utils.d.ts +2 -1
- package/build/types/vite/utils.d.ts.map +1 -1
- package/package.json +8 -8
package/build/module/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createResolver, useNuxt, addServerPlugin, addServerImports, defineNuxtModule, addPluginTemplate, addPlugin, addVitePlugin, addTemplate } from '@nuxt/kit';
|
|
1
|
+
import { resolvePath, createResolver, useNuxt, addServerPlugin, addServerImports, defineNuxtModule, addPluginTemplate, addPlugin, addVitePlugin, addTemplate } from '@nuxt/kit';
|
|
2
2
|
import { consoleSandbox, debug } from '@sentry/core';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
@@ -18,7 +18,7 @@ async function getNitroMajorVersion() {
|
|
|
18
18
|
}
|
|
19
19
|
return 2;
|
|
20
20
|
}
|
|
21
|
-
function findDefaultSdkInitFile(type, nuxt) {
|
|
21
|
+
async function findDefaultSdkInitFile(type, nuxt, options) {
|
|
22
22
|
const possibleFileExtensions = ["ts", "js", "mjs", "cjs", "mts", "cts"];
|
|
23
23
|
const relativePaths = [];
|
|
24
24
|
if (type === "server") {
|
|
@@ -40,9 +40,9 @@ function findDefaultSdkInitFile(type, nuxt) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const rootDir = options?.configDir ? await resolvePath(options.configDir, { type: "dir" }) : process.cwd();
|
|
44
44
|
for (const relativePath of relativePaths) {
|
|
45
|
-
const fullPath = path.resolve(
|
|
45
|
+
const fullPath = path.resolve(rootDir, relativePath);
|
|
46
46
|
if (fs.existsSync(fullPath)) {
|
|
47
47
|
return fullPath;
|
|
48
48
|
}
|
|
@@ -671,7 +671,7 @@ const module = defineNuxtModule({
|
|
|
671
671
|
};
|
|
672
672
|
const moduleDirResolver = createResolver(import.meta.url);
|
|
673
673
|
const buildDirResolver = createResolver(nuxt.options.buildDir);
|
|
674
|
-
const clientConfigFile = findDefaultSdkInitFile("client", nuxt);
|
|
674
|
+
const clientConfigFile = await findDefaultSdkInitFile("client", nuxt, moduleOptions);
|
|
675
675
|
if (clientConfigFile) {
|
|
676
676
|
addPluginTemplate({
|
|
677
677
|
mode: "client",
|
|
@@ -695,7 +695,7 @@ const module = defineNuxtModule({
|
|
|
695
695
|
order: 1
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
|
-
const serverConfigFile = findDefaultSdkInitFile("server", nuxt);
|
|
698
|
+
const serverConfigFile = await findDefaultSdkInitFile("server", nuxt, moduleOptions);
|
|
699
699
|
const isNitroV3 = await getNitroMajorVersion() >= 3;
|
|
700
700
|
const nuxtMajor = parseInt(nuxt._version?.split(".")[0] ?? "3", 10);
|
|
701
701
|
const isMinNuxtV4 = nuxtMajor >= 4;
|
|
@@ -203,6 +203,23 @@ export type SentryNuxtModuleOptions = BuildTimeOptionsBase & {
|
|
|
203
203
|
* @default undefined
|
|
204
204
|
*/
|
|
205
205
|
autoInjectServerSentry?: 'top-level-import' | 'experimental_dynamic-import';
|
|
206
|
+
/**
|
|
207
|
+
* Provide the resolved path to a custom Sentry client config file.
|
|
208
|
+
*
|
|
209
|
+
* If not provided, the default location (`<projectRoot>/sentry.(client|server).config.(js|ts)`) will be used to look up the config file.
|
|
210
|
+
* If there is no file at the default location either, the SDK won't be initialized.
|
|
211
|
+
*
|
|
212
|
+
* Resolves the full path to a file or directory, respecting Nuxt alias and extensions options.
|
|
213
|
+
* @example
|
|
214
|
+
*
|
|
215
|
+
* ```ts
|
|
216
|
+
* sentry: {
|
|
217
|
+
* configDir: '~/sentry-config',
|
|
218
|
+
* // Sentry will search for `<rootDir>/<srcDir>/sentry-config/sentry.(client|server).config.(js|ts)` files.
|
|
219
|
+
* }
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
configDir?: string;
|
|
206
223
|
/**
|
|
207
224
|
* When `autoInjectServerSentry` is set to `"experimental_dynamic-import"`, the SDK will wrap your Nitro server entrypoint
|
|
208
225
|
* with a dynamic `import()` to ensure all dependencies can be properly instrumented. Any previous exports from the entrypoint are still exported.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,UAAU,CAAC,OA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1,5 @@
|
|
|
1
1
|
import type { Nuxt } from '@nuxt/schema';
|
|
2
|
+
import type { SentryNuxtModuleOptions } from '../common/types';
|
|
2
3
|
/**
|
|
3
4
|
* Gets the major version of the installed nitro package.
|
|
4
5
|
* Returns 2 as the default if nitro is not found or the version cannot be determined.
|
|
@@ -8,7 +9,7 @@ export declare function getNitroMajorVersion(): Promise<number>;
|
|
|
8
9
|
* Find the default SDK init file for the given type (client or server).
|
|
9
10
|
* The sentry.server.config file is prioritized over the instrument.server file.
|
|
10
11
|
*/
|
|
11
|
-
export declare function findDefaultSdkInitFile(type: 'server' | 'client', nuxt?: Nuxt): string | undefined
|
|
12
|
+
export declare function findDefaultSdkInitFile(type: 'server' | 'client', nuxt?: Nuxt, options?: SentryNuxtModuleOptions): Promise<string | undefined>;
|
|
12
13
|
/**
|
|
13
14
|
* Extracts the filename from a node command with a path.
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG/D;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAY5D;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,IAAI,CAAC,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAqC7B;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIlF;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,CA2B5G;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,CAmCR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBxF;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,UAAQ,GAAG,IAAI,CAY9E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/nuxt",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.55.0",
|
|
4
4
|
"description": "Official Sentry SDK for Nuxt",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt",
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@nuxt/kit": "^3.13.2",
|
|
58
|
-
"@sentry/browser": "10.
|
|
59
|
-
"@sentry/cloudflare": "10.
|
|
60
|
-
"@sentry/core": "10.
|
|
61
|
-
"@sentry/node": "10.
|
|
62
|
-
"@sentry/node-core": "10.
|
|
58
|
+
"@sentry/browser": "10.55.0",
|
|
59
|
+
"@sentry/cloudflare": "10.55.0",
|
|
60
|
+
"@sentry/core": "10.55.0",
|
|
61
|
+
"@sentry/node": "10.55.0",
|
|
62
|
+
"@sentry/node-core": "10.55.0",
|
|
63
63
|
"@sentry/rollup-plugin": "^5.3.0",
|
|
64
64
|
"@sentry/vite-plugin": "^5.3.0",
|
|
65
|
-
"@sentry/vue": "10.
|
|
65
|
+
"@sentry/vue": "10.55.0",
|
|
66
66
|
"local-pkg": "^1.1.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@nuxt/module-builder": "^0.8.4",
|
|
70
|
-
"@nuxt/nitro-server": "^3.21.
|
|
70
|
+
"@nuxt/nitro-server": "^3.21.6",
|
|
71
71
|
"nitro": "^3.0.260311-beta",
|
|
72
72
|
"nuxi": "^3.25.1",
|
|
73
73
|
"nuxt": "3.17.7",
|