@sentry/browser 7.0.0-alpha.1 → 7.0.0-beta.2

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 (240) hide show
  1. package/README.md +2 -3
  2. package/cjs/client.js +130 -83
  3. package/cjs/client.js.map +1 -1
  4. package/cjs/eventbuilder.js +225 -167
  5. package/cjs/eventbuilder.js.map +1 -1
  6. package/cjs/exports.js +55 -47
  7. package/cjs/exports.js.map +1 -1
  8. package/cjs/flags.js +7 -3
  9. package/cjs/flags.js.map +1 -1
  10. package/cjs/helpers.js +122 -130
  11. package/cjs/helpers.js.map +1 -1
  12. package/cjs/index.js +78 -13
  13. package/cjs/index.js.map +1 -1
  14. package/cjs/integrations/breadcrumbs.js +223 -192
  15. package/cjs/integrations/breadcrumbs.js.map +1 -1
  16. package/cjs/integrations/dedupe.js +183 -142
  17. package/cjs/integrations/dedupe.js.map +1 -1
  18. package/cjs/integrations/globalhandlers.js +211 -171
  19. package/cjs/integrations/globalhandlers.js.map +1 -1
  20. package/cjs/integrations/httpcontext.js +51 -0
  21. package/cjs/integrations/httpcontext.js.map +1 -0
  22. package/cjs/integrations/index.js +18 -14
  23. package/cjs/integrations/index.js.map +1 -1
  24. package/cjs/integrations/linkederrors.js +79 -51
  25. package/cjs/integrations/linkederrors.js.map +1 -1
  26. package/cjs/integrations/trycatch.js +245 -216
  27. package/cjs/integrations/trycatch.js.map +1 -1
  28. package/cjs/sdk.js +168 -114
  29. package/cjs/sdk.js.map +1 -1
  30. package/cjs/stack-parsers.js +134 -84
  31. package/cjs/stack-parsers.js.map +1 -1
  32. package/cjs/transports/fetch.js +34 -80
  33. package/cjs/transports/fetch.js.map +1 -1
  34. package/cjs/transports/index.js +10 -14
  35. package/cjs/transports/index.js.map +1 -1
  36. package/cjs/transports/utils.js +57 -53
  37. package/cjs/transports/utils.js.map +1 -1
  38. package/cjs/transports/xhr.js +53 -63
  39. package/cjs/transports/xhr.js.map +1 -1
  40. package/esm/client.js +128 -82
  41. package/esm/client.js.map +1 -1
  42. package/esm/eventbuilder.js +218 -160
  43. package/esm/eventbuilder.js.map +1 -1
  44. package/esm/exports.js +12 -7
  45. package/esm/exports.js.map +1 -1
  46. package/esm/flags.js +5 -2
  47. package/esm/flags.js.map +1 -1
  48. package/esm/helpers.js +120 -127
  49. package/esm/helpers.js.map +1 -1
  50. package/esm/index.js +28 -10
  51. package/esm/index.js.map +1 -1
  52. package/esm/integrations/breadcrumbs.js +219 -190
  53. package/esm/integrations/breadcrumbs.js.map +1 -1
  54. package/esm/integrations/dedupe.js +180 -140
  55. package/esm/integrations/dedupe.js.map +1 -1
  56. package/esm/integrations/globalhandlers.js +208 -169
  57. package/esm/integrations/globalhandlers.js.map +1 -1
  58. package/esm/integrations/httpcontext.js +49 -0
  59. package/esm/integrations/httpcontext.js.map +1 -0
  60. package/esm/integrations/index.js +7 -7
  61. package/esm/integrations/index.js.map +1 -1
  62. package/esm/integrations/linkederrors.js +76 -49
  63. package/esm/integrations/linkederrors.js.map +1 -1
  64. package/esm/integrations/trycatch.js +242 -214
  65. package/esm/integrations/trycatch.js.map +1 -1
  66. package/esm/sdk.js +164 -111
  67. package/esm/sdk.js.map +1 -1
  68. package/esm/stack-parsers.js +126 -83
  69. package/esm/stack-parsers.js.map +1 -1
  70. package/esm/transports/fetch.js +32 -79
  71. package/esm/transports/fetch.js.map +1 -1
  72. package/esm/transports/index.js +3 -7
  73. package/esm/transports/index.js.map +1 -1
  74. package/esm/transports/utils.js +56 -52
  75. package/esm/transports/utils.js.map +1 -1
  76. package/esm/transports/xhr.js +51 -62
  77. package/esm/transports/xhr.js.map +1 -1
  78. package/package.json +4 -4
  79. package/types/client.d.ts +24 -18
  80. package/types/client.d.ts.map +1 -1
  81. package/types/eventbuilder.d.ts +1 -1
  82. package/types/exports.d.ts +5 -5
  83. package/types/exports.d.ts.map +1 -1
  84. package/types/helpers.d.ts +0 -5
  85. package/types/helpers.d.ts.map +1 -1
  86. package/types/index.d.ts +2 -3
  87. package/types/index.d.ts.map +1 -1
  88. package/types/integrations/breadcrumbs.d.ts +6 -7
  89. package/types/integrations/breadcrumbs.d.ts.map +1 -1
  90. package/types/integrations/globalhandlers.d.ts.map +1 -1
  91. package/types/integrations/{useragent.d.ts → httpcontext.d.ts} +3 -3
  92. package/types/integrations/httpcontext.d.ts.map +1 -0
  93. package/types/integrations/index.d.ts +1 -1
  94. package/types/integrations/index.d.ts.map +1 -1
  95. package/types/integrations/linkederrors.d.ts.map +1 -1
  96. package/types/sdk.d.ts +4 -4
  97. package/types/sdk.d.ts.map +1 -1
  98. package/types/stack-parsers.d.ts +7 -6
  99. package/types/stack-parsers.d.ts.map +1 -1
  100. package/types/transports/fetch.d.ts +6 -15
  101. package/types/transports/fetch.d.ts.map +1 -1
  102. package/types/transports/index.d.ts +2 -6
  103. package/types/transports/index.d.ts.map +1 -1
  104. package/types/transports/types.d.ts +10 -0
  105. package/types/transports/types.d.ts.map +1 -0
  106. package/types/transports/utils.d.ts +1 -1
  107. package/types/transports/utils.d.ts.map +1 -1
  108. package/types/transports/xhr.d.ts +6 -10
  109. package/types/transports/xhr.d.ts.map +1 -1
  110. package/cjs/client.d.ts +0 -58
  111. package/cjs/client.d.ts.map +0 -1
  112. package/cjs/eventbuilder.d.ts +0 -37
  113. package/cjs/eventbuilder.d.ts.map +0 -1
  114. package/cjs/exports.d.ts +0 -10
  115. package/cjs/exports.d.ts.map +0 -1
  116. package/cjs/flags.d.ts +0 -3
  117. package/cjs/flags.d.ts.map +0 -1
  118. package/cjs/helpers.d.ts +0 -52
  119. package/cjs/helpers.d.ts.map +0 -1
  120. package/cjs/index.d.ts +0 -16
  121. package/cjs/index.d.ts.map +0 -1
  122. package/cjs/integrations/breadcrumbs.d.ts +0 -47
  123. package/cjs/integrations/breadcrumbs.d.ts.map +0 -1
  124. package/cjs/integrations/dedupe.d.ts +0 -21
  125. package/cjs/integrations/dedupe.d.ts.map +0 -1
  126. package/cjs/integrations/globalhandlers.d.ts +0 -30
  127. package/cjs/integrations/globalhandlers.d.ts.map +0 -1
  128. package/cjs/integrations/index.d.ts +0 -7
  129. package/cjs/integrations/index.d.ts.map +0 -1
  130. package/cjs/integrations/linkederrors.d.ts +0 -42
  131. package/cjs/integrations/linkederrors.d.ts.map +0 -1
  132. package/cjs/integrations/trycatch.d.ts +0 -33
  133. package/cjs/integrations/trycatch.d.ts.map +0 -1
  134. package/cjs/integrations/useragent.d.ts +0 -17
  135. package/cjs/integrations/useragent.d.ts.map +0 -1
  136. package/cjs/integrations/useragent.js +0 -42
  137. package/cjs/integrations/useragent.js.map +0 -1
  138. package/cjs/sdk.d.ts +0 -112
  139. package/cjs/sdk.d.ts.map +0 -1
  140. package/cjs/stack-parsers.d.ts +0 -8
  141. package/cjs/stack-parsers.d.ts.map +0 -1
  142. package/cjs/transports/base.d.ts +0 -65
  143. package/cjs/transports/base.d.ts.map +0 -1
  144. package/cjs/transports/base.js +0 -141
  145. package/cjs/transports/base.js.map +0 -1
  146. package/cjs/transports/fetch.d.ts +0 -17
  147. package/cjs/transports/fetch.d.ts.map +0 -1
  148. package/cjs/transports/index.d.ts +0 -7
  149. package/cjs/transports/index.d.ts.map +0 -1
  150. package/cjs/transports/new-fetch.d.ts +0 -10
  151. package/cjs/transports/new-fetch.d.ts.map +0 -1
  152. package/cjs/transports/new-fetch.js +0 -27
  153. package/cjs/transports/new-fetch.js.map +0 -1
  154. package/cjs/transports/new-xhr.d.ts +0 -11
  155. package/cjs/transports/new-xhr.d.ts.map +0 -1
  156. package/cjs/transports/new-xhr.js +0 -46
  157. package/cjs/transports/new-xhr.js.map +0 -1
  158. package/cjs/transports/setup.d.ts +0 -22
  159. package/cjs/transports/setup.d.ts.map +0 -1
  160. package/cjs/transports/setup.js +0 -44
  161. package/cjs/transports/setup.js.map +0 -1
  162. package/cjs/transports/utils.d.ts +0 -48
  163. package/cjs/transports/utils.d.ts.map +0 -1
  164. package/cjs/transports/xhr.d.ts +0 -11
  165. package/cjs/transports/xhr.d.ts.map +0 -1
  166. package/cjs/version.d.ts +0 -2
  167. package/cjs/version.d.ts.map +0 -1
  168. package/cjs/version.js +0 -4
  169. package/cjs/version.js.map +0 -1
  170. package/esm/client.d.ts +0 -58
  171. package/esm/client.d.ts.map +0 -1
  172. package/esm/eventbuilder.d.ts +0 -37
  173. package/esm/eventbuilder.d.ts.map +0 -1
  174. package/esm/exports.d.ts +0 -10
  175. package/esm/exports.d.ts.map +0 -1
  176. package/esm/flags.d.ts +0 -3
  177. package/esm/flags.d.ts.map +0 -1
  178. package/esm/helpers.d.ts +0 -52
  179. package/esm/helpers.d.ts.map +0 -1
  180. package/esm/index.d.ts +0 -16
  181. package/esm/index.d.ts.map +0 -1
  182. package/esm/integrations/breadcrumbs.d.ts +0 -47
  183. package/esm/integrations/breadcrumbs.d.ts.map +0 -1
  184. package/esm/integrations/dedupe.d.ts +0 -21
  185. package/esm/integrations/dedupe.d.ts.map +0 -1
  186. package/esm/integrations/globalhandlers.d.ts +0 -30
  187. package/esm/integrations/globalhandlers.d.ts.map +0 -1
  188. package/esm/integrations/index.d.ts +0 -7
  189. package/esm/integrations/index.d.ts.map +0 -1
  190. package/esm/integrations/linkederrors.d.ts +0 -42
  191. package/esm/integrations/linkederrors.d.ts.map +0 -1
  192. package/esm/integrations/trycatch.d.ts +0 -33
  193. package/esm/integrations/trycatch.d.ts.map +0 -1
  194. package/esm/integrations/useragent.d.ts +0 -17
  195. package/esm/integrations/useragent.d.ts.map +0 -1
  196. package/esm/integrations/useragent.js +0 -41
  197. package/esm/integrations/useragent.js.map +0 -1
  198. package/esm/sdk.d.ts +0 -112
  199. package/esm/sdk.d.ts.map +0 -1
  200. package/esm/stack-parsers.d.ts +0 -8
  201. package/esm/stack-parsers.d.ts.map +0 -1
  202. package/esm/transports/base.d.ts +0 -65
  203. package/esm/transports/base.d.ts.map +0 -1
  204. package/esm/transports/base.js +0 -140
  205. package/esm/transports/base.js.map +0 -1
  206. package/esm/transports/fetch.d.ts +0 -17
  207. package/esm/transports/fetch.d.ts.map +0 -1
  208. package/esm/transports/index.d.ts +0 -7
  209. package/esm/transports/index.d.ts.map +0 -1
  210. package/esm/transports/new-fetch.d.ts +0 -10
  211. package/esm/transports/new-fetch.d.ts.map +0 -1
  212. package/esm/transports/new-fetch.js +0 -25
  213. package/esm/transports/new-fetch.js.map +0 -1
  214. package/esm/transports/new-xhr.d.ts +0 -11
  215. package/esm/transports/new-xhr.d.ts.map +0 -1
  216. package/esm/transports/new-xhr.js +0 -44
  217. package/esm/transports/new-xhr.js.map +0 -1
  218. package/esm/transports/setup.d.ts +0 -22
  219. package/esm/transports/setup.d.ts.map +0 -1
  220. package/esm/transports/setup.js +0 -42
  221. package/esm/transports/setup.js.map +0 -1
  222. package/esm/transports/utils.d.ts +0 -48
  223. package/esm/transports/utils.d.ts.map +0 -1
  224. package/esm/transports/xhr.d.ts +0 -11
  225. package/esm/transports/xhr.d.ts.map +0 -1
  226. package/esm/version.d.ts +0 -2
  227. package/esm/version.d.ts.map +0 -1
  228. package/esm/version.js +0 -3
  229. package/esm/version.js.map +0 -1
  230. package/types/integrations/useragent.d.ts.map +0 -1
  231. package/types/transports/base.d.ts +0 -65
  232. package/types/transports/base.d.ts.map +0 -1
  233. package/types/transports/new-fetch.d.ts +0 -10
  234. package/types/transports/new-fetch.d.ts.map +0 -1
  235. package/types/transports/new-xhr.d.ts +0 -11
  236. package/types/transports/new-xhr.d.ts.map +0 -1
  237. package/types/transports/setup.d.ts +0 -22
  238. package/types/transports/setup.d.ts.map +0 -1
  239. package/types/version.d.ts +0 -2
  240. package/types/version.d.ts.map +0 -1
