@sentry/browser 9.19.0 → 9.21.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.
Files changed (40) hide show
  1. package/build/npm/cjs/helpers.js +22 -0
  2. package/build/npm/cjs/helpers.js.map +1 -1
  3. package/build/npm/cjs/index.js +2 -1
  4. package/build/npm/cjs/index.js.map +1 -1
  5. package/build/npm/cjs/integrations/httpcontext.js +5 -11
  6. package/build/npm/cjs/integrations/httpcontext.js.map +1 -1
  7. package/build/npm/cjs/report-dialog.js +68 -0
  8. package/build/npm/cjs/report-dialog.js.map +1 -0
  9. package/build/npm/cjs/sdk.js +0 -67
  10. package/build/npm/cjs/sdk.js.map +1 -1
  11. package/build/npm/cjs/tracing/browserTracingIntegration.js +36 -12
  12. package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
  13. package/build/npm/esm/helpers.js +23 -2
  14. package/build/npm/esm/helpers.js.map +1 -1
  15. package/build/npm/esm/index.js +2 -1
  16. package/build/npm/esm/index.js.map +1 -1
  17. package/build/npm/esm/integrations/httpcontext.js +7 -13
  18. package/build/npm/esm/integrations/httpcontext.js.map +1 -1
  19. package/build/npm/esm/package.json +1 -1
  20. package/build/npm/esm/report-dialog.js +66 -0
  21. package/build/npm/esm/report-dialog.js.map +1 -0
  22. package/build/npm/esm/sdk.js +2 -68
  23. package/build/npm/esm/sdk.js.map +1 -1
  24. package/build/npm/esm/tracing/browserTracingIntegration.js +38 -14
  25. package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
  26. package/build/npm/types/exports.d.ts +2 -1
  27. package/build/npm/types/exports.d.ts.map +1 -1
  28. package/build/npm/types/helpers.d.ts +7 -0
  29. package/build/npm/types/helpers.d.ts.map +1 -1
  30. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -1
  31. package/build/npm/types/report-dialog.d.ts +8 -0
  32. package/build/npm/types/report-dialog.d.ts.map +1 -0
  33. package/build/npm/types/sdk.d.ts +1 -7
  34. package/build/npm/types/sdk.d.ts.map +1 -1
  35. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  36. package/build/npm/types-ts3.8/exports.d.ts +2 -1
  37. package/build/npm/types-ts3.8/helpers.d.ts +7 -0
  38. package/build/npm/types-ts3.8/report-dialog.d.ts +8 -0
  39. package/build/npm/types-ts3.8/sdk.d.ts +1 -7
  40. package/package.json +7 -7
@@ -0,0 +1,8 @@
1
+ import type { ReportDialogOptions } from '@sentry/core';
2
+ /**
3
+ * Present the user with a report dialog.
4
+ *
5
+ * @param options Everything is optional, we try to fetch all info need from the current scope.
6
+ */
7
+ export declare function showReportDialog(options?: ReportDialogOptions): void;
8
+ //# sourceMappingURL=report-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-dialog.d.ts","sourceRoot":"","sources":["../../../src/report-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKxD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAqDxE"}
@@ -1,4 +1,4 @@
1
- import type { Client, Integration, Options, ReportDialogOptions } from '@sentry/core';
1
+ import type { Client, Integration, Options } from '@sentry/core';
2
2
  import type { BrowserOptions } from './client';
3
3
  /** Get the default integrations for the browser SDK. */
4
4
  export declare function getDefaultIntegrations(_options: Options): Integration[];
@@ -51,12 +51,6 @@ export declare function applyDefaultOptions(optionsArg?: BrowserOptions): Browse
51
51
  * @see {@link BrowserOptions} for documentation on configuration options.
52
52
  */
53
53
  export declare function init(browserOptions?: BrowserOptions): Client | undefined;
