@sentry/nuxt 11.0.0-beta.1 → 11.0.0-rc.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/common/devMode.js +16 -0
- package/build/cjs/common/devMode.js.map +1 -1
- package/build/cjs/module.js +32 -48
- package/build/cjs/module.js.map +1 -1
- package/build/cjs/server/sdk.js +15 -0
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/cjs/vite/addServerConfig.js +81 -30
- package/build/cjs/vite/addServerConfig.js.map +1 -1
- package/build/cjs/vite/middlewareConfig.js +7 -6
- package/build/cjs/vite/middlewareConfig.js.map +1 -1
- package/build/cjs/vite/orchestrion.js +2 -1
- package/build/cjs/vite/orchestrion.js.map +1 -1
- package/build/cjs/vite/utils.js +15 -9
- package/build/cjs/vite/utils.js.map +1 -1
- package/build/esm/common/devMode.js +12 -1
- package/build/esm/common/devMode.js.map +1 -1
- package/build/esm/module.js +34 -50
- package/build/esm/module.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/sdk.js +17 -2
- package/build/esm/server/sdk.js.map +1 -1
- package/build/esm/vite/addServerConfig.js +82 -31
- package/build/esm/vite/addServerConfig.js.map +1 -1
- package/build/esm/vite/middlewareConfig.js +7 -6
- package/build/esm/vite/middlewareConfig.js.map +1 -1
- package/build/esm/vite/orchestrion.js +2 -1
- package/build/esm/vite/orchestrion.js.map +1 -1
- package/build/esm/vite/utils.js +15 -9
- package/build/esm/vite/utils.js.map +1 -1
- package/build/module/common/devMode.d.ts +12 -2
- package/build/module/common/types.d.ts +7 -0
- package/build/module/module.json +1 -1
- package/build/module/module.mjs +133 -89
- package/build/module/runtime/utils/instrumentDatabase.js +26 -23
- package/build/module/vite/addServerConfig.d.ts +10 -8
- package/build/module/vite/middlewareConfig.d.ts +2 -1
- package/build/module/vite/utils.d.ts +11 -3
- package/build/types/common/devMode.d.ts +12 -2
- package/build/types/common/devMode.d.ts.map +1 -1
- package/build/types/common/types.d.ts +7 -0
- package/build/types/common/types.d.ts.map +1 -1
- package/build/types/index.types.d.ts +1 -0
- package/build/types/index.types.d.ts.map +1 -1
- package/build/types/module.d.ts.map +1 -1
- package/build/types/runtime/utils/instrumentDatabase.d.ts.map +1 -1
- package/build/types/server/sdk.d.ts.map +1 -1
- package/build/types/vite/addServerConfig.d.ts +10 -8
- package/build/types/vite/addServerConfig.d.ts.map +1 -1
- package/build/types/vite/middlewareConfig.d.ts +2 -1
- package/build/types/vite/middlewareConfig.d.ts.map +1 -1
- package/build/types/vite/orchestrion.d.ts.map +1 -1
- package/build/types/vite/utils.d.ts +11 -3
- package/build/types/vite/utils.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -2,14 +2,6 @@ import type { Nuxt } from '@nuxt/schema';
|
|
|
2
2
|
import type { Nitro } from 'nitropack';
|
|
3
3
|
import type { InputPluginOption } from 'rollup';
|
|
4
4
|
import type { SentryNuxtModuleOptions } from '../common/types';
|
|
5
|
-
/** Path of the generated dev-mode config file, relative to the Nuxt build directory. */
|
|
6
|
-
export declare const DEV_SERVER_CONFIG_PATH = "dev/sentry.server.config.mjs";
|
|
7
|
-
/**
|
|
8
|
-
* Writes the file users preload with `node --import` to enable Sentry in `nuxt dev` (for Nuxt 5 with Nitro 3).
|
|
9
|
-
*
|
|
10
|
-
* In dev-mode, Nitro v3 has no server bundle to emit into, so Node loads the server config file as it is written.
|
|
11
|
-
*/
|
|
12
|
-
export declare function addDevServerConfigFile(nuxt: Nuxt, serverConfigFile: string): void;
|
|
13
5
|
/**
|
|
14
6
|
* Adds the `sentry.server.config.ts` file as `sentry.server.config.mjs` to the `.output` directory to be able to reference this file in the node --import option.
|
|
15
7
|
*
|
|
@@ -22,6 +14,16 @@ export declare function addServerConfigToBuild(moduleOptions: SentryNuxtModuleOp
|
|
|
22
14
|
* However, only limited tracing instrumentation is supported when doing this.
|
|
23
15
|
*/
|
|
24
16
|
export declare function addSentryTopImport(moduleOptions: SentryNuxtModuleOptions, nitro: Nitro): void;
|
|
17
|
+
/**
|
|
18
|
+
* Registers a Nitro plugin that statically imports the Sentry server config, so the SDK initializes
|
|
19
|
+
* at server startup without a `node --import` preload.
|
|
20
|
+
*/
|
|
21
|
+
export declare function addServerConfigPlugin(nuxt: Nuxt, serverConfigFile: string, isLegacyNitro: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Writes a shim to the former `--import` config path, so existing `node --import` start commands
|
|
24
|
+
* keep working now that the config is bundled into the server build.
|
|
25
|
+
*/
|
|
26
|
+
export declare function addServerConfigShimWithWarning(nitro: Nitro): void;
|
|
25
27
|
/**
|
|
26
28
|
* This function modifies the Rollup configuration to include a plugin that wraps the entry file with a dynamic import (`import()`)
|
|
27
29
|
* and adds the Sentry server config with the static `import` declaration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addServerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/addServerConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"addServerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/addServerConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAyB/D;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,uBAAuB,EACtC,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,MAAM,GACvB,IAAI,CAWN;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,uBAAuB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CA0C7F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CA4ExG;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAyBjE;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,IAAI,CAAC,uBAAuB,EAAE,yCAAyC,CAAC,GACrF,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE,yCAAyC,CAAC,CAAC,GACnF,IAAI,CAmBN;AAyCD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,wBAAwB,EACxB,uCAAuC,EACvC,KAAK,GACN,EAAE;IACD,wBAAwB,EAAE,MAAM,CAAC;IACjC,uCAAuC,EAAE,MAAM,EAAE,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,iBAAiB,CAwFpB"}
|
|
@@ -7,6 +7,7 @@ export declare function addMiddlewareImports(): void;
|
|
|
7
7
|
* Adds middleware instrumentation to the Nitro build.
|
|
8
8
|
*
|
|
9
9
|
* @param nitro Nitro instance
|
|
10
|
+
* @param isNitroV3 Whether the app builds with Nitro v3 (Nuxt 5)
|
|
10
11
|
*/
|
|
11
|
-
export declare function addMiddlewareInstrumentation(nitro: Nitro): void;
|
|
12
|
+
export declare function addMiddlewareInstrumentation(nitro: Nitro, isNitroV3: boolean): void;
|
|
12
13
|
//# sourceMappingURL=middlewareConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middlewareConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/middlewareConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAO3C;AAED
|
|
1
|
+
{"version":3,"file":"middlewareConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/middlewareConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAO3C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAYnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrion.d.ts","sourceRoot":"","sources":["../../../src/vite/orchestrion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrion.d.ts","sourceRoot":"","sources":["../../../src/vite/orchestrion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAUzC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,CAAC,EAAE,OAAO,GAAG,IAAI,CAuC/G"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import type { Nuxt } from '@nuxt/schema';
|
|
2
2
|
import type { SentryNuxtModuleOptions } from '../common/types';
|
|
3
3
|
/**
|
|
4
|
-
* Gets the major version of the
|
|
5
|
-
* Returns 2 as the default if
|
|
4
|
+
* Gets the major version of the Nitro package used by the app's Nuxt installation.
|
|
5
|
+
* Returns 2 as the default if the version cannot be determined.
|
|
6
|
+
*
|
|
7
|
+
* Nitro v2 is published as `nitropack`, v3 as `nitro`. Resolving `nitro` directly is
|
|
8
|
+
* unreliable: module resolution walks up the directory tree, so in a monorepo an
|
|
9
|
+
* unrelated `nitro` v3 above the app wins even when the app's Nuxt uses `nitropack` v2.
|
|
10
|
+
* Instead, follow the dependency chain Nuxt itself imports Nitro through:
|
|
11
|
+
* `nuxt` -> (`@nuxt/nitro-server` ->) `nitro` | `nitropack`.
|
|
6
12
|
*/
|
|
7
|
-
export declare function getNitroMajorVersion(): Promise<number>;
|
|
13
|
+
export declare function getNitroMajorVersion(rootDir: string): Promise<number>;
|
|
8
14
|
/**
|
|
9
15
|
* Find the default SDK init file for the given type (client or server).
|
|
10
16
|
*/
|
|
11
17
|
export declare function findDefaultSdkInitFile(type: 'server' | 'client', nuxt?: Nuxt, options?: SentryNuxtModuleOptions): Promise<string | undefined>;
|
|
12
18
|
export declare const SERVER_CONFIG_FILENAME = "sentry.server.config";
|
|
19
|
+
/** Whether a resolved Nitro preset targets Cloudflare (workerd). Nitro normalizes preset names, so any `cloudflare*` spelling matches. */
|
|
20
|
+
export declare function isCloudflarePreset(preset: string | undefined): boolean;
|
|
13
21
|
/** Builds the value for `node --import`. Node reads it as a URL, so it needs forward slashes on Windows too. */
|
|
14
22
|
export declare function toImportSpecifier(fromDir: string, filePath: string): string;
|
|
15
23
|
/**
|
|
@@ -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;AAKzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG/D
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG/D;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2B3E;AAED;;G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gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAgBlG;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": "11.0.0-
|
|
3
|
+
"version": "11.0.0-rc.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",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@nuxt/kit": "^4.5.2",
|
|
57
|
-
"@sentry/browser": "11.0.0-
|
|
58
|
-
"@sentry/cloudflare": "11.0.0-
|
|
59
|
-
"@sentry/conventions": "^0.
|
|
60
|
-
"@sentry/core": "11.0.0-
|
|
61
|
-
"@sentry/node": "11.0.0-
|
|
62
|
-
"@sentry/bundler-plugins": "11.0.0-
|
|
63
|
-
"@sentry/server-runtime-injection": "11.0.0-
|
|
64
|
-
"@sentry/server-utils": "11.0.0-
|
|
65
|
-
"@sentry/vue": "11.0.0-
|
|
57
|
+
"@sentry/browser": "11.0.0-rc.0",
|
|
58
|
+
"@sentry/cloudflare": "11.0.0-rc.0",
|
|
59
|
+
"@sentry/conventions": "^0.23.0",
|
|
60
|
+
"@sentry/core": "11.0.0-rc.0",
|
|
61
|
+
"@sentry/node": "11.0.0-rc.0",
|
|
62
|
+
"@sentry/bundler-plugins": "11.0.0-rc.0",
|
|
63
|
+
"@sentry/server-runtime-injection": "11.0.0-rc.0",
|
|
64
|
+
"@sentry/server-utils": "11.0.0-rc.0",
|
|
65
|
+
"@sentry/vue": "11.0.0-rc.0",
|
|
66
66
|
"local-pkg": "^1.1.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|