@sentry/nuxt 11.0.0-alpha.2 → 11.0.0-beta.1

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.
Files changed (52) hide show
  1. package/README.md +5 -0
  2. package/build/cjs/common/devMode.js +12 -0
  3. package/build/cjs/common/devMode.js.map +1 -0
  4. package/build/cjs/module.js +9 -5
  5. package/build/cjs/module.js.map +1 -1
  6. package/build/cjs/server/sdk.js +2 -2
  7. package/build/cjs/server/sdk.js.map +1 -1
  8. package/build/cjs/vite/addServerConfig.js +64 -13
  9. package/build/cjs/vite/addServerConfig.js.map +1 -1
  10. package/build/cjs/vite/orchestrion.js +3 -0
  11. package/build/cjs/vite/orchestrion.js.map +1 -1
  12. package/build/cjs/vite/utils.js +26 -11
  13. package/build/cjs/vite/utils.js.map +1 -1
  14. package/build/esm/common/devMode.js +9 -0
  15. package/build/esm/common/devMode.js.map +1 -0
  16. package/build/esm/module.js +11 -7
  17. package/build/esm/module.js.map +1 -1
  18. package/build/esm/package.json +1 -1
  19. package/build/esm/server/sdk.js +5 -3
  20. package/build/esm/server/sdk.js.map +1 -1
  21. package/build/esm/vite/addServerConfig.js +62 -14
  22. package/build/esm/vite/addServerConfig.js.map +1 -1
  23. package/build/esm/vite/orchestrion.js +3 -0
  24. package/build/esm/vite/orchestrion.js.map +1 -1
  25. package/build/esm/vite/utils.js +24 -12
  26. package/build/esm/vite/utils.js.map +1 -1
  27. package/build/module/common/devMode.d.ts +4 -0
  28. package/build/module/module.json +1 -1
  29. package/build/module/module.mjs +94 -28
  30. package/build/module/runtime/hooks/captureErrorHook.js +2 -1
  31. package/build/module/runtime/hooks/wrapMiddlewareHandler.js +2 -1
  32. package/build/module/runtime/utils/instrumentDatabase.js +26 -6
  33. package/build/module/runtime/utils/instrumentStorage.js +10 -4
  34. package/build/module/runtime/utils/patchEventHandler.js +2 -1
  35. package/build/module/vite/addServerConfig.d.ts +22 -0
  36. package/build/module/vite/utils.d.ts +14 -1
  37. package/build/types/common/devMode.d.ts +5 -0
  38. package/build/types/common/devMode.d.ts.map +1 -0
  39. package/build/types/index.types.d.ts +0 -1
  40. package/build/types/index.types.d.ts.map +1 -1
  41. package/build/types/module.d.ts.map +1 -1
  42. package/build/types/runtime/hooks/captureErrorHook.d.ts.map +1 -1
  43. package/build/types/runtime/utils/instrumentDatabase.d.ts.map +1 -1
  44. package/build/types/runtime/utils/instrumentStorage.d.ts.map +1 -1
  45. package/build/types/runtime/utils/patchEventHandler.d.ts.map +1 -1
  46. package/build/types/server/sdk.d.ts.map +1 -1
  47. package/build/types/vite/addServerConfig.d.ts +22 -0
  48. package/build/types/vite/addServerConfig.d.ts.map +1 -1
  49. package/build/types/vite/orchestrion.d.ts.map +1 -1
  50. package/build/types/vite/utils.d.ts +14 -1
  51. package/build/types/vite/utils.d.ts.map +1 -1
  52. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentStorage.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/instrumentStorage.ts"],"names":[],"mappings":"AA4EA;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B/G"}
1
+ {"version":3,"file":"instrumentStorage.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/instrumentStorage.ts"],"names":[],"mappings":"AA+EA;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"patchEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/patchEventHandler.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,SAAS,QAAQ,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,CAqB1G"}
1
+ {"version":3,"file":"patchEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/patchEventHandler.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,SAAS,QAAQ,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,CAqB1G"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAS,cAAc,EAAE,MAAM,cAAc,CAAC;AAIlE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAuBzE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CA0B7F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CAY3F"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAS,cAAc,EAAE,MAAM,cAAc,CAAC;AAKlE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAsBzE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CA0B7F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CAY3F"}
@@ -1,5 +1,15 @@
1
+ import type { Nuxt } from '@nuxt/schema';
1
2
  import type { Nitro } from 'nitropack';
3
+ import type { InputPluginOption } from 'rollup';
2
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;
3
13
  /**
4
14
  * 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.
5
15
  *
@@ -20,4 +30,16 @@ export declare function addSentryTopImport(moduleOptions: SentryNuxtModuleOption
20
30
  * See: https://nodejs.org/api/module.html#enabling
21
31
  */