54
- /**
55
- * Present the user with a report dialog.
56
- *
57
- * @param options Everything is optional, we try to fetch all info need from the global scope.
58
- */
59
- export declare function showReportDialog(options?: ReportDialogOptions): void;
60
54
  /**
61
55
  * This function is here to be API compatible with the loader.
62
56
  * @hidden
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRo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AAS,CA4B5E;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAEjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,IAAI,EAAE,gBAAgB,EAAqB,eAAe,EAAE,MAAM,cAAc,CAAC;AAuCtH,eAAO,MAAM,8BAA8B,mBAAmB,CAAC;AAO/D,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAElC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,2BAA2B,EAAE,OAAO,CAAC;IAErC;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,EAAE,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC;IAE3D;;;;;;;;;;;;;;OAcG;IACH,uBAAuB,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,YAA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;KAAE,GAAG,IAAI,CAAC;CAC1F;AAkBD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,cAAe,QAAQ,qBAAqB,CAAC;;;CAqRzD,CAAC;AAE3B;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,gBAAgB,EAC7B,YAAY,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAChF,IAAI,GAAG,SAAS,CAKlB;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAMjH;AAED,sCAAsC;AACtC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASnE"}
@@ -8,7 +8,8 @@ export { makeFetchTransport } from './transports/fetch';
8
8
  export { defaultStackParser, defaultStackLineParsers, chromeStackLineParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser, } from './stack-parsers';
9
9
  export { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder';
10
10
  export { createUserFeedbackEnvelope } from './userfeedback';
11
- export { getDefaultIntegrations, forceLoad, init, onLoad, showReportDialog } from './sdk';
11
+ export { getDefaultIntegrations, forceLoad, init, onLoad } from './sdk';
12
+ export { showReportDialog } from './report-dialog';
12
13
  export { breadcrumbsIntegration } from './integrations/breadcrumbs';
13
14
  export { globalHandlersIntegration } from './integrations/globalhandlers';
14
15
  export { httpContextIntegration } from './integrations/httpcontext';
@@ -41,5 +41,12 @@ export declare function wrap<T extends WrappableFunction>(fn: T, options?: {
41
41
  export declare function wrap<NonFunction>(fn: NonFunction, options?: {
42
42
  mechanism?: Mechanism;
43
43
  }): NonFunction;
44
+ /**
45
+ * Get HTTP request data from the current page.
46
+ */
47
+ export declare function getHttpRequestData(): {
48
+ url: string;
49
+ headers: Record<string, string>;
50
+ };
44
51
  export {};
45
52
  //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { ReportDialogOptions } from '@sentry/core';
2
+ /**
3
+ * Present the user with a report dialog.
4
+ *
5
+ * @param options Everything is optional, we try to fetch all info need from the current scope.
6
+ */
7
+ export declare function showReportDialog(options?: ReportDialogOptions): void;
8
+ //# sourceMappingURL=report-dialog.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Client, Integration, Options, ReportDialogOptions } from '@sentry/core';
1
+ import { Client, Integration, Options } from '@sentry/core';
2
2
  import { BrowserOptions } from './client';
3
3
  /** Get the default integrations for the browser SDK. */
4
4
  export declare function getDefaultIntegrations(_options: Options): Integration[];
@@ -51,12 +51,6 @@ export declare function applyDefaultOptions(optionsArg?: BrowserOptions): Browse
51
51
  * @see {@link BrowserOptions} for documentation on configuration options.
52
52
  */
53
53
  export declare function init(browserOptions?: BrowserOptions): Client | undefined;
54
- /**
55
- * Present the user with a report dialog.
56
- *
57
- * @param options Everything is optional, we try to fetch all info need from the global scope.
58
- */
59
- export declare function showReportDialog(options?: ReportDialogOptions): void;
60
54
  /**
61
55
  * This function is here to be API compatible with the loader.
62
56
  * @hidden
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "9.19.0",
3
+ "version": "9.21.0",
4
4
  "description": "Official Sentry SDK for browsers",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -39,14 +39,14 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@sentry-internal/browser-utils": "9.19.0",
43
- "@sentry-internal/feedback": "9.19.0",
44
- "@sentry-internal/replay": "9.19.0",
45
- "@sentry-internal/replay-canvas": "9.19.0",
46
- "@sentry/core": "9.19.0"
42
+ "@sentry-internal/browser-utils": "9.21.0",
43
+ "@sentry-internal/feedback": "9.21.0",
44
+ "@sentry-internal/replay": "9.21.0",
45
+ "@sentry-internal/replay-canvas": "9.21.0",
46
+ "@sentry/core": "9.21.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "9.19.0",
49
+ "@sentry-internal/integration-shims": "9.21.0",
50
50
  "fake-indexeddb": "^4.0.1"
51
51
  },
52
52
  "scripts": {