@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.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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
|
Copyright (c) Microsoft Corporation.
|
|
5
6
|
|
|
@@ -81,6 +82,7 @@ var Sentry = (function (exports) {
|
|
|
81
82
|
/**
|
|
82
83
|
* TODO(v7): Remove this enum and replace with SeverityLevel
|
|
83
84
|
*/
|
|
85
|
+
exports.Severity = void 0;
|
|
84
86
|
(function (Severity) {
|
|
85
87
|
/** JSDoc */
|
|
86
88
|
Severity["Fatal"] = "fatal";
|
|
@@ -141,7 +143,7 @@ var Sentry = (function (exports) {
|
|
|
141
143
|
* @returns Global scope object
|
|
142
144
|
*/
|
|
143
145
|
function getGlobalObject() {
|
|
144
|
-
return (
|
|
146
|
+
return (typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
|
|
145
147
|
? window // eslint-disable-line no-restricted-globals
|
|
146
148
|
: typeof self !== 'undefined'
|
|
147
149
|
? self
|
|
@@ -527,7 +529,7 @@ var Sentry = (function (exports) {
|
|
|
527
529
|
var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
|
|
528
530
|
|
|
529
531
|
// TODO: Implement different loggers for different environments
|
|
530
|
-
var global$
|
|
532
|
+
var global$6 = getGlobalObject();
|
|
531
533
|
/** Prefix for logging strings */
|
|
532
534
|
var PREFIX = 'Sentry Logger ';
|
|
533
535
|
/**
|
|
@@ -586,7 +588,7 @@ var Sentry = (function (exports) {
|
|
|
586
588
|
return;
|
|
587
589
|
}
|
|
588
590
|
consoleSandbox(function () {
|
|
589
|
-
global$
|
|
591
|
+
global$6.console.log(PREFIX + "[Log]: " + args.join(' '));
|
|
590
592
|
});
|
|
591
593
|
};
|
|
592
594
|
/** JSDoc */
|
|
@@ -599,7 +601,7 @@ var Sentry = (function (exports) {
|
|
|
599
601
|
return;
|
|
600
602
|
}
|
|
601
603
|
consoleSandbox(function () {
|
|
602
|
-
global$
|
|
604
|
+
global$6.console.warn(PREFIX + "[Warn]: " + args.join(' '));
|
|
603
605
|
});
|
|
604
606
|
};
|
|
605
607
|
/** JSDoc */
|
|
@@ -612,14 +614,14 @@ var Sentry = (function (exports) {
|
|
|
612
614
|
return;
|
|
613
615
|
}
|
|
614
616
|
consoleSandbox(function () {
|
|
615
|
-
global$
|
|
617
|
+
global$6.console.error(PREFIX + "[Error]: " + args.join(' '));
|
|
616
618
|
});
|
|
617
619
|
};
|
|
618
620
|
return Logger;
|
|
619
621
|
}());
|
|
620
622
|
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
|
621
|
-
global$
|
|
622
|
-
var logger = global$
|
|
623
|
+
global$6.__SENTRY__ = global$6.__SENTRY__ || {};
|
|
624
|
+
var logger = global$6.__SENTRY__.logger || (global$6.__SENTRY__.logger = new Logger());
|
|
623
625
|
|
|
624
626
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
625
627
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1284,7 +1286,7 @@ var Sentry = (function (exports) {
|
|
|
1284
1286
|
return !isChromePackagedApp && hasHistoryApi;
|
|
1285
1287
|
}
|
|
1286
1288
|
|
|
1287
|
-
var global$
|
|
1289
|
+
var global$5 = getGlobalObject();
|
|
1288
1290
|
/**
|
|
1289
1291
|
* Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
|
|
1290
1292
|
* - Console API
|
|
@@ -1368,14 +1370,14 @@ var Sentry = (function (exports) {
|
|
|
1368
1370
|
}
|
|
1369
1371
|
/** JSDoc */
|
|
1370
1372
|
function instrumentConsole() {
|
|
1371
|
-
if (!('console' in global$
|
|
1373
|
+
if (!('console' in global$5)) {
|
|
1372
1374
|
return;
|
|
1373
1375
|
}
|
|
1374
1376
|
['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {
|
|
1375
|
-
if (!(level in global$
|
|
1377
|
+
if (!(level in global$5.console)) {
|
|
1376
1378
|
return;
|
|
1377
1379
|
}
|
|
1378
|
-
fill(global$
|
|
1380
|
+
fill(global$5.console, level, function (originalConsoleMethod) {
|
|
1379
1381
|
return function () {
|
|
1380
1382
|
var args = [];
|
|
1381
1383
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -1384,7 +1386,7 @@ var Sentry = (function (exports) {
|
|
|
1384
1386
|
triggerHandlers('console', { args: args, level: level });
|
|
1385
1387
|
// this fails for some browsers. :(
|
|
1386
1388
|
if (originalConsoleMethod) {
|
|
1387
|
-
originalConsoleMethod.apply(global$
|
|
1389
|
+
originalConsoleMethod.apply(global$5.console, args);
|
|
1388
1390
|
}
|
|
1389
1391
|
};
|
|
1390
1392
|
});
|
|
@@ -1395,7 +1397,7 @@ var Sentry = (function (exports) {
|
|
|
1395
1397
|
if (!supportsNativeFetch()) {
|
|
1396
1398
|
return;
|
|
1397
1399
|
}
|
|
1398
|
-
fill(global$
|
|
1400
|
+
fill(global$5, 'fetch', function (originalFetch) {
|
|
1399
1401
|
return function () {
|
|
1400
1402
|
var args = [];
|
|
1401
1403
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -1411,7 +1413,7 @@ var Sentry = (function (exports) {
|
|
|
1411
1413
|
};
|
|
1412
1414
|
triggerHandlers('fetch', __assign({}, handlerData));
|
|
1413
1415
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1414
|
-
return originalFetch.apply(global$
|
|
1416
|
+
return originalFetch.apply(global$5, args).then(function (response) {
|
|
1415
1417
|
triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));
|
|
1416
1418
|
return response;
|
|
1417
1419
|
}, function (error) {
|
|
@@ -1428,7 +1430,7 @@ var Sentry = (function (exports) {
|
|
|
1428
1430
|
/** Extract `method` from fetch call arguments */
|
|
1429
1431
|
function getFetchMethod(fetchArgs) {
|
|
1430
1432
|
if (fetchArgs === void 0) { fetchArgs = []; }
|
|
1431
|
-
if ('Request' in global$
|
|
1433
|
+
if ('Request' in global$5 && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {
|
|
1432
1434
|
return String(fetchArgs[0].method).toUpperCase();
|
|
1433
1435
|
}
|
|
1434
1436
|
if (fetchArgs[1] && fetchArgs[1].method) {
|
|
@@ -1442,7 +1444,7 @@ var Sentry = (function (exports) {
|
|
|
1442
1444
|
if (typeof fetchArgs[0] === 'string') {
|
|
1443
1445
|
return fetchArgs[0];
|
|
1444
1446
|
}
|
|
1445
|
-
if ('Request' in global$
|
|
1447
|
+
if ('Request' in global$5 && isInstanceOf(fetchArgs[0], Request)) {
|
|
1446
1448
|
return fetchArgs[0].url;
|
|
1447
1449
|
}
|
|
1448
1450
|
return String(fetchArgs[0]);
|
|
@@ -1450,7 +1452,7 @@ var Sentry = (function (exports) {
|
|
|
1450
1452
|
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
1451
1453
|
/** JSDoc */
|
|
1452
1454
|
function instrumentXHR() {
|
|
1453
|
-
if (!('XMLHttpRequest' in global$
|
|
1455
|
+
if (!('XMLHttpRequest' in global$5)) {
|
|
1454
1456
|
return;
|
|
1455
1457
|
}
|
|
1456
1458
|
var xhrproto = XMLHttpRequest.prototype;
|
|
@@ -1533,13 +1535,13 @@ var Sentry = (function (exports) {
|
|
|
1533
1535
|
if (!supportsHistory()) {
|
|
1534
1536
|
return;
|
|
1535
1537
|
}
|
|
1536
|
-
var oldOnPopState = global$
|
|
1537
|
-
global$
|
|
1538
|
+
var oldOnPopState = global$5.onpopstate;
|
|
1539
|
+
global$5.onpopstate = function () {
|
|
1538
1540
|
var args = [];
|
|
1539
1541
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1540
1542
|
args[_i] = arguments[_i];
|
|
1541
1543
|
}
|
|
1542
|
-
var to = global$
|
|
1544
|
+
var to = global$5.location.href;
|
|
1543
1545
|
// keep track of the current URL state, as we always receive only the updated state
|
|
1544
1546
|
var from = lastHref;
|
|
1545
1547
|
lastHref = to;
|
|
@@ -1581,8 +1583,8 @@ var Sentry = (function (exports) {
|
|
|
1581
1583
|
return originalHistoryFunction.apply(this, args);
|
|
1582
1584
|
};
|
|
1583
1585
|
}
|
|
1584
|
-
fill(global$
|
|
1585
|
-
fill(global$
|
|
1586
|
+
fill(global$5.history, 'pushState', historyReplacementFunction);
|
|
1587
|
+
fill(global$5.history, 'replaceState', historyReplacementFunction);
|
|
1586
1588
|
}
|
|
1587
1589
|
var debounceDuration = 1000;
|
|
1588
1590
|
var debounceTimerID;
|
|
@@ -1685,14 +1687,14 @@ var Sentry = (function (exports) {
|
|
|
1685
1687
|
}
|
|
1686
1688
|
// Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
|
|
1687
1689
|
clearTimeout(debounceTimerID);
|
|
1688
|
-
debounceTimerID = global$
|
|
1690
|
+
debounceTimerID = global$5.setTimeout(function () {
|
|
1689
1691
|
debounceTimerID = undefined;
|
|
1690
1692
|
}, debounceDuration);
|
|
1691
1693
|
};
|
|
1692
1694
|
}
|
|
1693
1695
|
/** JSDoc */
|
|
1694
1696
|
function instrumentDOM() {
|
|
1695
|
-
if (!('document' in global$
|
|
1697
|
+
if (!('document' in global$5)) {
|
|
1696
1698
|
return;
|
|
1697
1699
|
}
|
|
1698
1700
|
// Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
|
|
@@ -1700,8 +1702,8 @@ var Sentry = (function (exports) {
|
|
|
1700
1702
|
// we instrument `addEventListener` so that we don't end up attaching this handler twice.
|
|
1701
1703
|
var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
|
|
1702
1704
|
var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
|
|
1703
|
-
global$
|
|
1704
|
-
global$
|
|
1705
|
+
global$5.document.addEventListener('click', globalDOMEventHandler, false);
|
|
1706
|
+
global$5.document.addEventListener('keypress', globalDOMEventHandler, false);
|
|
1705
1707
|
// After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
|
|
1706
1708
|
// clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
|
|
1707
1709
|
// way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
|
|
@@ -1709,7 +1711,7 @@ var Sentry = (function (exports) {
|
|
|
1709
1711
|
// guaranteed to fire at least once.)
|
|
1710
1712
|
['EventTarget', 'Node'].forEach(function (target) {
|
|
1711
1713
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1712
|
-
var proto = global$
|
|
1714
|
+
var proto = global$5[target] && global$5[target].prototype;
|
|
1713
1715
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
|
|
1714
1716
|
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
|
|
1715
1717
|
return;
|
|
@@ -1770,8 +1772,8 @@ var Sentry = (function (exports) {
|
|
|
1770
1772
|
var _oldOnErrorHandler = null;
|
|
1771
1773
|
/** JSDoc */
|
|
1772
1774
|
function instrumentError() {
|
|
1773
|
-
_oldOnErrorHandler = global$
|
|
1774
|
-
global$
|
|
1775
|
+
_oldOnErrorHandler = global$5.onerror;
|
|
1776
|
+
global$5.onerror = function (msg, url, line, column, error) {
|
|
1775
1777
|
triggerHandlers('error', {
|
|
1776
1778
|
column: column,
|
|
1777
1779
|
error: error,
|
|
@@ -1789,8 +1791,8 @@ var Sentry = (function (exports) {
|
|
|
1789
1791
|
var _oldOnUnhandledRejectionHandler = null;
|
|
1790
1792
|
/** JSDoc */
|
|
1791
1793
|
function instrumentUnhandledRejection() {
|
|
1792
|
-
_oldOnUnhandledRejectionHandler = global$
|
|
1793
|
-
global$
|
|
1794
|
+
_oldOnUnhandledRejectionHandler = global$5.onunhandledrejection;
|
|
1795
|
+
global$5.onunhandledrejection = function (e) {
|
|
1794
1796
|
triggerHandlers('unhandledrejection', e);
|
|
1795
1797
|
if (_oldOnUnhandledRejectionHandler) {
|
|
1796
1798
|
// eslint-disable-next-line prefer-rest-params
|
|
@@ -2310,7 +2312,7 @@ var Sentry = (function (exports) {
|
|
|
2310
2312
|
/**
|
|
2311
2313
|
* The Performance API implementation for the current platform, if available.
|
|
2312
2314
|
*/
|
|
2313
|
-
var platformPerformance =
|
|
2315
|
+
var platformPerformance = getBrowserPerformance();
|
|
2314
2316
|
var timestampSource = platformPerformance === undefined
|
|
2315
2317
|
? dateTimestampSource
|
|
2316
2318
|
: {
|
|
@@ -2336,7 +2338,7 @@ var Sentry = (function (exports) {
|
|
|
2336
2338
|
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
|
2337
2339
|
* performance API is available.
|
|
2338
2340
|
*/
|
|
2339
|
-
|
|
2341
|
+
((function () {
|
|
2340
2342
|
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
|
2341
2343
|
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
|
2342
2344
|
// data as reliable if they are within a reasonable threshold of the current time.
|
|
@@ -2373,7 +2375,7 @@ var Sentry = (function (exports) {
|
|
|
2373
2375
|
}
|
|
2374
2376
|
}
|
|
2375
2377
|
return dateNow;
|
|
2376
|
-
})();
|
|
2378
|
+
}))();
|
|
2377
2379
|
|
|
2378
2380
|
/**
|
|
2379
2381
|
* Absolute maximum number of breadcrumbs added to an event.
|
|
@@ -4476,7 +4478,7 @@ var Sentry = (function (exports) {
|
|
|
4476
4478
|
hub.bindClient(client);
|
|
4477
4479
|
}
|
|
4478
4480
|
|
|
4479
|
-
var SDK_VERSION = '6.17.
|
|
4481
|
+
var SDK_VERSION = '6.17.9';
|
|
4480
4482
|
|
|
4481
4483
|
var originalFunctionToString;
|
|
4482
4484
|
/** Patch toString calls to return proper name for wrapped functions */
|
|
@@ -4691,8 +4693,6 @@ var Sentry = (function (exports) {
|
|
|
4691
4693
|
return InboundFilters;
|
|
4692
4694
|
}());
|
|
4693
4695
|
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
4696
|
var CoreIntegrations = /*#__PURE__*/Object.freeze({
|
|
4697
4697
|
__proto__: null,
|
|
4698
4698
|
FunctionToString: FunctionToString,
|
|
@@ -5027,7 +5027,7 @@ var Sentry = (function (exports) {
|
|
|
5027
5027
|
return event;
|
|
5028
5028
|
}
|
|
5029
5029
|
|
|
5030
|
-
var global$
|
|
5030
|
+
var global$4 = getGlobalObject();
|
|
5031
5031
|
var cachedFetchImpl;
|
|
5032
5032
|
/**
|
|
5033
5033
|
* A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
|
|
@@ -5073,11 +5073,11 @@ var Sentry = (function (exports) {
|
|
|
5073
5073
|
}
|
|
5074
5074
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
5075
5075
|
// Fast path to avoid DOM I/O
|
|
5076
|
-
if (isNativeFetch(global$
|
|
5077
|
-
return (cachedFetchImpl = global$
|
|
5076
|
+
if (isNativeFetch(global$4.fetch)) {
|
|
5077
|
+
return (cachedFetchImpl = global$4.fetch.bind(global$4));
|
|
5078
5078
|
}
|
|
5079
|
-
var document = global$
|
|
5080
|
-
var fetchImpl = global$
|
|
5079
|
+
var document = global$4.document;
|
|
5080
|
+
var fetchImpl = global$4.fetch;
|
|
5081
5081
|
// eslint-disable-next-line deprecation/deprecation
|
|
5082
5082
|
if (document && typeof document.createElement === "function") {
|
|
5083
5083
|
try {
|
|
@@ -5096,7 +5096,7 @@ var Sentry = (function (exports) {
|
|
|
5096
5096
|
}
|
|
5097
5097
|
}
|
|
5098
5098
|
}
|
|
5099
|
-
return (cachedFetchImpl = fetchImpl.bind(global$
|
|
5099
|
+
return (cachedFetchImpl = fetchImpl.bind(global$4));
|
|
5100
5100
|
/* eslint-enable @typescript-eslint/unbound-method */
|
|
5101
5101
|
}
|
|
5102
5102
|
/**
|
|
@@ -5106,11 +5106,11 @@ var Sentry = (function (exports) {
|
|
|
5106
5106
|
* @param body report payload
|
|
5107
5107
|
*/
|
|
5108
5108
|
function sendReport(url, body) {
|
|
5109
|
-
var isRealNavigator = Object.prototype.toString.call(global$
|
|
5110
|
-
var hasSendBeacon = isRealNavigator && typeof global$
|
|
5109
|
+
var isRealNavigator = Object.prototype.toString.call(global$4 && global$4.navigator) === '[object Navigator]';
|
|
5110
|
+
var hasSendBeacon = isRealNavigator && typeof global$4.navigator.sendBeacon === 'function';
|
|
5111
5111
|
if (hasSendBeacon) {
|
|
5112
5112
|
// Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
|
|
5113
|
-
var sendBeacon = global$
|
|
5113
|
+
var sendBeacon = global$4.navigator.sendBeacon.bind(global$4.navigator);
|
|
5114
5114
|
return sendBeacon(url, body);
|
|
5115
5115
|
}
|
|
5116
5116
|
if (supportsFetch()) {
|
|
@@ -5128,7 +5128,7 @@ var Sentry = (function (exports) {
|
|
|
5128
5128
|
var tyStr = ty;
|
|
5129
5129
|
return tyStr === 'event' ? 'error' : tyStr;
|
|
5130
5130
|
}
|
|
5131
|
-
var global$
|
|
5131
|
+
var global$3 = getGlobalObject();
|
|
5132
5132
|
/** Base Transport class implementation */
|
|
5133
5133
|
var BaseTransport = /** @class */ (function () {
|
|
5134
5134
|
function BaseTransport(options) {
|
|
@@ -5142,9 +5142,9 @@ var Sentry = (function (exports) {
|
|
|
5142
5142
|
this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);
|
|
5143
5143
|
// eslint-disable-next-line deprecation/deprecation
|
|
5144
5144
|
this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);
|
|
5145
|
-
if (this.options.sendClientReports && global$
|
|
5146
|
-
global$
|
|
5147
|
-
if (global$
|
|
5145
|
+
if (this.options.sendClientReports && global$3.document) {
|
|
5146
|
+
global$3.document.addEventListener('visibilitychange', function () {
|
|
5147
|
+
if (global$3.document.visibilityState === 'hidden') {
|
|
5148
5148
|
_this._flushOutcomes();
|
|
5149
5149
|
}
|
|
5150
5150
|
});
|
|
@@ -5446,8 +5446,6 @@ var Sentry = (function (exports) {
|
|
|
5446
5446
|
return XHRTransport;
|
|
5447
5447
|
}(BaseTransport));
|
|
5448
5448
|
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
5449
|
var index = /*#__PURE__*/Object.freeze({
|
|
5452
5450
|
__proto__: null,
|
|
5453
5451
|
BaseTransport: BaseTransport,
|
|
@@ -5497,7 +5495,7 @@ var Sentry = (function (exports) {
|
|
|
5497
5495
|
return BrowserBackend;
|
|
5498
5496
|
}(BaseBackend));
|
|
5499
5497
|
|
|
5500
|
-
var global$
|
|
5498
|
+
var global$2 = getGlobalObject();
|
|
5501
5499
|
var ignoreOnError = 0;
|
|
5502
5500
|
/**
|
|
5503
5501
|
* @hidden
|
|
@@ -5523,7 +5521,7 @@ var Sentry = (function (exports) {
|
|
|
5523
5521
|
* @returns The wrapped function.
|
|
5524
5522
|
* @hidden
|
|
5525
5523
|
*/
|
|
5526
|
-
function wrap(fn, options, before) {
|
|
5524
|
+
function wrap$1(fn, options, before) {
|
|
5527
5525
|
// for future readers what this does is wrap a function and then create
|
|
5528
5526
|
// a bi-directional wrapping between them.
|
|
5529
5527
|
//
|
|
@@ -5561,7 +5559,7 @@ var Sentry = (function (exports) {
|
|
|
5561
5559
|
before.apply(this, arguments);
|
|
5562
5560
|
}
|
|
5563
5561
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
5564
|
-
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
|
5562
|
+
var wrappedArguments = args.map(function (arg) { return wrap$1(arg, options); });
|
|
5565
5563
|
// Attempt to invoke user-land function
|
|
5566
5564
|
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
|
5567
5565
|
// means the sentry.javascript SDK caught an error invoking your application code. This
|
|
@@ -5620,7 +5618,7 @@ var Sentry = (function (exports) {
|
|
|
5620
5618
|
*/
|
|
5621
5619
|
function injectReportDialog(options) {
|
|
5622
5620
|
if (options === void 0) { options = {}; }
|
|
5623
|
-
if (!global$
|
|
5621
|
+
if (!global$2.document) {
|
|
5624
5622
|
return;
|
|
5625
5623
|
}
|
|
5626
5624
|
if (!options.eventId) {
|
|
@@ -5635,14 +5633,14 @@ var Sentry = (function (exports) {
|
|
|
5635
5633
|
}
|
|
5636
5634
|
return;
|
|
5637
5635
|
}
|
|
5638
|
-
var script = global$
|
|
5636
|
+
var script = global$2.document.createElement('script');
|
|
5639
5637
|
script.async = true;
|
|
5640
5638
|
script.src = getReportDialogEndpoint(options.dsn, options);
|
|
5641
5639
|
if (options.onLoad) {
|
|
5642
5640
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
5643
5641
|
script.onload = options.onLoad;
|
|
5644
5642
|
}
|
|
5645
|
-
var injectionPoint = global$
|
|
5643
|
+
var injectionPoint = global$2.document.head || global$2.document.body;
|
|
5646
5644
|
if (injectionPoint) {
|
|
5647
5645
|
injectionPoint.appendChild(script);
|
|
5648
5646
|
}
|
|
@@ -5932,7 +5930,7 @@ var Sentry = (function (exports) {
|
|
|
5932
5930
|
args[_i] = arguments[_i];
|
|
5933
5931
|
}
|
|
5934
5932
|
var originalCallback = args[0];
|
|
5935
|
-
args[0] = wrap(originalCallback, {
|
|
5933
|
+
args[0] = wrap$1(originalCallback, {
|
|
5936
5934
|
mechanism: {
|
|
5937
5935
|
data: { function: getFunctionName(original) },
|
|
5938
5936
|
handled: true,
|
|
@@ -5948,7 +5946,7 @@ var Sentry = (function (exports) {
|
|
|
5948
5946
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5949
5947
|
return function (callback) {
|
|
5950
5948
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
5951
|
-
return original.call(this, wrap(callback, {
|
|
5949
|
+
return original.call(this, wrap$1(callback, {
|
|
5952
5950
|
mechanism: {
|
|
5953
5951
|
data: {
|
|
5954
5952
|
function: 'requestAnimationFrame',
|
|
@@ -5991,7 +5989,7 @@ var Sentry = (function (exports) {
|
|
|
5991
5989
|
wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);
|
|
5992
5990
|
}
|
|
5993
5991
|
// Otherwise wrap directly
|
|
5994
|
-
return wrap(original, wrapOptions);
|
|
5992
|
+
return wrap$1(original, wrapOptions);
|
|
5995
5993
|
});
|
|
5996
5994
|
}
|
|
5997
5995
|
});
|
|
@@ -6012,7 +6010,7 @@ var Sentry = (function (exports) {
|
|
|
6012
6010
|
return function (eventName, fn, options) {
|
|
6013
6011
|
try {
|
|
6014
6012
|
if (typeof fn.handleEvent === 'function') {
|
|
6015
|
-
fn.handleEvent = wrap(fn.handleEvent.bind(fn), {
|
|
6013
|
+
fn.handleEvent = wrap$1(fn.handleEvent.bind(fn), {
|
|
6016
6014
|
mechanism: {
|
|
6017
6015
|
data: {
|
|
6018
6016
|
function: 'handleEvent',
|
|
@@ -6030,7 +6028,7 @@ var Sentry = (function (exports) {
|
|
|
6030
6028
|
}
|
|
6031
6029
|
return original.call(this, eventName,
|
|
6032
6030
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6033
|
-
wrap(fn, {
|
|
6031
|
+
wrap$1(fn, {
|
|
6034
6032
|
mechanism: {
|
|
6035
6033
|
data: {
|
|
6036
6034
|
function: 'addEventListener',
|
|
@@ -6351,7 +6349,7 @@ var Sentry = (function (exports) {
|
|
|
6351
6349
|
return _walkErrorTree(limit, error[key], key, __spread([exception], stack));
|
|
6352
6350
|
}
|
|
6353
6351
|
|
|
6354
|
-
var global$
|
|
6352
|
+
var global$1 = getGlobalObject();
|
|
6355
6353
|
/** UserAgent */
|
|
6356
6354
|
var UserAgent = /** @class */ (function () {
|
|
6357
6355
|
function UserAgent() {
|
|
@@ -6367,13 +6365,13 @@ var Sentry = (function (exports) {
|
|
|
6367
6365
|
addGlobalEventProcessor(function (event) {
|
|
6368
6366
|
if (getCurrentHub().getIntegration(UserAgent)) {
|
|
6369
6367
|
// if none of the information we want exists, don't bother
|
|
6370
|
-
if (!global$
|
|
6368
|
+
if (!global$1.navigator && !global$1.location && !global$1.document) {
|
|
6371
6369
|
return event;
|
|
6372
6370
|
}
|
|
6373
6371
|
// grab as much info as exists and add it to the event
|
|
6374
|
-
var url = (event.request && event.request.url) || (global$
|
|
6375
|
-
var referrer = (global$
|
|
6376
|
-
var userAgent = (global$
|
|
6372
|
+
var url = (event.request && event.request.url) || (global$1.location && global$1.location.href);
|
|
6373
|
+
var referrer = (global$1.document || {}).referrer;
|
|
6374
|
+
var userAgent = (global$1.navigator || {}).userAgent;
|
|
6377
6375
|
var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));
|
|
6378
6376
|
var request = __assign(__assign({}, (url && { url: url })), { headers: headers });
|
|
6379
6377
|
return __assign(__assign({}, event), { request: request });
|
|
@@ -6553,8 +6551,6 @@ var Sentry = (function (exports) {
|
|
|
6553
6551
|
return undefined;
|
|
6554
6552
|
}
|
|
6555
6553
|
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
6554
|
var BrowserIntegrations = /*#__PURE__*/Object.freeze({
|
|
6559
6555
|
__proto__: null,
|
|
6560
6556
|
GlobalHandlers: GlobalHandlers,
|
|
@@ -6809,8 +6805,8 @@ var Sentry = (function (exports) {
|
|
|
6809
6805
|
* @returns The result of wrapped function call.
|
|
6810
6806
|
*/
|
|
6811
6807
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6812
|
-
function wrap
|
|
6813
|
-
return wrap(fn)();
|
|
6808
|
+
function wrap(fn) {
|
|
6809
|
+
return wrap$1(fn)();
|
|
6814
6810
|
}
|
|
6815
6811
|
function startSessionOnHub(hub) {
|
|
6816
6812
|
hub.startSession({ ignoreDuration: true });
|
|
@@ -6900,9 +6896,9 @@ var Sentry = (function (exports) {
|
|
|
6900
6896
|
exports.showReportDialog = showReportDialog;
|
|
6901
6897
|
exports.startTransaction = startTransaction;
|
|
6902
6898
|
exports.withScope = withScope;
|
|
6903
|
-
exports.wrap = wrap
|
|
6899
|
+
exports.wrap = wrap;
|
|
6904
6900
|
|
|
6905
6901
|
return exports;
|
|
6906
6902
|
|
|
6907
|
-
}({})
|
|
6903
|
+
})({});
|
|
6908
6904
|
//# sourceMappingURL=bundle.js.map
|