22
32
  export declare function addDynamicImportEntryFileWrapper(nitro: Nitro, serverConfigFile: string, moduleOptions: Omit<SentryNuxtModuleOptions, 'experimental_entrypointWrappedFunctions'> & Required<Pick<SentryNuxtModuleOptions, 'experimental_entrypointWrappedFunctions'>>): void;
33
+ /**
34
+ * A Rollup plugin which wraps the server entry with a dynamic `import()`. This makes it possible to initialize Sentry first
35
+ * by using a regular `import` and load the server after that.
36
+ * This also works with serverless `handler` functions, as it re-exports the `handler`.
37
+ *
38
+ * Only exported for testing.
39
+ */
40
+ export declare function wrapEntryWithDynamicImport({ resolvedSentryConfigPath, experimental_entrypointWrappedFunctions, debug, }: {
41
+ resolvedSentryConfigPath: string;
42
+ experimental_entrypointWrappedFunctions: string[];
43
+ debug?: boolean;
44
+ }): InputPluginOption;
23
45
  //# sourceMappingURL=addServerConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addServerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/addServerConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAA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0C7F;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,CAkBN;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"}
@@ -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;AASzC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,CAAC,EAAE,OAAO,GAAG,IAAI,CAkC/G"}
1
+ {"version":3,"file":"orchestrion.d.ts","sourceRoot":"","sources":["../../../src/vite/orchestrion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AASzC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,CAAC,EAAE,OAAO,GAAG,IAAI,CAwC/G"}
@@ -7,9 +7,11 @@ import type { SentryNuxtModuleOptions } from '../common/types';
7
7
  export declare function getNitroMajorVersion(): Promise<number>;
8
8
  /**
9
9
  * Find the default SDK init file for the given type (client or server).
10
- * The sentry.server.config file is prioritized over the instrument.server file.
11
10
  */
12
11
  export declare function findDefaultSdkInitFile(type: 'server' | 'client', nuxt?: Nuxt, options?: SentryNuxtModuleOptions): Promise<string | undefined>;
12
+ export declare const SERVER_CONFIG_FILENAME = "sentry.server.config";
13
+ /** Builds the value for `node --import`. Node reads it as a URL, so it needs forward slashes on Windows too. */
14
+ export declare function toImportSpecifier(fromDir: string, filePath: string): string;
13
15
  /**
14
16
  * Extracts the filename from a node command with a path.
15
17
  */
@@ -45,6 +47,17 @@ export declare function constructWrappedFunctionExportQuery(exportedBindings: Re
45
47
  * Constructs a code snippet with function reexports (can be used in Rollup plugins as a return value for `load()`)
46
48
  */
47
49
  export declare function constructFunctionReExport(pathWithQuery: string, entryId: string): string;
50
+ /**
51
+ * `load()` emits `file://` specifiers because Node's ESM loader rejects bare Windows
52
+ * paths (`ERR_UNSUPPORTED_ESM_URL_SCHEME`), but Rollup's resolver only understands
53
+ * filesystem paths. Returns `undefined` for a malformed `file://` URL.
54
+ *
55
+ * Only exported for testing.
56
+ */
57
+ export declare function toResolvablePath(source: string): {
58
+ path: string;
59
+ wasFileUrl: boolean;
60
+ } | undefined;
48
61
  /**
49
62
  * Sets up alias to work around OpenTelemetry's incomplete ESM imports.
50
63
  * https://github.com/getsentry/sentry-javascript/issues/15204
@@ -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;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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I,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-alpha.2",
3
+ "version": "11.0.0-beta.1",
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,14 +54,15 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@nuxt/kit": "^4.5.2",
57
- "@sentry/browser": "11.0.0-alpha.2",
58
- "@sentry/cloudflare": "11.0.0-alpha.2",
57
+ "@sentry/browser": "11.0.0-beta.1",
58
+ "@sentry/cloudflare": "11.0.0-beta.1",
59
59
  "@sentry/conventions": "^0.20.0",
60
- "@sentry/core": "11.0.0-alpha.2",
61
- "@sentry/node": "11.0.0-alpha.2",
62
- "@sentry/bundler-plugins": "11.0.0-alpha.2",
63
- "@sentry/server-utils": "11.0.0-alpha.2",
64
- "@sentry/vue": "11.0.0-alpha.2",
60
+ "@sentry/core": "11.0.0-beta.1",
61
+ "@sentry/node": "11.0.0-beta.1",
62
+ "@sentry/bundler-plugins": "11.0.0-beta.1",
63
+ "@sentry/server-runtime-injection": "11.0.0-beta.1",
64
+ "@sentry/server-utils": "11.0.0-beta.1",
65
+ "@sentry/vue": "11.0.0-beta.1",
65
66
  "local-pkg": "^1.1.2"
66
67
  },
67
68
  "devDependencies": {