@sentry/browser 6.17.8 → 6.17.9
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/bundle.es6.js +70 -74
- package/build/bundle.es6.js.map +1 -1
- package/build/bundle.es6.min.js +2 -2
- package/build/bundle.es6.min.js.map +1 -1
- package/build/bundle.js +71 -75
- package/build/bundle.js.map +1 -1
- package/build/bundle.min.js +2 -2
- package/build/bundle.min.js.map +1 -1
- package/package.json +4 -7
package/build/bundle.es6.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
/*! @sentry/browser 6.17.
|
|
1
|
+
/*! @sentry/browser 6.17.9 (4ef06bf) | https://github.com/getsentry/sentry-javascript */
|
|
2
2
|
var Sentry = (function (exports) {
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* TODO(v7): Remove this enum and replace with SeverityLevel
|
|
5
6
|
*/
|
|
7
|
+
exports.Severity = void 0;
|
|
6
8
|
(function (Severity) {
|
|
7
9
|
/** JSDoc */
|
|
8
10
|
Severity["Fatal"] = "fatal";
|
|
@@ -63,7 +65,7 @@ var Sentry = (function (exports) {
|
|
|
63
65
|
* @returns Global scope object
|
|
64
66
|
*/
|
|
65
67
|
function getGlobalObject() {
|
|
66
|
-
return (
|
|
68
|
+
return (typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
|
|
67
69
|
? window // eslint-disable-line no-restricted-globals
|
|
68
70
|
: typeof self !== 'undefined'
|
|
69
71
|
? self
|
|
@@ -444,7 +446,7 @@ var Sentry = (function (exports) {
|
|
|
444
446
|
const SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
|
|
445
447
|
|
|
446
448
|
// TODO: Implement different loggers for different environments
|
|
447
|
-
const global$
|
|
449
|
+
const global$6 = getGlobalObject();
|
|
448
450
|
/** Prefix for logging strings */
|
|
449
451
|
const PREFIX = 'Sentry Logger ';
|
|
450
452
|
/**
|
|
@@ -499,7 +501,7 @@ var Sentry = (function (exports) {
|
|
|
499
501
|
return;
|
|
500
502
|
}
|
|
501
503
|
consoleSandbox(() => {
|
|
502
|
-
global$
|
|
504
|
+
global$6.console.log(`${PREFIX}[Log]: ${args.join(' ')}`);
|
|
503
505
|
});
|
|
504
506
|
}
|
|
505
507
|
/** JSDoc */
|
|
@@ -508,7 +510,7 @@ var Sentry = (function (exports) {
|
|
|
508
510
|
return;
|
|
509
511
|
}
|
|
510
512
|
consoleSandbox(() => {
|
|
511
|
-
global$
|
|
513
|
+
global$6.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`);
|
|
512
514
|
});
|
|
513
515
|
}
|
|
514
516
|
/** JSDoc */
|
|
@@ -517,13 +519,13 @@ var Sentry = (function (exports) {
|
|
|
517
519
|
return;
|
|
518
520
|
}
|
|
519
521
|
consoleSandbox(() => {
|
|
520
|
-
global$
|
|
522
|
+
global$6.console.error(`${PREFIX}[Error]: ${args.join(' ')}`);
|
|
521
523
|
});
|
|
522
524
|
}
|
|
523
525
|
}
|
|
524
526
|
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
|
525
|
-
global$
|
|
526
|
-
const logger = global$
|
|
527
|
+
global$6.__SENTRY__ = global$6.__SENTRY__ || {};
|
|
528
|
+
const logger = global$6.__SENTRY__.logger || (global$6.__SENTRY__.logger = new Logger());
|
|
527
529
|
|
|
528
530
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
529
531
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1145,7 +1147,7 @@ var Sentry = (function (exports) {
|
|
|
1145
1147
|
return !isChromePackagedApp && hasHistoryApi;
|
|
1146
1148
|
}
|
|
1147
1149
|
|
|
1148
|
-
const global$
|
|
1150
|
+
const global$5 = getGlobalObject();
|
|
1149
1151
|
/**
|
|
1150
1152
|
* Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
|
|
1151
1153
|
* - Console API
|
|
@@ -1218,19 +1220,19 @@ var Sentry = (function (exports) {
|
|
|
1218
1220
|
}
|
|
1219
1221
|
/** JSDoc */
|
|
1220
1222
|
function instrumentConsole() {
|
|
1221
|
-
if (!('console' in global$
|
|
1223
|
+
if (!('console' in global$5)) {
|
|
1222
1224
|
return;
|
|
1223
1225
|
}
|
|
1224
1226
|
['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {
|
|
1225
|
-
if (!(level in global$
|
|
1227
|
+
if (!(level in global$5.console)) {
|
|
1226
1228
|
return;
|
|
1227
1229
|
}
|
|
1228
|
-
fill(global$
|
|
1230
|
+
fill(global$5.console, level, function (originalConsoleMethod) {
|
|
1229
1231
|
return function (...args) {
|
|
1230
1232
|
triggerHandlers('console', { args, level });
|
|
1231
1233
|
// this fails for some browsers. :(
|
|
1232
1234
|
if (originalConsoleMethod) {
|
|
1233
|
-
originalConsoleMethod.apply(global$
|
|
1235
|
+
originalConsoleMethod.apply(global$5.console, args);
|
|
1234
1236
|
}
|
|
1235
1237
|
};
|
|
1236
1238
|
});
|
|
@@ -1241,7 +1243,7 @@ var Sentry = (function (exports) {
|
|
|
1241
1243
|
if (!supportsNativeFetch()) {
|
|
1242
1244
|
return;
|
|
1243
1245
|
}
|
|
1244
|
-
fill(global$
|
|
1246
|
+
fill(global$5, 'fetch', function (originalFetch) {
|
|
1245
1247
|
return function (...args) {
|
|
1246
1248
|
const handlerData = {
|
|
1247
1249
|
args,
|
|
@@ -1253,7 +1255,7 @@ var Sentry = (function (exports) {
|
|
|
1253
1255
|
};
|
|
1254
1256
|
triggerHandlers('fetch', Object.assign({}, handlerData));
|
|
1255
1257
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1256
|
-
return originalFetch.apply(global$
|
|
1258
|
+
return originalFetch.apply(global$5, args).then((response) => {
|
|
1257
1259
|
triggerHandlers('fetch', Object.assign(Object.assign({}, handlerData), { endTimestamp: Date.now(), response }));
|
|
1258
1260
|
return response;
|
|
1259
1261
|
}, (error) => {
|
|
@@ -1269,7 +1271,7 @@ var Sentry = (function (exports) {
|
|
|
1269
1271
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
1270
1272
|
/** Extract `method` from fetch call arguments */
|
|
1271
1273
|
function getFetchMethod(fetchArgs = []) {
|
|
1272
|
-
if ('Request' in global$
|
|
1274
|
+
if ('Request' in global$5 && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {
|
|
1273
1275
|
return String(fetchArgs[0].method).toUpperCase();
|
|
1274
1276
|
}
|
|
1275
1277
|
if (fetchArgs[1] && fetchArgs[1].method) {
|
|
@@ -1282,7 +1284,7 @@ var Sentry = (function (exports) {
|
|
|
1282
1284
|
if (typeof fetchArgs[0] === 'string') {
|
|
1283
1285
|
return fetchArgs[0];
|
|
1284
1286
|
}
|
|
1285
|
-
if ('Request' in global$
|
|
1287
|
+
if ('Request' in global$5 && isInstanceOf(fetchArgs[0], Request)) {
|
|
1286
1288
|
return fetchArgs[0].url;
|
|
1287
1289
|
}
|
|
1288
1290
|
return String(fetchArgs[0]);
|
|
@@ -1290,7 +1292,7 @@ var Sentry = (function (exports) {
|
|
|
1290
1292
|
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
1291
1293
|
/** JSDoc */
|
|
1292
1294
|
function instrumentXHR() {
|
|
1293
|
-
if (!('XMLHttpRequest' in global$
|
|
1295
|
+
if (!('XMLHttpRequest' in global$5)) {
|
|
1294
1296
|
return;
|
|
1295
1297
|
}
|
|
1296
1298
|
const xhrproto = XMLHttpRequest.prototype;
|
|
@@ -1361,9 +1363,9 @@ var Sentry = (function (exports) {
|
|
|
1361
1363
|
if (!supportsHistory()) {
|
|
1362
1364
|
return;
|
|
1363
1365
|
}
|
|
1364
|
-
const oldOnPopState = global$
|
|
1365
|
-
global$
|
|
1366
|
-
const to = global$
|
|
1366
|
+
const oldOnPopState = global$5.onpopstate;
|
|
1367
|
+
global$5.onpopstate = function (...args) {
|
|
1368
|
+
const to = global$5.location.href;
|
|
1367
1369
|
// keep track of the current URL state, as we always receive only the updated state
|
|
1368
1370
|
const from = lastHref;
|
|
1369
1371
|
lastHref = to;
|
|
@@ -1401,8 +1403,8 @@ var Sentry = (function (exports) {
|
|
|
1401
1403
|
return originalHistoryFunction.apply(this, args);
|
|
1402
1404
|
};
|
|
1403
1405
|
}
|
|
1404
|
-
fill(global$
|
|
1405
|
-
fill(global$
|
|
1406
|
+
fill(global$5.history, 'pushState', historyReplacementFunction);
|
|
1407
|
+
fill(global$5.history, 'replaceState', historyReplacementFunction);
|
|
1406
1408
|
}
|
|
1407
1409
|
const debounceDuration = 1000;
|
|
1408
1410
|
let debounceTimerID;
|
|
@@ -1504,14 +1506,14 @@ var Sentry = (function (exports) {
|
|
|
1504
1506
|
}
|
|
1505
1507
|
// Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
|
|
1506
1508
|
clearTimeout(debounceTimerID);
|
|
1507
|
-
debounceTimerID = global$
|
|
1509
|
+
debounceTimerID = global$5.setTimeout(() => {
|
|
1508
1510
|
debounceTimerID = undefined;
|
|
1509
1511
|
}, debounceDuration);
|
|
1510
1512
|
};
|
|
1511
1513
|
}
|
|
1512
1514
|
/** JSDoc */
|
|
1513
1515
|
function instrumentDOM() {
|
|
1514
|
-
if (!('document' in global$
|
|
1516
|
+
if (!('document' in global$5)) {
|
|
1515
1517
|
return;
|
|
1516
1518
|
}
|
|
1517
1519
|
// Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
|
|
@@ -1519,8 +1521,8 @@ var Sentry = (function (exports) {
|
|
|
1519
1521
|
// we instrument `addEventListener` so that we don't end up attaching this handler twice.
|
|
1520
1522
|
const triggerDOMHandler = triggerHandlers.bind(null, 'dom');
|
|
1521
1523
|
const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
|
|
1522
|
-
global$
|
|
1523
|
-
global$
|
|
1524
|
+
global$5.document.addEventListener('click', globalDOMEventHandler, false);
|
|
1525
|
+
global$5.document.addEventListener('keypress', globalDOMEventHandler, false);
|
|
1524
1526
|
// After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
|
|
1525
1527
|
// clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
|
|
1526
1528
|
// way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
|
|
@@ -1528,7 +1530,7 @@ var Sentry = (function (exports) {
|
|
|
1528
1530
|
// guaranteed to fire at least once.)
|
|
1529
1531
|
['EventTarget', 'Node'].forEach((target) => {
|
|
1530
1532
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1531
|
-
const proto = global$
|
|
1533
|
+
const proto = global$5[target] && global$5[target].prototype;
|
|
1532
1534
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
|
|
1533
1535
|
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
|
|
1534
1536
|
return;
|
|
@@ -1589,8 +1591,8 @@ var Sentry = (function (exports) {
|
|
|
1589
1591
|
let _oldOnErrorHandler = null;
|
|
1590
1592
|
/** JSDoc */
|
|
1591
1593
|
function instrumentError() {
|
|
1592
|
-
_oldOnErrorHandler = global$
|
|
1593
|
-
global$
|
|
1594
|
+
_oldOnErrorHandler = global$5.onerror;
|
|
1595
|
+
global$5.onerror = function (msg, url, line, column, error) {
|
|
1594
1596
|
triggerHandlers('error', {
|
|
1595
1597
|
column,
|
|
1596
1598
|
error,
|
|
@@ -1608,8 +1610,8 @@ var Sentry = (function (exports) {
|
|
|
1608
1610
|
let _oldOnUnhandledRejectionHandler = null;
|
|
1609
1611
|
/** JSDoc */
|
|
1610
1612
|
function instrumentUnhandledRejection() {
|
|
1611
|
-
_oldOnUnhandledRejectionHandler = global$
|
|
1612
|
-
global$
|
|
1613
|
+
_oldOnUnhandledRejectionHandler = global$5.onunhandledrejection;
|
|
1614
|
+
global$5.onunhandledrejection = function (e) {
|
|
1613
1615
|
triggerHandlers('unhandledrejection', e);
|
|
1614
1616
|
if (_oldOnUnhandledRejectionHandler) {
|
|
1615
1617
|
// eslint-disable-next-line prefer-rest-params
|
|
@@ -2123,7 +2125,7 @@ var Sentry = (function (exports) {
|
|
|
2123
2125
|
/**
|
|
2124
2126
|
* The Performance API implementation for the current platform, if available.
|
|
2125
2127
|
*/
|
|
2126
|
-
const platformPerformance =
|
|
2128
|
+
const platformPerformance = getBrowserPerformance();
|
|
2127
2129
|
const timestampSource = platformPerformance === undefined
|
|
2128
2130
|
? dateTimestampSource
|
|
2129
2131
|
: {
|
|
@@ -2149,7 +2151,7 @@ var Sentry = (function (exports) {
|
|
|
2149
2151
|
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
|
2150
2152
|
* performance API is available.
|
|
2151
2153
|
*/
|
|
2152
|
-
|
|
2154
|
+
(() => {
|
|
2153
2155
|
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
|
2154
2156
|
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
|
2155
2157
|
// data as reliable if they are within a reasonable threshold of the current time.
|
|
@@ -4242,7 +4244,7 @@ var Sentry = (function (exports) {
|
|
|
4242
4244
|
hub.bindClient(client);
|
|
4243
4245
|
}
|
|
4244
4246
|
|
|
4245
|
-
const SDK_VERSION = '6.17.
|
|
4247
|
+
const SDK_VERSION = '6.17.9';
|
|
4246
4248
|
|
|
4247
4249
|
let originalFunctionToString;
|
|
4248
4250
|
/** Patch toString calls to return proper name for wrapped functions */
|
|
@@ -4465,8 +4467,6 @@ var Sentry = (function (exports) {
|
|
|
4465
4467
|
*/
|
|
4466
4468
|
InboundFilters.id = 'InboundFilters';
|
|
4467
4469
|
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
4470
|
var CoreIntegrations = /*#__PURE__*/Object.freeze({
|
|
4471
4471
|
__proto__: null,
|
|
4472
4472
|
FunctionToString: FunctionToString,
|
|
@@ -4797,7 +4797,7 @@ var Sentry = (function (exports) {
|
|
|
4797
4797
|
return event;
|
|
4798
4798
|
}
|
|
4799
4799
|
|
|
4800
|
-
const global$
|
|
4800
|
+
const global$4 = getGlobalObject();
|
|
4801
4801
|
let cachedFetchImpl;
|
|
4802
4802
|
/**
|
|
4803
4803
|
* A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
|
|
@@ -4843,11 +4843,11 @@ var Sentry = (function (exports) {
|
|
|
4843
4843
|
}
|
|
4844
4844
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
4845
4845
|
// Fast path to avoid DOM I/O
|
|
4846
|
-
if (isNativeFetch(global$
|
|
4847
|
-
return (cachedFetchImpl = global$
|
|
4846
|
+
if (isNativeFetch(global$4.fetch)) {
|
|
4847
|
+
return (cachedFetchImpl = global$4.fetch.bind(global$4));
|
|
4848
4848
|
}
|
|
4849
|
-
const document = global$
|
|
4850
|
-
let fetchImpl = global$
|
|
4849
|
+
const document = global$4.document;
|
|
4850
|
+
let fetchImpl = global$4.fetch;
|
|
4851
4851
|
// eslint-disable-next-line deprecation/deprecation
|
|
4852
4852
|
if (document && typeof document.createElement === `function`) {
|
|
4853
4853
|
try {
|
|
@@ -4866,7 +4866,7 @@ var Sentry = (function (exports) {
|
|
|
4866
4866
|
}
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
|
-
return (cachedFetchImpl = fetchImpl.bind(global$
|
|
4869
|
+
return (cachedFetchImpl = fetchImpl.bind(global$4));
|
|
4870
4870
|
/* eslint-enable @typescript-eslint/unbound-method */
|
|
4871
4871
|
}
|
|
4872
4872
|
/**
|
|
@@ -4876,11 +4876,11 @@ var Sentry = (function (exports) {
|
|
|
4876
4876
|
* @param body report payload
|
|
4877
4877
|
*/
|
|
4878
4878
|
function sendReport(url, body) {
|
|
4879
|
-
const isRealNavigator = Object.prototype.toString.call(global$
|
|
4880
|
-
const hasSendBeacon = isRealNavigator && typeof global$
|
|
4879
|
+
const isRealNavigator = Object.prototype.toString.call(global$4 && global$4.navigator) === '[object Navigator]';
|
|
4880
|
+
const hasSendBeacon = isRealNavigator && typeof global$4.navigator.sendBeacon === 'function';
|
|
4881
4881
|
if (hasSendBeacon) {
|
|
4882
4882
|
// Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
|
|
4883
|
-
const sendBeacon = global$
|
|
4883
|
+
const sendBeacon = global$4.navigator.sendBeacon.bind(global$4.navigator);
|
|
4884
4884
|
return sendBeacon(url, body);
|
|
4885
4885
|
}
|
|
4886
4886
|
if (supportsFetch()) {
|
|
@@ -4898,7 +4898,7 @@ var Sentry = (function (exports) {
|
|
|
4898
4898
|
const tyStr = ty;
|
|
4899
4899
|
return tyStr === 'event' ? 'error' : tyStr;
|
|
4900
4900
|
}
|
|
4901
|
-
const global$
|
|
4901
|
+
const global$3 = getGlobalObject();
|
|
4902
4902
|
/** Base Transport class implementation */
|
|
4903
4903
|
class BaseTransport {
|
|
4904
4904
|
constructor(options) {
|
|
@@ -4911,9 +4911,9 @@ var Sentry = (function (exports) {
|
|
|
4911
4911
|
this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);
|
|
4912
4912
|
// eslint-disable-next-line deprecation/deprecation
|
|
4913
4913
|
this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);
|
|
4914
|
-
if (this.options.sendClientReports && global$
|
|
4915
|
-
global$
|
|
4916
|
-
if (global$
|
|
4914
|
+
if (this.options.sendClientReports && global$3.document) {
|
|
4915
|
+
global$3.document.addEventListener('visibilitychange', () => {
|
|
4916
|
+
if (global$3.document.visibilityState === 'hidden') {
|
|
4917
4917
|
this._flushOutcomes();
|
|
4918
4918
|
}
|
|
4919
4919
|
});
|
|
@@ -5177,8 +5177,6 @@ var Sentry = (function (exports) {
|
|
|
5177
5177
|
}
|
|
5178
5178
|
}
|
|
5179
5179
|
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
5180
|
var index = /*#__PURE__*/Object.freeze({
|
|
5183
5181
|
__proto__: null,
|
|
5184
5182
|
BaseTransport: BaseTransport,
|
|
@@ -5222,7 +5220,7 @@ var Sentry = (function (exports) {
|
|
|
5222
5220
|
}
|
|
5223
5221
|
}
|
|
5224
5222
|
|
|
5225
|
-
const global$
|
|
5223
|
+
const global$2 = getGlobalObject();
|
|
5226
5224
|
let ignoreOnError = 0;
|
|
5227
5225
|
/**
|
|
5228
5226
|
* @hidden
|
|
@@ -5248,7 +5246,7 @@ var Sentry = (function (exports) {
|
|
|
5248
5246
|
* @returns The wrapped function.
|
|
5249
5247
|
* @hidden
|
|
5250
5248
|
*/
|
|
5251
|
-
function wrap(fn, options = {}, before) {
|
|
5249
|
+
function wrap$1(fn, options = {}, before) {
|
|
5252
5250
|
// for future readers what this does is wrap a function and then create
|
|
5253
5251
|
// a bi-directional wrapping between them.
|
|
5254
5252
|
//
|
|
@@ -5285,7 +5283,7 @@ var Sentry = (function (exports) {
|
|
|
5285
5283
|
before.apply(this, arguments);
|
|
5286
5284
|
}
|
|
5287
5285
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
5288
|
-
const wrappedArguments = args.map((arg) => wrap(arg, options));
|
|
5286
|
+
const wrappedArguments = args.map((arg) => wrap$1(arg, options));
|
|
5289
5287
|
// Attempt to invoke user-land function
|
|
5290
5288
|
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
|
5291
5289
|
// means the sentry.javascript SDK caught an error invoking your application code. This
|
|
@@ -5343,7 +5341,7 @@ var Sentry = (function (exports) {
|
|
|
5343
5341
|
* @hidden
|
|
5344
5342
|
*/
|
|
5345
5343
|
function injectReportDialog(options = {}) {
|
|
5346
|
-
if (!global$
|
|
5344
|
+
if (!global$2.document) {
|
|
5347
5345
|
return;
|
|
5348
5346
|
}
|
|
5349
5347
|
if (!options.eventId) {
|
|
@@ -5358,14 +5356,14 @@ var Sentry = (function (exports) {
|
|
|
5358
5356
|
}
|
|
5359
5357
|
return;
|
|
5360
5358
|
}
|
|
5361
|
-
const script = global$
|
|
5359
|
+
const script = global$2.document.createElement('script');
|
|
5362
5360
|
script.async = true;
|
|
5363
5361
|
script.src = getReportDialogEndpoint(options.dsn, options);
|
|
5364
5362
|
if (options.onLoad) {
|
|
5365
5363
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
5366
5364
|
script.onload = options.onLoad;
|
|
5367
5365
|
}
|
|
5368
|
-
const injectionPoint = global$
|
|
5366
|
+
const injectionPoint = global$2.document.head || global$2.document.body;
|
|
5369
5367
|
if (injectionPoint) {
|
|
5370
5368
|
injectionPoint.appendChild(script);
|
|
5371
5369
|
}
|
|
@@ -5650,7 +5648,7 @@ var Sentry = (function (exports) {
|
|
|
5650
5648
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5651
5649
|
return function (...args) {
|
|
5652
5650
|
const originalCallback = args[0];
|
|
5653
|
-
args[0] = wrap(originalCallback, {
|
|
5651
|
+
args[0] = wrap$1(originalCallback, {
|
|
5654
5652
|
mechanism: {
|
|
5655
5653
|
data: { function: getFunctionName(original) },
|
|
5656
5654
|
handled: true,
|
|
@@ -5666,7 +5664,7 @@ var Sentry = (function (exports) {
|
|
|
5666
5664
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5667
5665
|
return function (callback) {
|
|
5668
5666
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
5669
|
-
return original.call(this, wrap(callback, {
|
|
5667
|
+
return original.call(this, wrap$1(callback, {
|
|
5670
5668
|
mechanism: {
|
|
5671
5669
|
data: {
|
|
5672
5670
|
function: 'requestAnimationFrame',
|
|
@@ -5705,7 +5703,7 @@ var Sentry = (function (exports) {
|
|
|
5705
5703
|
wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);
|
|
5706
5704
|
}
|
|
5707
5705
|
// Otherwise wrap directly
|
|
5708
|
-
return wrap(original, wrapOptions);
|
|
5706
|
+
return wrap$1(original, wrapOptions);
|
|
5709
5707
|
});
|
|
5710
5708
|
}
|
|
5711
5709
|
});
|
|
@@ -5726,7 +5724,7 @@ var Sentry = (function (exports) {
|
|
|
5726
5724
|
return function (eventName, fn, options) {
|
|
5727
5725
|
try {
|
|
5728
5726
|
if (typeof fn.handleEvent === 'function') {
|
|
5729
|
-
fn.handleEvent = wrap(fn.handleEvent.bind(fn), {
|
|
5727
|
+
fn.handleEvent = wrap$1(fn.handleEvent.bind(fn), {
|
|
5730
5728
|
mechanism: {
|
|
5731
5729
|
data: {
|
|
5732
5730
|
function: 'handleEvent',
|
|
@@ -5744,7 +5742,7 @@ var Sentry = (function (exports) {
|
|
|
5744
5742
|
}
|
|
5745
5743
|
return original.call(this, eventName,
|
|
5746
5744
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5747
|
-
wrap(fn, {
|
|
5745
|
+
wrap$1(fn, {
|
|
5748
5746
|
mechanism: {
|
|
5749
5747
|
data: {
|
|
5750
5748
|
function: 'addEventListener',
|
|
@@ -6062,7 +6060,7 @@ var Sentry = (function (exports) {
|
|
|
6062
6060
|
return _walkErrorTree(limit, error[key], key, [exception, ...stack]);
|
|
6063
6061
|
}
|
|
6064
6062
|
|
|
6065
|
-
const global$
|
|
6063
|
+
const global$1 = getGlobalObject();
|
|
6066
6064
|
/** UserAgent */
|
|
6067
6065
|
class UserAgent {
|
|
6068
6066
|
constructor() {
|
|
@@ -6078,13 +6076,13 @@ var Sentry = (function (exports) {
|
|
|
6078
6076
|
addGlobalEventProcessor((event) => {
|
|
6079
6077
|
if (getCurrentHub().getIntegration(UserAgent)) {
|
|
6080
6078
|
// if none of the information we want exists, don't bother
|
|
6081
|
-
if (!global$
|
|
6079
|
+
if (!global$1.navigator && !global$1.location && !global$1.document) {
|
|
6082
6080
|
return event;
|
|
6083
6081
|
}
|
|
6084
6082
|
// grab as much info as exists and add it to the event
|
|
6085
|
-
const url = (event.request && event.request.url) || (global$
|
|
6086
|
-
const { referrer } = global$
|
|
6087
|
-
const { userAgent } = global$
|
|
6083
|
+
const url = (event.request && event.request.url) || (global$1.location && global$1.location.href);
|
|
6084
|
+
const { referrer } = global$1.document || {};
|
|
6085
|
+
const { userAgent } = global$1.navigator || {};
|
|
6088
6086
|
const headers = Object.assign(Object.assign(Object.assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));
|
|
6089
6087
|
const request = Object.assign(Object.assign({}, (url && { url })), { headers });
|
|
6090
6088
|
return Object.assign(Object.assign({}, event), { request });
|
|
@@ -6262,8 +6260,6 @@ var Sentry = (function (exports) {
|
|
|
6262
6260
|
return undefined;
|
|
6263
6261
|
}
|
|
6264
6262
|
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
6263
|
var BrowserIntegrations = /*#__PURE__*/Object.freeze({
|
|
6268
6264
|
__proto__: null,
|
|
6269
6265
|
GlobalHandlers: GlobalHandlers,
|
|
@@ -6510,8 +6506,8 @@ var Sentry = (function (exports) {
|
|
|
6510
6506
|
* @returns The result of wrapped function call.
|
|
6511
6507
|
*/
|
|
6512
6508
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6513
|
-
function wrap
|
|
6514
|
-
return wrap(fn)();
|
|
6509
|
+
function wrap(fn) {
|
|
6510
|
+
return wrap$1(fn)();
|
|
6515
6511
|
}
|
|
6516
6512
|
function startSessionOnHub(hub) {
|
|
6517
6513
|
hub.startSession({ ignoreDuration: true });
|
|
@@ -6600,9 +6596,9 @@ var Sentry = (function (exports) {
|
|
|
6600
6596
|
exports.showReportDialog = showReportDialog;
|
|
6601
6597
|
exports.startTransaction = startTransaction;
|
|
6602
6598
|
exports.withScope = withScope;
|
|
6603
|
-
exports.wrap = wrap
|
|
6599
|
+
exports.wrap = wrap;
|
|
6604
6600
|
|
|
6605
6601
|
return exports;
|
|
6606
6602
|
|
|
6607
|
-
}({})
|
|
6603
|
+
})({});
|
|
6608
6604
|
//# sourceMappingURL=bundle.es6.js.map
|