package/esm/helpers.js CHANGED
@@ -1,25 +1,26 @@
1
- import { __assign } from "tslib";
2
- import { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';
3
- import { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, logger, markFunctionWrapped, } from '@sentry/utils';
4
- import { IS_DEBUG_BUILD } from './flags';
5
- var global = getGlobalObject();
6
- var ignoreOnError = 0;
1
+ import { withScope, captureException } from '@sentry/core';
2
+ import { getOriginalFunction, addExceptionTypeValue, addExceptionMechanism, markFunctionWrapped, addNonEnumerableProperty } from '@sentry/utils';
3
+
4
+ let ignoreOnError = 0;
5
+
7
6
  /**
8
7
  * @hidden
9
8
  */
10
- export function shouldIgnoreOnError() {
11
- return ignoreOnError > 0;
9
+ function shouldIgnoreOnError() {
10
+ return ignoreOnError > 0;
12
11
  }
12
+
13
13
  /**
14
14
  * @hidden
15
15
  */
16
- export function ignoreNextOnError() {
17
- // onerror should trigger before setTimeout
18
- ignoreOnError += 1;
19
- setTimeout(function () {
20
- ignoreOnError -= 1;
21
- });
16
+ function ignoreNextOnError() {
17
+ // onerror should trigger before setTimeout
18
+ ignoreOnError += 1;
19
+ setTimeout(() => {
20
+ ignoreOnError -= 1;
21
+ });
22
22
  }
23
+
23
24
  /**
24
25
  * Instruments the given function and sends an event to Sentry every time the
25
26
  * function throws an exception.
@@ -28,124 +29,116 @@ export function ignoreNextOnError() {
28
29
  * @returns The wrapped function.
29
30
  * @hidden
30
31
  */
31
- export function wrap(fn, options, before) {
32
- // for future readers what this does is wrap a function and then create
33
- // a bi-directional wrapping between them.
34
- //
35
- // example: wrapped = wrap(original);
36
- // original.__sentry_wrapped__ -> wrapped
37
- // wrapped.__sentry_original__ -> original
38
- if (options === void 0) { options = {}; }
39
- if (typeof fn !== 'function') {
40
- return fn;
32
+ function wrap(
33
+ fn,
34
+ options
35
+
36
+ = {},
37
+ before,
38
+ ) {
39
+ // for future readers what this does is wrap a function and then create
40
+ // a bi-directional wrapping between them.
41
+ //
42
+ // example: wrapped = wrap(original);
43
+ // original.__sentry_wrapped__ -> wrapped
44
+ // wrapped.__sentry_original__ -> original
45
+
46
+ if (typeof fn !== 'function') {
47
+ return fn;
48
+ }
49
+
50
+ try {
51
+ // if we're dealing with a function that was previously wrapped, return
52
+ // the original wrapper.
53
+ var wrapper = fn.__sentry_wrapped__;
54
+ if (wrapper) {
55
+ return wrapper;
41
56
  }
42
- try {
43
- // if we're dealing with a function that was previously wrapped, return
44
- // the original wrapper.
45
- var wrapper = fn.__sentry_wrapped__;
46
- if (wrapper) {
47
- return wrapper;
48
- }
49
- // We don't wanna wrap it twice
50
- if (getOriginalFunction(fn)) {
51
- return fn;
52
- }
53
- }
54
- catch (e) {
55
- // Just accessing custom props in some Selenium environments
56
- // can cause a "Permission denied" exception (see raven-js#495).
57
- // Bail on wrapping and return the function as-is (defers to window.onerror).
58
- return fn;
57
+
58
+ // We don't wanna wrap it twice
59
+ if (getOriginalFunction(fn)) {
60
+ return fn;
59
61
  }
60
- /* eslint-disable prefer-rest-params */
61
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
- var sentryWrapped = function () {
63
- var args = Array.prototype.slice.call(arguments);
64
- try {
65
- if (before && typeof before === 'function') {
66
- before.apply(this, arguments);
67
- }
68
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
69
- var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
70
- // Attempt to invoke user-land function
71
- // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
72
- // means the sentry.javascript SDK caught an error invoking your application code. This
73
- // is expected behavior and NOT indicative of a bug with sentry.javascript.
74
- return fn.apply(this, wrappedArguments);
75
- }
76
- catch (ex) {
77
- ignoreNextOnError();
78
- withScope(function (scope) {
79
- scope.addEventProcessor(function (event) {
80
- if (options.mechanism) {
81
- addExceptionTypeValue(event, undefined, undefined);
82
- addExceptionMechanism(event, options.mechanism);
83
- }
84
- event.extra = __assign(__assign({}, event.extra), { arguments: args });
85
- return event;
86
- });
87
- captureException(ex);
88
- });
89
- throw ex;
90
- }
91
- };
92
- /* eslint-enable prefer-rest-params */
93
- // Accessing some objects may throw
94
- // ref: https://github.com/getsentry/sentry-javascript/issues/1168
62
+ } catch (e) {
63
+ // Just accessing custom props in some Selenium environments
64
+ // can cause a "Permission denied" exception (see raven-js#495).
65
+ // Bail on wrapping and return the function as-is (defers to window.onerror).
66
+ return fn;
67
+ }
68
+
69
+ var sentryWrapped = function () {
70
+ var args = Array.prototype.slice.call(arguments);
71
+
95
72
  try {
96
- for (var property in fn) {
97
- if (Object.prototype.hasOwnProperty.call(fn, property)) {
98
- sentryWrapped[property] = fn[property];
99
- }
100
- }
73
+ if (before && typeof before === 'function') {
74
+ before.apply(this, arguments);
75
+ }
76
+
77
+ var wrappedArguments = args.map((arg) => wrap(arg, options));
78
+
79
+ // Attempt to invoke user-land function
80
+ // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
81
+ // means the sentry.javascript SDK caught an error invoking your application code. This
82
+ // is expected behavior and NOT indicative of a bug with sentry.javascript.
83
+ return fn.apply(this, wrappedArguments);
84
+ } catch (ex) {
85
+ ignoreNextOnError();
86
+
87
+ withScope((scope) => {
88
+ scope.addEventProcessor((event) => {
89
+ if (options.mechanism) {
90
+ addExceptionTypeValue(event, undefined, undefined);
91
+ addExceptionMechanism(event, options.mechanism);
92
+ }
93
+
94
+ event.extra = {
95
+ ...event.extra,
96
+ arguments: args,
97
+ };
98
+
99
+ return event;
100
+ });
101
+
102
+ captureException(ex);
103
+ });
104
+
105
+ throw ex;
101
106
  }
102
- catch (_oO) { } // eslint-disable-line no-empty
103
- // Signal that this function has been wrapped/filled already
104
- // for both debugging and to prevent it to being wrapped/filled twice
105
- markFunctionWrapped(sentryWrapped, fn);
106
- addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);
107
- // Restore original function name (not all browsers allow that)
108
- try {
109
- var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');
110
- if (descriptor.configurable) {
111
- Object.defineProperty(sentryWrapped, 'name', {
112
- get: function () {
113
- return fn.name;
114
- },
115
- });
116
- }
117
- // eslint-disable-next-line no-empty
107
+ };
108
+
109
+ // Accessing some objects may throw
110
+ // ref: https://github.com/getsentry/sentry-javascript/issues/1168
111
+ try {
112
+ for (var property in fn) {
113
+ if (Object.prototype.hasOwnProperty.call(fn, property)) {
114
+ sentryWrapped[property] = fn[property];
115
+ }
118
116
  }
119
- catch (_oO) { }
120
- return sentryWrapped;
117
+ } catch (_oO) {}
118
+ // Signal that this function has been wrapped/filled already
119
+ // for both debugging and to prevent it to being wrapped/filled twice
120
+ markFunctionWrapped(sentryWrapped, fn);
121
+
122
+ addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);
123
+
124
+ // Restore original function name (not all browsers allow that)
125
+ try {
126
+ var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ;
127
+ if (descriptor.configurable) {
128
+ Object.defineProperty(sentryWrapped, 'name', {
129
+ get() {
130
+ return fn.name;
131
+ },
132
+ });
133
+ }
134
+ } catch (_oO) {}
135
+
136
+ return sentryWrapped;
121
137
  }
138
+
122
139
  /**
123
- * Injects the Report Dialog script
124
- * @hidden
140
+ * All properties the report dialog supports
125
141
  */
126
- export function injectReportDialog(options) {
127
- if (options === void 0) { options = {}; }
128
- if (!global.document) {
129
- return;
130
- }
131
- if (!options.eventId) {
132
- IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');
133
- return;
134
- }
135
- if (!options.dsn) {
136
- IS_DEBUG_BUILD && logger.error('Missing dsn option in showReportDialog call');
137
- return;
138
- }
139
- var script = global.document.createElement('script');
140
- script.async = true;
141
- script.src = getReportDialogEndpoint(options.dsn, options);
142
- if (options.onLoad) {
143
- // eslint-disable-next-line @typescript-eslint/unbound-method
144
- script.onload = options.onLoad;
145
- }
146
- var injectionPoint = global.document.head || global.document.body;
147
- if (injectionPoint) {
148
- injectionPoint.appendChild(script);
149
- }
150
- }
151
- //# sourceMappingURL=helpers.js.map
142
+
143
+ export { ignoreNextOnError, shouldIgnoreOnError, wrap };
144
+ //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,u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CAAC;IAE3D,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,6DAA6D;QAC7D,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;KAChC;IAED,IAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAEpE,IAAI,cAAc,EAAE;QAClB,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KACpC;AACH,CAAC","sourcesContent":["import { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getGlobalObject,\n getOriginalFunction,\n logger,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\nconst global = getGlobalObject<Window>();\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sentryWrapped: WrappedFunction = function (this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options: ReportDialogOptions = {}): void {\n if (!global.document) {\n return;\n }\n\n if (!options.eventId) {\n IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n\n if (!options.dsn) {\n IS_DEBUG_BUILD && logger.error('Missing dsn option in showReportDialog call');\n return;\n }\n\n const script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n\n const injectionPoint = global.document.head || global.document.body;\n\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/helpers.ts"],"sourcesContent":["import { captureException, withScope } from '@sentry/core';\nimport { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getOriginalFunction,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sentryWrapped: WrappedFunction = function (this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n"],"names":[],"mappings":";;;AAUA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
package/esm/index.js CHANGED
@@ -1,15 +1,33 @@
1
- import { __assign } from "tslib";
2
- export * from './exports';
3
- import { Integrations as CoreIntegrations } from '@sentry/core';
1
+ import './exports.js';
2
+ import { Integrations } from '@sentry/core';
3
+ export { FunctionToString, Hub, InboundFilters, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, captureEvent, captureException, captureMessage, configureScope, createTransport, getCurrentHub, getHubFromCarrier, makeMain, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope } from '@sentry/core';
4
4
  import { getGlobalObject } from '@sentry/utils';
5
- import * as BrowserIntegrations from './integrations';
6
- import * as Transports from './transports';
7
- var windowIntegrations = {};
5
+ import * as index from './integrations/index.js';
6
+ export { BrowserClient } from './client.js';
7
+ export { makeFetchTransport } from './transports/fetch.js';
8
+ export { makeXHRTransport } from './transports/xhr.js';
9
+ export { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser } from './stack-parsers.js';
10
+ export { close, defaultIntegrations, flush, forceLoad, init, lastEventId, onLoad, showReportDialog, wrap } from './sdk.js';
11
+ export { GlobalHandlers } from './integrations/globalhandlers.js';
12
+ export { TryCatch } from './integrations/trycatch.js';
13
+ export { Breadcrumbs } from './integrations/breadcrumbs.js';
14
+ export { LinkedErrors } from './integrations/linkederrors.js';
15
+ export { HttpContext } from './integrations/httpcontext.js';
16
+ export { Dedupe } from './integrations/dedupe.js';
17
+
18
+ let windowIntegrations = {};
19
+
8
20
  // This block is needed to add compatibility with the integrations packages when used with a CDN
9
21
  var _window = getGlobalObject();
10
22
  if (_window.Sentry && _window.Sentry.Integrations) {
11
- windowIntegrations = _window.Sentry.Integrations;
23
+ windowIntegrations = _window.Sentry.Integrations;
12
24
  }
13
- var INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);
14
- export { INTEGRATIONS as Integrations, Transports };
15
- //# sourceMappingURL=index.js.map
25
+
26
+ var INTEGRATIONS = {
27
+ ...windowIntegrations,
28
+ ...Integrations,
29
+ ...index,
30
+ };
31
+
32
+ export { INTEGRATIONS as Integrations };
33
+ //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,IAAI,kBAAkB,GAAG,EAAE,CAAC;AAE5B,gGAAgG;AAChG,IAAM,OAAO,GAAG,eAAe,EAAU,CAAC;AAC1C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;IACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;CAClD;AAED,IAAM,YAAY,kCACb,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,CACvB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC","sourcesContent":["export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nconst _window = getGlobalObject<Window>();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"]}
1
+ {"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nconst _window = getGlobalObject<Window>();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;"}