fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

6
node_modules/@sentry/utils/esm/async.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/**
* Consumes the promise and logs the error when it rejects.
* @param promise A promise to forget.
*/
export declare function forget(promise: PromiseLike<any>): void;
//# sourceMappingURL=async.d.ts.map

1
node_modules/@sentry/utils/esm/async.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAMtD"}

13
node_modules/@sentry/utils/esm/async.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* Consumes the promise and logs the error when it rejects.
* @param promise A promise to forget.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function forget(promise) {
void promise.then(null, function (e) {
// TODO: Use a better logging mechanism
// eslint-disable-next-line no-console
console.error(e);
});
}
//# sourceMappingURL=async.js.map

1
node_modules/@sentry/utils/esm/async.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,8DAA8D;AAC9D,MAAM,UAAU,MAAM,CAAC,OAAyB;IAC9C,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,UAAA,CAAC;QACvB,uCAAuC;QACvC,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise: PromiseLike<any>): void {\n void promise.then(null, e => {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n"]}

12
node_modules/@sentry/utils/esm/browser.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/**
* Given a child DOM element, returns a query-selector statement describing that
* and its ancestors
* e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
* @returns generated DOM path
*/
export declare function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string;
/**
* A safe form of location.href
*/
export declare function getLocationHref(): string;
//# sourceMappingURL=browser.d.ts.map

1
node_modules/@sentry/utils/esm/browser.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAyC3E;AA+DD;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAOxC"}

105
node_modules/@sentry/utils/esm/browser.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
import { getGlobalObject } from './global';
import { isString } from './is';
/**
* Given a child DOM element, returns a query-selector statement describing that
* and its ancestors
* e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
* @returns generated DOM path
*/
export function htmlTreeAsString(elem, keyAttrs) {
// try/catch both:
// - accessing event.target (see getsentry/raven-js#838, #768)
// - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
// - can throw an exception in some circumstances.
try {
var currentElem = elem;
var MAX_TRAVERSE_HEIGHT = 5;
var MAX_OUTPUT_LEN = 80;
var out = [];
var height = 0;
var len = 0;
var separator = ' > ';
var sepLength = separator.length;
var nextStr = void 0;
// eslint-disable-next-line no-plusplus
while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
nextStr = _htmlElementAsString(currentElem, keyAttrs);
// bail out if
// - nextStr is the 'html' element
// - the length of the string that would be created exceeds MAX_OUTPUT_LEN
// (ignore this limit if we are on the first iteration)
if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
break;
}
out.push(nextStr);
len += nextStr.length;
currentElem = currentElem.parentNode;
}
return out.reverse().join(separator);
}
catch (_oO) {
return '<unknown>';
}
}
/**
* Returns a simple, query-selector representation of a DOM element
* e.g. [HTMLElement] => input#foo.btn[name=baz]
* @returns generated DOM path
*/
function _htmlElementAsString(el, keyAttrs) {
var elem = el;
var out = [];
var className;
var classes;
var key;
var attr;
var i;
if (!elem || !elem.tagName) {
return '';
}
out.push(elem.tagName.toLowerCase());
// Pairs of attribute keys defined in `serializeAttribute` and their values on element.
var keyAttrPairs = keyAttrs && keyAttrs.length
? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })
: null;
if (keyAttrPairs && keyAttrPairs.length) {
keyAttrPairs.forEach(function (keyAttrPair) {
out.push("[" + keyAttrPair[0] + "=\"" + keyAttrPair[1] + "\"]");
});
}
else {
if (elem.id) {
out.push("#" + elem.id);
}
// eslint-disable-next-line prefer-const
className = elem.className;
if (className && isString(className)) {
classes = className.split(/\s+/);
for (i = 0; i < classes.length; i++) {
out.push("." + classes[i]);
}
}
}
var allowedAttrs = ['type', 'name', 'title', 'alt'];
for (i = 0; i < allowedAttrs.length; i++) {
key = allowedAttrs[i];
attr = elem.getAttribute(key);
if (attr) {
out.push("[" + key + "=\"" + attr + "\"]");
}
}
return out.join('');
}
/**
* A safe form of location.href
*/
export function getLocationHref() {
var global = getGlobalObject();
try {
return global.document.location.href;
}
catch (oO) {
return '';
}
}
//# sourceMappingURL=browser.js.map

1
node_modules/@sentry/utils/esm/browser.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

8
node_modules/@sentry/utils/esm/clientreport.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { ClientReport, ClientReportEnvelope } from '@sentry/types';
/**
* Creates client report envelope
* @param discarded_events An array of discard events
* @param dsn A DSN that can be set on the header. Optional.
*/
export declare function createClientReportEnvelope(discarded_events: ClientReport['discarded_events'], dsn?: string, timestamp?: number): ClientReportEnvelope;
//# sourceMappingURL=clientreport.d.ts.map

1
node_modules/@sentry/utils/esm/clientreport.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"clientreport.d.ts","sourceRoot":"","sources":["../../src/clientreport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AAKrF;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,YAAY,CAAC,kBAAkB,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,oBAAoB,CAStB"}

18
node_modules/@sentry/utils/esm/clientreport.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { createEnvelope } from './envelope';
import { dateTimestampInSeconds } from './time';
/**
* Creates client report envelope
* @param discarded_events An array of discard events
* @param dsn A DSN that can be set on the header. Optional.
*/
export function createClientReportEnvelope(discarded_events, dsn, timestamp) {
var clientReportItem = [
{ type: 'client_report' },
{
timestamp: timestamp || dateTimestampInSeconds(),
discarded_events: discarded_events,
},
];
return createEnvelope(dsn ? { dsn: dsn } : {}, [clientReportItem]);
}
//# sourceMappingURL=clientreport.js.map

1
node_modules/@sentry/utils/esm/clientreport.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"clientreport.js","sourceRoot":"","sources":["../../src/clientreport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACxC,gBAAkD,EAClD,GAAY,EACZ,SAAkB;IAElB,IAAM,gBAAgB,GAAqB;QACzC,EAAE,IAAI,EAAE,eAAe,EAAE;QACzB;YACE,SAAS,EAAE,SAAS,IAAI,sBAAsB,EAAE;YAChD,gBAAgB,kBAAA;SACjB;KACF,CAAC;IACF,OAAO,cAAc,CAAuB,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACtF,CAAC","sourcesContent":["import { ClientReport, ClientReportEnvelope, ClientReportItem } from '@sentry/types';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope<ClientReportEnvelope>(dsn ? { dsn } : {}, [clientReportItem]);\n}\n"]}

14
node_modules/@sentry/utils/esm/dsn.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { DsnComponents, DsnLike } from '@sentry/types';
/**
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
*/
export declare function dsnToString(dsn: DsnComponents, withPassword?: boolean): string;
/** The Sentry Dsn, identifying a Sentry instance and project. */
export declare function makeDsn(from: DsnLike): DsnComponents;
//# sourceMappingURL=dsn.d.ts.map

1
node_modules/@sentry/utils/esm/dsn.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../../src/dsn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAe,MAAM,eAAe,CAAC;AAYpE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,GAAE,OAAe,GAAG,MAAM,CAMrF;AA4ED,iEAAiE;AACjE,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAMpD"}

89
node_modules/@sentry/utils/esm/dsn.js generated vendored Normal file
View File

@@ -0,0 +1,89 @@
import { __read } from "tslib";
import { SentryError } from './error';
import { IS_DEBUG_BUILD } from './flags';
/** Regular expression used to parse a Dsn. */
var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
function isValidProtocol(protocol) {
return protocol === 'http' || protocol === 'https';
}
/**
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
*/
export function dsnToString(dsn, withPassword) {
if (withPassword === void 0) { withPassword = false; }
var host = dsn.host, path = dsn.path, pass = dsn.pass, port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol, publicKey = dsn.publicKey;
return (protocol + "://" + publicKey + (withPassword && pass ? ":" + pass : '') +
("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId));
}
function dsnFromString(str) {
var match = DSN_REGEX.exec(str);
if (!match) {
throw new SentryError("Invalid Sentry Dsn: " + str);
}
var _a = __read(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];
var path = '';
var projectId = lastPath;
var split = projectId.split('/');
if (split.length > 1) {
path = split.slice(0, -1).join('/');
projectId = split.pop();
}
if (projectId) {
var projectMatch = projectId.match(/^\d+/);
if (projectMatch) {
projectId = projectMatch[0];
}
}
return dsnFromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });
}
function dsnFromComponents(components) {
// TODO this is for backwards compatibility, and can be removed in a future version
if ('user' in components && !('publicKey' in components)) {
components.publicKey = components.user;
}
return {
user: components.publicKey || '',
protocol: components.protocol,
publicKey: components.publicKey || '',
pass: components.pass || '',
host: components.host,
port: components.port || '',
path: components.path || '',
projectId: components.projectId,
};
}
function validateDsn(dsn) {
if (!IS_DEBUG_BUILD) {
return;
}
var port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol;
var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
requiredComponents.forEach(function (component) {
if (!dsn[component]) {
throw new SentryError("Invalid Sentry Dsn: " + component + " missing");
}
});
if (!projectId.match(/^\d+$/)) {
throw new SentryError("Invalid Sentry Dsn: Invalid projectId " + projectId);
}
if (!isValidProtocol(protocol)) {
throw new SentryError("Invalid Sentry Dsn: Invalid protocol " + protocol);
}
if (port && isNaN(parseInt(port, 10))) {
throw new SentryError("Invalid Sentry Dsn: Invalid port " + port);
}
return true;
}
/** The Sentry Dsn, identifying a Sentry instance and project. */
export function makeDsn(from) {
var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
validateDsn(components);
return components;
}
//# sourceMappingURL=dsn.js.map

1
node_modules/@sentry/utils/esm/dsn.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

3
node_modules/@sentry/utils/esm/enums.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare const SeverityLevels: readonly ["fatal", "error", "warning", "log", "info", "debug", "critical"];
export declare type SeverityLevel = typeof SeverityLevels[number];
//# sourceMappingURL=enums.d.ts.map

1
node_modules/@sentry/utils/esm/enums.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,4EAA6E,CAAC;AACzG,oBAAY,aAAa,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC"}

2
node_modules/@sentry/utils/esm/enums.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
//# sourceMappingURL=enums.js.map

1
node_modules/@sentry/utils/esm/enums.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC","sourcesContent":["export const SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'] as const;\nexport type SeverityLevel = typeof SeverityLevels[number];\n"]}

7
node_modules/@sentry/utils/esm/env.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
/**
* Figures out if we're building a browser bundle.
*
* @returns true if this is a browser bundle build.
*/
export declare function isBrowserBundle(): boolean;
//# sourceMappingURL=env.d.ts.map

1
node_modules/@sentry/utils/esm/env.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC"}

23
node_modules/@sentry/utils/esm/env.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/*
* This module exists for optimizations in the build process through rollup and terser. We define some global
* constants, which can be overridden during build. By guarding certain pieces of code with functions that return these
* constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will
* never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to
* `logger` and preventing node-related code from appearing in browser bundles.
*
* Attention:
* This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by
* users. These fags should live in their respective packages, as we identified user tooling (specifically webpack)
* having issues tree-shaking these constants across package boundaries.
* An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want
* users to be able to shake away expressions that it guards.
*/
/**
* Figures out if we're building a browser bundle.
*
* @returns true if this is a browser bundle build.
*/
export function isBrowserBundle() {
return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
}
//# sourceMappingURL=env.js.map

1
node_modules/@sentry/utils/esm/env.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,OAAO,yBAAyB,KAAK,WAAW,IAAI,CAAC,CAAC,yBAAyB,CAAC;AACzF,CAAC","sourcesContent":["/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These fags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n"]}

22
node_modules/@sentry/utils/esm/envelope.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
import { Envelope } from '@sentry/types';
/**
* Creates an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
export declare function createEnvelope<E extends Envelope>(headers: E[0], items?: E[1]): E;
/**
* Add an item to an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
export declare function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E;
/**
* Get the type of the envelope. Grabs the type from the first envelope item.
*/
export declare function getEnvelopeType<E extends Envelope>(envelope: E): string;
/**
* Serializes an envelope into a string.
*/
export declare function serializeEnvelope(envelope: Envelope): string;
//# sourceMappingURL=envelope.d.ts.map

1
node_modules/@sentry/utils/esm/envelope.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAE,CAAC,CAAC,CAAC,CAAM,GAAG,CAAC,CAErF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAG3F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,CAGvE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAe5D"}

46
node_modules/@sentry/utils/esm/envelope.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
import { __read, __spread } from "tslib";
import { isPrimitive } from './is';
/**
* Creates an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
export function createEnvelope(headers, items) {
if (items === void 0) { items = []; }
return [headers, items];
}
/**
* Add an item to an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
export function addItemToEnvelope(envelope, newItem) {
var _a = __read(envelope, 2), headers = _a[0], items = _a[1];
return [headers, __spread(items, [newItem])];
}
/**
* Get the type of the envelope. Grabs the type from the first envelope item.
*/
export function getEnvelopeType(envelope) {
var _a = __read(envelope, 2), _b = __read(_a[1], 1), _c = __read(_b[0], 1), firstItemHeader = _c[0];
return firstItemHeader.type;
}
/**
* Serializes an envelope into a string.
*/
export function serializeEnvelope(envelope) {
var _a = __read(envelope, 2), headers = _a[0], items = _a[1];
var serializedHeaders = JSON.stringify(headers);
// Have to cast items to any here since Envelope is a union type
// Fixed in Typescript 4.2
// TODO: Remove any[] cast when we upgrade to TS 4.2
// https://github.com/microsoft/TypeScript/issues/36390
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return items.reduce(function (acc, item) {
var _a = __read(item, 2), itemHeaders = _a[0], payload = _a[1];
// We do not serialize payloads that are primitives
var serializedPayload = isPrimitive(payload) ? String(payload) : JSON.stringify(payload);
return acc + "\n" + JSON.stringify(itemHeaders) + "\n" + serializedPayload;
}, serializedHeaders);
}
//# sourceMappingURL=envelope.js.map

1
node_modules/@sentry/utils/esm/envelope.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../src/envelope.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAqB,OAAa,EAAE,KAAgB;IAAhB,sBAAA,EAAA,UAAgB;IAChF,OAAO,CAAC,OAAO,EAAE,KAAK,CAAM,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAqB,QAAW,EAAE,OAAqB;IAChF,IAAA,wBAA2B,EAA1B,eAAO,EAAE,aAAiB,CAAC;IAClC,OAAO,CAAC,OAAO,WAAM,KAAK,GAAE,OAAO,GAAO,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAqB,QAAW;IACvD,IAAA,wBAAkC,EAA/B,qBAAmB,EAAlB,qBAAiB,EAAhB,uBAA6B,CAAC;IACzC,OAAO,eAAe,CAAC,IAAI,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAkB;IAC5C,IAAA,wBAA2B,EAA1B,eAAO,EAAE,aAAiB,CAAC;IAClC,IAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAElD,gEAAgE;IAChE,0BAA0B;IAC1B,oDAAoD;IACpD,uDAAuD;IACvD,8DAA8D;IAC9D,OAAQ,KAAe,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAA0B;QACvD,IAAA,oBAA6B,EAA5B,mBAAW,EAAE,eAAe,CAAC;QACpC,mDAAmD;QACnD,IAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC3F,OAAU,GAAG,UAAK,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAK,iBAAmB,CAAC;IACxE,CAAC,EAAE,iBAAiB,CAAC,CAAC;AACxB,CAAC","sourcesContent":["import { Envelope } from '@sentry/types';\n\nimport { isPrimitive } from './is';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope<E extends Envelope>(headers: E[0], items: E[1] = []): E {\n return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] as E;\n}\n\n/**\n * Get the type of the envelope. Grabs the type from the first envelope item.\n */\nexport function getEnvelopeType<E extends Envelope>(envelope: E): string {\n const [, [[firstItemHeader]]] = envelope;\n return firstItemHeader.type;\n}\n\n/**\n * Serializes an envelope into a string.\n */\nexport function serializeEnvelope(envelope: Envelope): string {\n const [headers, items] = envelope;\n const serializedHeaders = JSON.stringify(headers);\n\n // Have to cast items to any here since Envelope is a union type\n // Fixed in Typescript 4.2\n // TODO: Remove any[] cast when we upgrade to TS 4.2\n // https://github.com/microsoft/TypeScript/issues/36390\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (items as any[]).reduce((acc, item: typeof items[number]) => {\n const [itemHeaders, payload] = item;\n // We do not serialize payloads that are primitives\n const serializedPayload = isPrimitive(payload) ? String(payload) : JSON.stringify(payload);\n return `${acc}\\n${JSON.stringify(itemHeaders)}\\n${serializedPayload}`;\n }, serializedHeaders);\n}\n"]}

8
node_modules/@sentry/utils/esm/error.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
/** An error emitted by Sentry SDKs and related utilities. */
export declare class SentryError extends Error {
message: string;
/** Display name of this error instance. */
name: string;
constructor(message: string);
}
//# sourceMappingURL=error.d.ts.map

1
node_modules/@sentry/utils/esm/error.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAEA,6DAA6D;AAC7D,qBAAa,WAAY,SAAQ,KAAK;IAIV,OAAO,EAAE,MAAM;IAHzC,2CAA2C;IACpC,IAAI,EAAE,MAAM,CAAC;gBAEM,OAAO,EAAE,MAAM;CAM1C"}

17
node_modules/@sentry/utils/esm/error.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import { __extends } from "tslib";
import { setPrototypeOf } from './polyfill';
/** An error emitted by Sentry SDKs and related utilities. */
var SentryError = /** @class */ (function (_super) {
__extends(SentryError, _super);
function SentryError(message) {
var _newTarget = this.constructor;
var _this = _super.call(this, message) || this;
_this.message = message;
_this.name = _newTarget.prototype.constructor.name;
setPrototypeOf(_this, _newTarget.prototype);
return _this;
}
return SentryError;
}(Error));
export { SentryError };
//# sourceMappingURL=error.js.map

1
node_modules/@sentry/utils/esm/error.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,6DAA6D;AAC7D;IAAiC,+BAAK;IAIpC,qBAA0B,OAAe;;QAAzC,YACE,kBAAM,OAAO,CAAC,SAIf;QALyB,aAAO,GAAP,OAAO,CAAQ;QAGvC,KAAI,CAAC,IAAI,GAAG,WAAW,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;QAClD,cAAc,CAAC,KAAI,EAAE,WAAW,SAAS,CAAC,CAAC;;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAVD,CAAiC,KAAK,GAUrC","sourcesContent":["import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n"]}

3
node_modules/@sentry/utils/esm/flags.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
/** Flag that is true for debug builds, false otherwise. */
export declare const IS_DEBUG_BUILD: boolean;
//# sourceMappingURL=flags.d.ts.map

1
node_modules/@sentry/utils/esm/flags.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../src/flags.ts"],"names":[],"mappings":"AAgBA,2DAA2D;AAC3D,eAAO,MAAM,cAAc,SAAoE,CAAC"}

16
node_modules/@sentry/utils/esm/flags.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/*
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
* for users.
*
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
* because some build tools have trouble tree-shaking imported guards.
*
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
*
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
* replaced.
*/
/** Flag that is true for debug builds, false otherwise. */
export var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
//# sourceMappingURL=flags.js.map

1
node_modules/@sentry/utils/esm/flags.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,2DAA2D;AAC3D,MAAM,CAAC,IAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC","sourcesContent":["/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n\ndeclare const __SENTRY_DEBUG__: boolean;\n\n/** Flag that is true for debug builds, false otherwise. */\nexport const IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n"]}

41
node_modules/@sentry/utils/esm/global.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
*/
import { Integration } from '@sentry/types';
/** Internal */
interface SentryGlobal {
Sentry?: {
Integrations?: Integration[];
};
SENTRY_ENVIRONMENT?: string;
SENTRY_DSN?: string;
SENTRY_RELEASE?: {
id?: string;
};
__SENTRY__: {
globalEventProcessors: any;
hub: any;
logger: any;
};
}
/**
* Safely get global scope object
*
* @returns Global scope object
*/
export declare function getGlobalObject<T>(): T & SentryGlobal;
/**
* Returns a global singleton contained in the global `__SENTRY__` object.
*
* If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory
* function and added to the `__SENTRY__` object.
*
* @param name name of the global singleton on __SENTRY__
* @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`
* @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value
* @returns the singleton
*/
export declare function getGlobalSingleton<T>(name: keyof SentryGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T;
export {};
//# sourceMappingURL=global.d.ts.map

1
node_modules/@sentry/utils/esm/global.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,eAAe;AACf,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;KAC9B,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,EAAE,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACV,qBAAqB,EAAE,GAAG,CAAC;QAC3B,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,GAAG,CAAC;KACb,CAAC;CACH;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,YAAY,CAUrD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,CAKhH"}

38
node_modules/@sentry/utils/esm/global.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
*/
import { isNodeEnv } from './node';
var fallbackGlobalObject = {};
/**
* Safely get global scope object
*
* @returns Global scope object
*/
export function getGlobalObject() {
return (isNodeEnv()
? global
: typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
? window // eslint-disable-line no-restricted-globals
: typeof self !== 'undefined'
? self
: fallbackGlobalObject);
}
/**
* Returns a global singleton contained in the global `__SENTRY__` object.
*
* If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory
* function and added to the `__SENTRY__` object.
*
* @param name name of the global singleton on __SENTRY__
* @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`
* @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value
* @returns the singleton
*/
export function getGlobalSingleton(name, creator, obj) {
var global = (obj || getGlobalObject());
var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});
var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
return singleton;
}
//# sourceMappingURL=global.js.map

1
node_modules/@sentry/utils/esm/global.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAmBnC,IAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CACL,SAAS,EAAE;QACT,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,4CAA4C;YAC5E,CAAC,CAAC,MAAM,CAAC,4CAA4C;YACrD,CAAC,CAAC,OAAO,IAAI,KAAK,WAAW;gBAC7B,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,oBAAoB,CACL,CAAC;AACxB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAI,IAAsC,EAAE,OAAgB,EAAE,GAAa;IAC3G,IAAM,MAAM,GAAG,CAAC,GAAG,IAAI,eAAe,EAAE,CAAiB,CAAC;IAC1D,IAAM,UAAU,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IACjE,IAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { Integration } from '@sentry/types';\n\nimport { isNodeEnv } from './node';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject<T>(): T & SentryGlobal {\n return (\n isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject\n ) as T & SentryGlobal;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton<T>(name: keyof SentryGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T {\n const global = (obj || getGlobalObject()) as SentryGlobal;\n const __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n"]}

29
node_modules/@sentry/utils/esm/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,29 @@
export * from './async';
export * from './browser';
export * from './dsn';
export * from './enums';
export * from './error';
export * from './global';
export * from './instrument';
export * from './is';
export * from './logger';
export * from './memo';
export * from './misc';
export * from './node';
export * from './normalize';
export * from './object';
export * from './path';
export * from './promisebuffer';
export * from './severity';
export * from './stacktrace';
export * from './status';
export * from './string';
export * from './supports';
export * from './syncpromise';
export * from './time';
export * from './tracing';
export * from './env';
export * from './envelope';
export * from './clientreport';
export * from './ratelimit';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@sentry/utils/esm/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}

29
node_modules/@sentry/utils/esm/index.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
export * from './async';
export * from './browser';
export * from './dsn';
export * from './enums';
export * from './error';
export * from './global';
export * from './instrument';
export * from './is';
export * from './logger';
export * from './memo';
export * from './misc';
export * from './node';
export * from './normalize';
export * from './object';
export * from './path';
export * from './promisebuffer';
export * from './severity';
export * from './stacktrace';
export * from './status';
export * from './string';
export * from './supports';
export * from './syncpromise';
export * from './time';
export * from './tracing';
export * from './env';
export * from './envelope';
export * from './clientreport';
export * from './ratelimit';
//# sourceMappingURL=index.js.map

1
node_modules/@sentry/utils/esm/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC","sourcesContent":["export * from './async';\nexport * from './browser';\nexport * from './dsn';\nexport * from './enums';\nexport * from './error';\nexport * from './global';\nexport * from './instrument';\nexport * from './is';\nexport * from './logger';\nexport * from './memo';\nexport * from './misc';\nexport * from './node';\nexport * from './normalize';\nexport * from './object';\nexport * from './path';\nexport * from './promisebuffer';\nexport * from './severity';\nexport * from './stacktrace';\nexport * from './status';\nexport * from './string';\nexport * from './supports';\nexport * from './syncpromise';\nexport * from './time';\nexport * from './tracing';\nexport * from './env';\nexport * from './envelope';\nexport * from './clientreport';\nexport * from './ratelimit';\n"]}

10
node_modules/@sentry/utils/esm/instrument.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
declare type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'history' | 'sentry' | 'xhr' | 'error' | 'unhandledrejection';
declare type InstrumentHandlerCallback = (data: any) => void;
/**
* Add handler that will be called when given type of instrumentation triggers.
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void;
export {};
//# sourceMappingURL=instrument.d.ts.map

1
node_modules/@sentry/utils/esm/instrument.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../src/instrument.ts"],"names":[],"mappings":"AAeA,aAAK,qBAAqB,GACtB,SAAS,GACT,KAAK,GACL,OAAO,GACP,SAAS,GACT,QAAQ,GACR,KAAK,GACL,OAAO,GACP,oBAAoB,CAAC;AACzB,aAAK,yBAAyB,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAoDrD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,qBAAqB,EAAE,QAAQ,EAAE,yBAAyB,GAAG,IAAI,CAIhH"}

524
node_modules/@sentry/utils/esm/instrument.js generated vendored Normal file
View File

@@ -0,0 +1,524 @@
import { __assign, __values } from "tslib";
import { IS_DEBUG_BUILD } from './flags';
import { getGlobalObject } from './global';
import { isInstanceOf, isString } from './is';
import { CONSOLE_LEVELS, logger } from './logger';
import { fill } from './object';
import { getFunctionName } from './stacktrace';
import { supportsHistory, supportsNativeFetch } from './supports';
var global = getGlobalObject();
/**
* Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
* - Console API
* - Fetch API
* - XHR API
* - History API
* - DOM API (click/typing)
* - Error API
* - UnhandledRejection API
*/
var handlers = {};
var instrumented = {};
/** Instruments given API */
function instrument(type) {
if (instrumented[type]) {
return;
}
instrumented[type] = true;
switch (type) {
case 'console':
instrumentConsole();
break;
case 'dom':
instrumentDOM();
break;
case 'xhr':
instrumentXHR();
break;
case 'fetch':
instrumentFetch();
break;
case 'history':
instrumentHistory();
break;
case 'error':
instrumentError();
break;
case 'unhandledrejection':
instrumentUnhandledRejection();
break;
default:
IS_DEBUG_BUILD && logger.warn('unknown instrumentation type:', type);
return;
}
}
/**
* Add handler that will be called when given type of instrumentation triggers.
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export function addInstrumentationHandler(type, callback) {
handlers[type] = handlers[type] || [];
handlers[type].push(callback);
instrument(type);
}
/** JSDoc */
function triggerHandlers(type, data) {
var e_1, _a;
if (!type || !handlers[type]) {
return;
}
try {
for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {
var handler = _c.value;
try {
handler(data);
}
catch (e) {
IS_DEBUG_BUILD &&
logger.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + getFunctionName(handler) + "\nError:", e);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
/** JSDoc */
function instrumentConsole() {
if (!('console' in global)) {
return;
}
CONSOLE_LEVELS.forEach(function (level) {
if (!(level in global.console)) {
return;
}
fill(global.console, level, function (originalConsoleMethod) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
triggerHandlers('console', { args: args, level: level });
// this fails for some browsers. :(
if (originalConsoleMethod) {
originalConsoleMethod.apply(global.console, args);
}
};
});
});
}
/** JSDoc */
function instrumentFetch() {
if (!supportsNativeFetch()) {
return;
}
fill(global, 'fetch', function (originalFetch) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var handlerData = {
args: args,
fetchData: {
method: getFetchMethod(args),
url: getFetchUrl(args),
},
startTimestamp: Date.now(),
};
triggerHandlers('fetch', __assign({}, handlerData));
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return originalFetch.apply(global, args).then(function (response) {
triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));
return response;
}, function (error) {
triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), error: error }));
// NOTE: If you are a Sentry user, and you are seeing this stack frame,
// it means the sentry.javascript SDK caught an error invoking your application code.
// This is expected behavior and NOT indicative of a bug with sentry.javascript.
throw error;
});
};
});
}
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/** Extract `method` from fetch call arguments */
function getFetchMethod(fetchArgs) {
if (fetchArgs === void 0) { fetchArgs = []; }
if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {
return String(fetchArgs[0].method).toUpperCase();
}
if (fetchArgs[1] && fetchArgs[1].method) {
return String(fetchArgs[1].method).toUpperCase();
}
return 'GET';
}
/** Extract `url` from fetch call arguments */
function getFetchUrl(fetchArgs) {
if (fetchArgs === void 0) { fetchArgs = []; }
if (typeof fetchArgs[0] === 'string') {
return fetchArgs[0];
}
if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {
return fetchArgs[0].url;
}
return String(fetchArgs[0]);
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
/** JSDoc */
function instrumentXHR() {
if (!('XMLHttpRequest' in global)) {
return;
}
var xhrproto = XMLHttpRequest.prototype;
fill(xhrproto, 'open', function (originalOpen) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
// eslint-disable-next-line @typescript-eslint/no-this-alias
var xhr = this;
var url = args[1];
var xhrInfo = (xhr.__sentry_xhr__ = {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
method: isString(args[0]) ? args[0].toUpperCase() : args[0],
url: args[1],
});
// if Sentry key appears in URL, don't capture it as a request
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {
xhr.__sentry_own_request__ = true;
}
var onreadystatechangeHandler = function () {
if (xhr.readyState === 4) {
try {
// touching statusCode in some platforms throws
// an exception
xhrInfo.status_code = xhr.status;
}
catch (e) {
/* do nothing */
}
triggerHandlers('xhr', {
args: args,
endTimestamp: Date.now(),
startTimestamp: Date.now(),
xhr: xhr,
});
}
};
if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
fill(xhr, 'onreadystatechange', function (original) {
return function () {
var readyStateArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
readyStateArgs[_i] = arguments[_i];
}
onreadystatechangeHandler();
return original.apply(xhr, readyStateArgs);
};
});
}
else {
xhr.addEventListener('readystatechange', onreadystatechangeHandler);
}
return originalOpen.apply(xhr, args);
};
});
fill(xhrproto, 'send', function (originalSend) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.__sentry_xhr__ && args[0] !== undefined) {
this.__sentry_xhr__.body = args[0];
}
triggerHandlers('xhr', {
args: args,
startTimestamp: Date.now(),
xhr: this,
});
return originalSend.apply(this, args);
};
});
}
var lastHref;
/** JSDoc */
function instrumentHistory() {
if (!supportsHistory()) {
return;
}
var oldOnPopState = global.onpopstate;
global.onpopstate = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var to = global.location.href;
// keep track of the current URL state, as we always receive only the updated state
var from = lastHref;
lastHref = to;
triggerHandlers('history', {
from: from,
to: to,
});
if (oldOnPopState) {
// Apparently this can throw in Firefox when incorrectly implemented plugin is installed.
// https://github.com/getsentry/sentry-javascript/issues/3344
// https://github.com/bugsnag/bugsnag-js/issues/469
try {
return oldOnPopState.apply(this, args);
}
catch (_oO) {
// no-empty
}
}
};
/** @hidden */
function historyReplacementFunction(originalHistoryFunction) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var url = args.length > 2 ? args[2] : undefined;
if (url) {
// coerce to string (this is what pushState does)
var from = lastHref;
var to = String(url);
// keep track of the current URL state, as we always receive only the updated state
lastHref = to;
triggerHandlers('history', {
from: from,
to: to,
});
}
return originalHistoryFunction.apply(this, args);
};
}
fill(global.history, 'pushState', historyReplacementFunction);
fill(global.history, 'replaceState', historyReplacementFunction);
}
var debounceDuration = 1000;
var debounceTimerID;
var lastCapturedEvent;
/**
* Decide whether the current event should finish the debounce of previously captured one.
* @param previous previously captured event
* @param current event to be captured
*/
function shouldShortcircuitPreviousDebounce(previous, current) {
// If there was no previous event, it should always be swapped for the new one.
if (!previous) {
return true;
}
// If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.
if (previous.type !== current.type) {
return true;
}
try {
// If both events have the same type, it's still possible that actions were performed on different targets.
// e.g. 2 clicks on different buttons.
if (previous.target !== current.target) {
return true;
}
}
catch (e) {
// just accessing `target` property can throw an exception in some rare circumstances
// see: https://github.com/getsentry/sentry-javascript/issues/838
}
// If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_
// to which an event listener was attached), we treat them as the same action, as we want to capture
// only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.
return false;
}
/**
* Decide whether an event should be captured.
* @param event event to be captured
*/
function shouldSkipDOMEvent(event) {
// We are only interested in filtering `keypress` events for now.
if (event.type !== 'keypress') {
return false;
}
try {
var target = event.target;
if (!target || !target.tagName) {
return true;
}
// Only consider keypress events on actual input elements. This will disregard keypresses targeting body
// e.g.tabbing through elements, hotkeys, etc.
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
return false;
}
}
catch (e) {
// just accessing `target` property can throw an exception in some rare circumstances
// see: https://github.com/getsentry/sentry-javascript/issues/838
}
return true;
}
/**
* Wraps addEventListener to capture UI breadcrumbs
* @param handler function that will be triggered
* @param globalListener indicates whether event was captured by the global event listener
* @returns wrapped breadcrumb events handler
* @hidden
*/
function makeDOMEventHandler(handler, globalListener) {
if (globalListener === void 0) { globalListener = false; }
return function (event) {
// It's possible this handler might trigger multiple times for the same
// event (e.g. event propagation through node ancestors).
// Ignore if we've already captured that event.
if (!event || lastCapturedEvent === event) {
return;
}
// We always want to skip _some_ events.
if (shouldSkipDOMEvent(event)) {
return;
}
var name = event.type === 'keypress' ? 'input' : event.type;
// If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.
if (debounceTimerID === undefined) {
handler({
event: event,
name: name,
global: globalListener,
});
lastCapturedEvent = event;
}
// If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
// If that's the case, emit the previous event and store locally the newly-captured DOM event.
else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
handler({
event: event,
name: name,
global: globalListener,
});
lastCapturedEvent = event;
}
// Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
clearTimeout(debounceTimerID);
debounceTimerID = global.setTimeout(function () {
debounceTimerID = undefined;
}, debounceDuration);
};
}
/** JSDoc */
function instrumentDOM() {
if (!('document' in global)) {
return;
}
// Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
// handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before
// we instrument `addEventListener` so that we don't end up attaching this handler twice.
var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
global.document.addEventListener('click', globalDOMEventHandler, false);
global.document.addEventListener('keypress', globalDOMEventHandler, false);
// After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
// clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
// way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
// could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still
// guaranteed to fire at least once.)
['EventTarget', 'Node'].forEach(function (target) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
var proto = global[target] && global[target].prototype;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
return;
}
fill(proto, 'addEventListener', function (originalAddEventListener) {
return function (type, listener, options) {
if (type === 'click' || type == 'keypress') {
try {
var el = this;
var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});
var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });
if (!handlerForType.handler) {
var handler = makeDOMEventHandler(triggerDOMHandler);
handlerForType.handler = handler;
originalAddEventListener.call(this, type, handler, options);
}
handlerForType.refCount += 1;
}
catch (e) {
// Accessing dom properties is always fragile.
// Also allows us to skip `addEventListenrs` calls with no proper `this` context.
}
}
return originalAddEventListener.call(this, type, listener, options);
};
});
fill(proto, 'removeEventListener', function (originalRemoveEventListener) {
return function (type, listener, options) {
if (type === 'click' || type == 'keypress') {
try {
var el = this;
var handlers_2 = el.__sentry_instrumentation_handlers__ || {};
var handlerForType = handlers_2[type];
if (handlerForType) {
handlerForType.refCount -= 1;
// If there are no longer any custom handlers of the current type on this element, we can remove ours, too.
if (handlerForType.refCount <= 0) {
originalRemoveEventListener.call(this, type, handlerForType.handler, options);
handlerForType.handler = undefined;
delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete
}
// If there are no longer any custom handlers of any type on this element, cleanup everything.
if (Object.keys(handlers_2).length === 0) {
delete el.__sentry_instrumentation_handlers__;
}
}
}
catch (e) {
// Accessing dom properties is always fragile.
// Also allows us to skip `addEventListenrs` calls with no proper `this` context.
}
}
return originalRemoveEventListener.call(this, type, listener, options);
};
});
});
}
var _oldOnErrorHandler = null;
/** JSDoc */
function instrumentError() {
_oldOnErrorHandler = global.onerror;
global.onerror = function (msg, url, line, column, error) {
triggerHandlers('error', {
column: column,
error: error,
line: line,
msg: msg,
url: url,
});
if (_oldOnErrorHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnErrorHandler.apply(this, arguments);
}
return false;
};
}
var _oldOnUnhandledRejectionHandler = null;
/** JSDoc */
function instrumentUnhandledRejection() {
_oldOnUnhandledRejectionHandler = global.onunhandledrejection;
global.onunhandledrejection = function (e) {
triggerHandlers('unhandledrejection', e);
if (_oldOnUnhandledRejectionHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnUnhandledRejectionHandler.apply(this, arguments);
}
return true;
};
}
//# sourceMappingURL=instrument.js.map

1
node_modules/@sentry/utils/esm/instrument.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

112
node_modules/@sentry/utils/esm/is.d.ts generated vendored Normal file
View File

@@ -0,0 +1,112 @@
import { Primitive } from '@sentry/types';
/**
* Checks whether given value's type is one of a few Error or Error-like
* {@link isError}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isError(wat: unknown): wat is Error;
/**
* Checks whether given value's type is ErrorEvent
* {@link isErrorEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isErrorEvent(wat: unknown): boolean;
/**
* Checks whether given value's type is DOMError
* {@link isDOMError}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isDOMError(wat: unknown): boolean;
/**
* Checks whether given value's type is DOMException
* {@link isDOMException}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isDOMException(wat: unknown): boolean;
/**
* Checks whether given value's type is a string
* {@link isString}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isString(wat: unknown): wat is string;
/**
* Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
* {@link isPrimitive}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isPrimitive(wat: unknown): wat is Primitive;
/**
* Checks whether given value's type is an object literal
* {@link isPlainObject}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isPlainObject(wat: unknown): wat is Record<string, unknown>;
/**
* Checks whether given value's type is an Event instance
* {@link isEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isEvent(wat: unknown): boolean;
/**
* Checks whether given value's type is an Element instance
* {@link isElement}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isElement(wat: unknown): boolean;
/**
* Checks whether given value's type is an regexp
* {@link isRegExp}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isRegExp(wat: unknown): wat is RegExp;
/**
* Checks whether given value has a then function.
* @param wat A value to be checked.
*/
export declare function isThenable(wat: any): wat is PromiseLike<any>;
/**
* Checks whether given value's type is a SyntheticEvent
* {@link isSyntheticEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isSyntheticEvent(wat: unknown): boolean;
/**
* Checks whether given value is NaN
* {@link isNaN}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isNaN(wat: unknown): boolean;
/**
* Checks whether given value's type is an instance of provided constructor.
* {@link isInstanceOf}.
*
* @param wat A value to be checked.
* @param base A constructor to be used in a check.
* @returns A boolean representing the result.
*/
export declare function isInstanceOf(wat: any, base: any): boolean;
//# sourceMappingURL=is.d.ts.map

1
node_modules/@sentry/utils/esm/is.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/is.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK1C;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK,CASlD;AAMD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAG5D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAE3C;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAMzD"}

159
node_modules/@sentry/utils/esm/is.js generated vendored Normal file
View File

@@ -0,0 +1,159 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
// eslint-disable-next-line @typescript-eslint/unbound-method
var objectToString = Object.prototype.toString;
/**
* Checks whether given value's type is one of a few Error or Error-like
* {@link isError}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isError(wat) {
switch (objectToString.call(wat)) {
case '[object Error]':
case '[object Exception]':
case '[object DOMException]':
return true;
default:
return isInstanceOf(wat, Error);
}
}
function isBuiltin(wat, ty) {
return objectToString.call(wat) === "[object " + ty + "]";
}
/**
* Checks whether given value's type is ErrorEvent
* {@link isErrorEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isErrorEvent(wat) {
return isBuiltin(wat, 'ErrorEvent');
}
/**
* Checks whether given value's type is DOMError
* {@link isDOMError}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isDOMError(wat) {
return isBuiltin(wat, 'DOMError');
}
/**
* Checks whether given value's type is DOMException
* {@link isDOMException}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isDOMException(wat) {
return isBuiltin(wat, 'DOMException');
}
/**
* Checks whether given value's type is a string
* {@link isString}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isString(wat) {
return isBuiltin(wat, 'String');
}
/**
* Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
* {@link isPrimitive}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isPrimitive(wat) {
return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
}
/**
* Checks whether given value's type is an object literal
* {@link isPlainObject}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isPlainObject(wat) {
return isBuiltin(wat, 'Object');
}
/**
* Checks whether given value's type is an Event instance
* {@link isEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isEvent(wat) {
return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
}
/**
* Checks whether given value's type is an Element instance
* {@link isElement}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isElement(wat) {
return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
}
/**
* Checks whether given value's type is an regexp
* {@link isRegExp}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isRegExp(wat) {
return isBuiltin(wat, 'RegExp');
}
/**
* Checks whether given value has a then function.
* @param wat A value to be checked.
*/
export function isThenable(wat) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return Boolean(wat && wat.then && typeof wat.then === 'function');
}
/**
* Checks whether given value's type is a SyntheticEvent
* {@link isSyntheticEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isSyntheticEvent(wat) {
return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
}
/**
* Checks whether given value is NaN
* {@link isNaN}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isNaN(wat) {
return typeof wat === 'number' && wat !== wat;
}
/**
* Checks whether given value's type is an instance of provided constructor.
* {@link isInstanceOf}.
*
* @param wat A value to be checked.
* @param base A constructor to be used in a check.
* @returns A boolean representing the result.
*/
export function isInstanceOf(wat, base) {
try {
return wat instanceof base;
}
catch (_e) {
return false;
}
}
//# sourceMappingURL=is.js.map

1
node_modules/@sentry/utils/esm/is.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

18
node_modules/@sentry/utils/esm/logger.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
export declare const CONSOLE_LEVELS: readonly ["debug", "info", "warn", "error", "log", "assert"];
declare type LoggerMethod = (...args: unknown[]) => void;
declare type LoggerConsoleMethods = Record<typeof CONSOLE_LEVELS[number], LoggerMethod>;
/** JSDoc */
interface Logger extends LoggerConsoleMethods {
disable(): void;
enable(): void;
}
/**
* Temporarily disable sentry console instrumentations.
*
* @param callback The function to run against the original `console` messages
* @returns The results of the callback
*/
export declare function consoleSandbox<T>(callback: () => T): T;
declare let logger: Logger;
export { logger };
//# sourceMappingURL=logger.d.ts.map

1
node_modules/@sentry/utils/esm/logger.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,8DAA+D,CAAC;AAE3F,aAAK,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AACjD,aAAK,oBAAoB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC;AAEhF,YAAY;AACZ,UAAU,MAAO,SAAQ,oBAAoB;IAC3C,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CA6BtD;AAkCD,QAAA,IAAI,MAAM,EAAE,MAAM,CAAC;AAOnB,OAAO,EAAE,MAAM,EAAE,CAAC"}

84
node_modules/@sentry/utils/esm/logger.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
import { __read, __spread } from "tslib";
import { IS_DEBUG_BUILD } from './flags';
import { getGlobalObject, getGlobalSingleton } from './global';
// TODO: Implement different loggers for different environments
var global = getGlobalObject();
/** Prefix for logging strings */
var PREFIX = 'Sentry Logger ';
export var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
/**
* Temporarily disable sentry console instrumentations.
*
* @param callback The function to run against the original `console` messages
* @returns The results of the callback
*/
export function consoleSandbox(callback) {
var global = getGlobalObject();
if (!('console' in global)) {
return callback();
}
var originalConsole = global.console;
var wrappedLevels = {};
// Restore all wrapped console methods
CONSOLE_LEVELS.forEach(function (level) {
// TODO(v7): Remove this check as it's only needed for Node 6
var originalWrappedFunc = originalConsole[level] && originalConsole[level].__sentry_original__;
if (level in global.console && originalWrappedFunc) {
wrappedLevels[level] = originalConsole[level];
originalConsole[level] = originalWrappedFunc;
}
});
try {
return callback();
}
finally {
// Revert restoration to wrapped state
Object.keys(wrappedLevels).forEach(function (level) {
originalConsole[level] = wrappedLevels[level];
});
}
}
function makeLogger() {
var enabled = false;
var logger = {
enable: function () {
enabled = true;
},
disable: function () {
enabled = false;
},
};
if (IS_DEBUG_BUILD) {
CONSOLE_LEVELS.forEach(function (name) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
logger[name] = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (enabled) {
consoleSandbox(function () {
var _a;
(_a = global.console)[name].apply(_a, __spread([PREFIX + "[" + name + "]:"], args));
});
}
};
});
}
else {
CONSOLE_LEVELS.forEach(function (name) {
logger[name] = function () { return undefined; };
});
}
return logger;
}
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
var logger;
if (IS_DEBUG_BUILD) {
logger = getGlobalSingleton('logger', makeLogger);
}
else {
logger = makeLogger();
}
export { logger };
//# sourceMappingURL=logger.js.map

1
node_modules/@sentry/utils/esm/logger.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

6
node_modules/@sentry/utils/esm/memo.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export declare type MemoFunc = [(obj: any) => boolean, (obj: any) => void];
/**
* Helper to decycle json objects
*/
export declare function memoBuilder(): MemoFunc;
//# sourceMappingURL=memo.d.ts.map

1
node_modules/@sentry/utils/esm/memo.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"memo.d.ts","sourceRoot":"","sources":["../../src/memo.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ,GAAG,CAErB,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,EAErB,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CACnB,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAmCtC"}

42
node_modules/@sentry/utils/esm/memo.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Helper to decycle json objects
*/
export function memoBuilder() {
var hasWeakSet = typeof WeakSet === 'function';
var inner = hasWeakSet ? new WeakSet() : [];
function memoize(obj) {
if (hasWeakSet) {
if (inner.has(obj)) {
return true;
}
inner.add(obj);
return false;
}
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (var i = 0; i < inner.length; i++) {
var value = inner[i];
if (value === obj) {
return true;
}
}
inner.push(obj);
return false;
}
function unmemoize(obj) {
if (hasWeakSet) {
inner.delete(obj);
}
else {
for (var i = 0; i < inner.length; i++) {
if (inner[i] === obj) {
inner.splice(i, 1);
break;
}
}
}
}
return [memoize, unmemoize];
}
//# sourceMappingURL=memo.js.map

1
node_modules/@sentry/utils/esm/memo.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"memo.js","sourceRoot":"","sources":["../../src/memo.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,uDAAuD;AASvD;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,IAAM,UAAU,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC;IACjD,IAAM,KAAK,GAAQ,UAAU,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACnD,SAAS,OAAO,CAAC,GAAQ;QACvB,IAAI,UAAU,EAAE;YACd,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAClB,OAAO,IAAI,CAAC;aACb;YACD,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACf,OAAO,KAAK,CAAC;SACd;QACD,4DAA4D;QAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,IAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,KAAK,KAAK,GAAG,EAAE;gBACjB,OAAO,IAAI,CAAC;aACb;SACF;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,SAAS,SAAS,CAAC,GAAQ;QACzB,IAAI,UAAU,EAAE;YACd,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACrC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;oBACpB,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACnB,MAAM;iBACP;aACF;SACF;IACH,CAAC;IACD,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n"]}

95
node_modules/@sentry/utils/esm/misc.d.ts generated vendored Normal file
View File

@@ -0,0 +1,95 @@
import { Event, Mechanism, StackFrame } from '@sentry/types';
/**
* UUID4 generator
*
* @returns string Generated UUID4.
*/
export declare function uuid4(): string;
/**
* Parses string form of URL into an object
* // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
* // intentionally using regex and not <a/> href parsing trick because React Native and other
* // environments where DOM might not be available
* @returns parsed URL object
*/
export declare function parseUrl(url: string): {
host?: string;
path?: string;
protocol?: string;
relative?: string;
};
/**
* Extracts either message or type+value from an event that can be used for user-facing logs
* @returns event's description
*/
export declare function getEventDescription(event: Event): string;
/**
* Adds exception values, type and value to an synthetic Exception.
* @param event The event to modify.
* @param value Value of the exception.
* @param type Type of the exception.
* @hidden
*/
export declare function addExceptionTypeValue(event: Event, value?: string, type?: string): void;
/**
* Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
*
* @param event The event to modify.
* @param newMechanism Mechanism data to add to the event.
* @hidden
*/
export declare function addExceptionMechanism(event: Event, newMechanism?: Partial<Mechanism>): void;
/**
* Represents Semantic Versioning object
*/
interface SemVer {
major?: number;
minor?: number;
patch?: number;
prerelease?: string;
buildmetadata?: string;
}
/**
* Parses input into a SemVer interface
* @param input string representation of a semver version
*/
export declare function parseSemver(input: string): SemVer;
/**
* This function adds context (pre/post/line) lines to the provided frame
*
* @param lines string[] containing all lines
* @param frame StackFrame that will be mutated
* @param linesOfContext number of context lines we want to add pre/post
*/
export declare function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext?: number): void;
/**
* Strip the query string and fragment off of a given URL or path (if present)
*
* @param urlPath Full URL or path, including possible query string and/or fragment
* @returns URL or path without query string or fragment
*/
export declare function stripUrlQueryAndFragment(urlPath: string): string;
/**
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
* in question), and marks it captured if not.
*
* This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
* record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
* that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
* the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
* caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
* function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
* see it.
*
* Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
* them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
* object wrapper forms so that this check will always work. However, because we need to flag the exact object which
* will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification
* must be done before the exception captured.
*
* @param A thrown exception to check or flag as having been seen
* @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
*/
export declare function checkOrSetAlreadyCaught(exception: unknown): boolean;
export {};
//# sourceMappingURL=misc.d.ts.map

1
node_modules/@sentry/utils/esm/misc.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/misc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAa,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAaxE;;;;GAIG;AACH,wBAAgB,KAAK,IAAI,MAAM,CAoC9B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAoBA;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAcxD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAUvF;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAc3F;AAMD;;GAEG;AACH,UAAU,MAAM;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYjD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,GAAE,MAAU,GAAG,IAAI,CActG;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAenE"}

210
node_modules/@sentry/utils/esm/misc.js generated vendored Normal file
View File

@@ -0,0 +1,210 @@
import { __assign } from "tslib";
import { getGlobalObject } from './global';
import { addNonEnumerableProperty } from './object';
import { snipLine } from './string';
/**
* UUID4 generator
*
* @returns string Generated UUID4.
*/
export function uuid4() {
var global = getGlobalObject();
var crypto = global.crypto || global.msCrypto;
if (!(crypto === void 0) && crypto.getRandomValues) {
// Use window.crypto API if available
var arr = new Uint16Array(8);
crypto.getRandomValues(arr);
// set 4 in byte 7
// eslint-disable-next-line no-bitwise
arr[3] = (arr[3] & 0xfff) | 0x4000;
// set 2 most significant bits of byte 9 to '10'
// eslint-disable-next-line no-bitwise
arr[4] = (arr[4] & 0x3fff) | 0x8000;
var pad = function (num) {
var v = num.toString(16);
while (v.length < 4) {
v = "0" + v;
}
return v;
};
return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));
}
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
// eslint-disable-next-line no-bitwise
var r = (Math.random() * 16) | 0;
// eslint-disable-next-line no-bitwise
var v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}
/**
* Parses string form of URL into an object
* // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
* // intentionally using regex and not <a/> href parsing trick because React Native and other
* // environments where DOM might not be available
* @returns parsed URL object
*/
export function parseUrl(url) {
if (!url) {
return {};
}
var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
if (!match) {
return {};
}
// coerce to undefined values to empty string so we don't get 'undefined'
var query = match[6] || '';
var fragment = match[8] || '';
return {
host: match[4],
path: match[5],
protocol: match[2],
relative: match[5] + query + fragment,
};
}
function getFirstException(event) {
return event.exception && event.exception.values ? event.exception.values[0] : undefined;
}
/**
* Extracts either message or type+value from an event that can be used for user-facing logs
* @returns event's description
*/
export function getEventDescription(event) {
var message = event.message, eventId = event.event_id;
if (message) {
return message;
}
var firstException = getFirstException(event);
if (firstException) {
if (firstException.type && firstException.value) {
return firstException.type + ": " + firstException.value;
}
return firstException.type || firstException.value || eventId || '<unknown>';
}
return eventId || '<unknown>';
}
/**
* Adds exception values, type and value to an synthetic Exception.
* @param event The event to modify.
* @param value Value of the exception.
* @param type Type of the exception.
* @hidden
*/
export function addExceptionTypeValue(event, value, type) {
var exception = (event.exception = event.exception || {});
var values = (exception.values = exception.values || []);
var firstException = (values[0] = values[0] || {});
if (!firstException.value) {
firstException.value = value || '';
}
if (!firstException.type) {
firstException.type = type || 'Error';
}
}
/**
* Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
*
* @param event The event to modify.
* @param newMechanism Mechanism data to add to the event.
* @hidden
*/
export function addExceptionMechanism(event, newMechanism) {
var firstException = getFirstException(event);
if (!firstException) {
return;
}
var defaultMechanism = { type: 'generic', handled: true };
var currentMechanism = firstException.mechanism;
firstException.mechanism = __assign(__assign(__assign({}, defaultMechanism), currentMechanism), newMechanism);
if (newMechanism && 'data' in newMechanism) {
var mergedData = __assign(__assign({}, (currentMechanism && currentMechanism.data)), newMechanism.data);
firstException.mechanism.data = mergedData;
}
}
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
/**
* Parses input into a SemVer interface
* @param input string representation of a semver version
*/
export function parseSemver(input) {
var match = input.match(SEMVER_REGEXP) || [];
var major = parseInt(match[1], 10);
var minor = parseInt(match[2], 10);
var patch = parseInt(match[3], 10);
return {
buildmetadata: match[5],
major: isNaN(major) ? undefined : major,
minor: isNaN(minor) ? undefined : minor,
patch: isNaN(patch) ? undefined : patch,
prerelease: match[4],
};
}
/**
* This function adds context (pre/post/line) lines to the provided frame
*
* @param lines string[] containing all lines
* @param frame StackFrame that will be mutated
* @param linesOfContext number of context lines we want to add pre/post
*/
export function addContextToFrame(lines, frame, linesOfContext) {
if (linesOfContext === void 0) { linesOfContext = 5; }
var lineno = frame.lineno || 0;
var maxLines = lines.length;
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
frame.pre_context = lines
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
.map(function (line) { return snipLine(line, 0); });
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
frame.post_context = lines
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
.map(function (line) { return snipLine(line, 0); });
}
/**
* Strip the query string and fragment off of a given URL or path (if present)
*
* @param urlPath Full URL or path, including possible query string and/or fragment
* @returns URL or path without query string or fragment
*/
export function stripUrlQueryAndFragment(urlPath) {
// eslint-disable-next-line no-useless-escape
return urlPath.split(/[\?#]/, 1)[0];
}
/**
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
* in question), and marks it captured if not.
*
* This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
* record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
* that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
* the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
* caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
* function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
* see it.
*
* Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
* them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
* object wrapper forms so that this check will always work. However, because we need to flag the exact object which
* will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification
* must be done before the exception captured.
*
* @param A thrown exception to check or flag as having been seen
* @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
*/
export function checkOrSetAlreadyCaught(exception) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (exception && exception.__sentry_captured__) {
return true;
}
try {
// set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
// `ExtraErrorData` integration
addNonEnumerableProperty(exception, '__sentry_captured__', true);
}
catch (err) {
// `exception` is a primitive, so we can't mark it seen
}
return false;
}
//# sourceMappingURL=misc.js.map

1
node_modules/@sentry/utils/esm/misc.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

31
node_modules/@sentry/utils/esm/node.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
*/
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
export declare function isNodeEnv(): boolean;
/**
* Requires a module which is protected against bundler minification.
*
* @param request The module path to resolve
*/
export declare function dynamicRequire(mod: any, request: string): any;
/**
* Helper for dynamically loading module that should work with linked dependencies.
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
* build time. `require.resolve` is also not available in any other way, so we cannot create,
* a fake helper like we do with `dynamicRequire`.
*
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
* That is to mimic the behavior of `require.resolve` exactly.
*
* @param moduleName module name to require
* @returns possibly required module
*/
export declare function loadModule<T>(moduleName: string): T | undefined;
//# sourceMappingURL=node.d.ts.map

1
node_modules/@sentry/utils/esm/node.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAOnC;AAED;;;;GAIG;AAEH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAG7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAiB/D"}

57
node_modules/@sentry/utils/esm/node.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
*/
import { isBrowserBundle } from './env';
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
export function isNodeEnv() {
// explicitly check for browser bundles as those can be optimized statically
// by terser/rollup.
return (!isBrowserBundle() &&
Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');
}
/**
* Requires a module which is protected against bundler minification.
*
* @param request The module path to resolve
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
export function dynamicRequire(mod, request) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return mod.require(request);
}
/**
* Helper for dynamically loading module that should work with linked dependencies.
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
* build time. `require.resolve` is also not available in any other way, so we cannot create,
* a fake helper like we do with `dynamicRequire`.
*
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
* That is to mimic the behavior of `require.resolve` exactly.
*
* @param moduleName module name to require
* @returns possibly required module
*/
export function loadModule(moduleName) {
var mod;
try {
mod = dynamicRequire(module, moduleName);
}
catch (e) {
// no-empty
}
try {
var cwd = dynamicRequire(module, 'process').cwd;
mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
}
catch (e) {
// no-empty
}
return mod;
}
//# sourceMappingURL=node.js.map

1
node_modules/@sentry/utils/esm/node.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,4EAA4E;IAC5E,oBAAoB;IACpB,OAAO,CACL,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,kBAAkB,CACpG,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,iHAAiH;AACjH,MAAM,UAAU,cAAc,CAAC,GAAQ,EAAE,OAAe;IACtD,sEAAsE;IACtE,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CAAI,UAAkB;IAC9C,IAAI,GAAkB,CAAC;IAEvB,IAAI;QACF,GAAG,GAAG,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC1C;IAAC,OAAO,CAAC,EAAE;QACV,WAAW;KACZ;IAED,IAAI;QACM,IAAA,2CAAG,CAAuC;QAClD,GAAG,GAAG,cAAc,CAAC,MAAM,EAAK,GAAG,EAAE,sBAAiB,UAAY,CAAM,CAAC;KAC1E;IAAC,OAAO,CAAC,EAAE;QACV,WAAW;KACZ;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function dynamicRequire(mod: any, request: string): any {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nexport function loadModule<T>(moduleName: string): T | undefined {\n let mod: T | undefined;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) as T;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n"]}

41
node_modules/@sentry/utils/esm/normalize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
import { Primitive } from '@sentry/types';
import { MemoFunc } from './memo';
declare type ObjOrArray<T> = {
[key: string]: T;
};
/**
* Recursively normalizes the given object.
*
* - Creates a copy to prevent original input mutation
* - Skips non-enumerable properties
* - When stringifying, calls `toJSON` if implemented
* - Removes circular references
* - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format
* - Translates known global objects/classes to a string representations
* - Takes care of `Error` object serialization
* - Optionally limits depth of final output
* - Optionally limits number of properties/elements included in any single object/array
*
* @param input The object to be normalized.
* @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)
* @param maxProperties The max number of elements or properties to be included in any single array or
* object in the normallized output..
* @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization.
*/
export declare function normalize(input: unknown, depth?: number, maxProperties?: number): any;
/** JSDoc */
export declare function normalizeToSize<T>(object: {
[key: string]: any;
}, depth?: number, maxSize?: number): T;
/**
* Visits a node to perform normalization on it
*
* @param key The key corresponding to the given node
* @param value The node to be visited
* @param depth Optional number indicating the maximum recursion depth
* @param maxProperties Optional maximum number of properties/elements included in any single object/array
* @param memo Optional Memo class handling decycling
*/
declare function visit(key: string, value: unknown, depth?: number, maxProperties?: number, memo?: MemoFunc): Primitive | ObjOrArray<unknown>;
export { visit as walk };
//# sourceMappingURL=normalize.d.ts.map

1
node_modules/@sentry/utils/esm/normalize.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAe,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAS/C,aAAK,UAAU,CAAC,CAAC,IAAI;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,CAAC;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAkB,EAAE,aAAa,GAAE,MAAkB,GAAG,GAAG,CAO3G;AAED,YAAY;AACZ,wBAAgB,eAAe,CAAC,CAAC,EAC/B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAE9B,KAAK,GAAE,MAAU,EAEjB,OAAO,GAAE,MAAmB,GAC3B,CAAC,CAQH;AAED;;;;;;;;GAQG;AACH,iBAAS,KAAK,CACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,EACd,KAAK,GAAE,MAAkB,EACzB,aAAa,GAAE,MAAkB,EACjC,IAAI,GAAE,QAAwB,GAC7B,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,CAsEjC;AAGD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}

195
node_modules/@sentry/utils/esm/normalize.js generated vendored Normal file
View File

@@ -0,0 +1,195 @@
import { __read } from "tslib";
import { isError, isEvent, isNaN, isSyntheticEvent } from './is';
import { memoBuilder } from './memo';
import { convertToPlainObject } from './object';
import { getFunctionName } from './stacktrace';
/**
* Recursively normalizes the given object.
*
* - Creates a copy to prevent original input mutation
* - Skips non-enumerable properties
* - When stringifying, calls `toJSON` if implemented
* - Removes circular references
* - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format
* - Translates known global objects/classes to a string representations
* - Takes care of `Error` object serialization
* - Optionally limits depth of final output
* - Optionally limits number of properties/elements included in any single object/array
*
* @param input The object to be normalized.
* @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)
* @param maxProperties The max number of elements or properties to be included in any single array or
* object in the normallized output..
* @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization.
*/
export function normalize(input, depth, maxProperties) {
if (depth === void 0) { depth = +Infinity; }
if (maxProperties === void 0) { maxProperties = +Infinity; }
try {
// since we're at the outermost level, there is no key
return visit('', input, depth, maxProperties);
}
catch (err) {
return { ERROR: "**non-serializable** (" + err + ")" };
}
}
/** JSDoc */
export function normalizeToSize(object,
// Default Node.js REPL depth
depth,
// 100kB, as 200kB is max payload size, so half sounds reasonable
maxSize) {
if (depth === void 0) { depth = 3; }
if (maxSize === void 0) { maxSize = 100 * 1024; }
var normalized = normalize(object, depth);
if (jsonSize(normalized) > maxSize) {
return normalizeToSize(object, depth - 1, maxSize);
}
return normalized;
}
/**
* Visits a node to perform normalization on it
*
* @param key The key corresponding to the given node
* @param value The node to be visited
* @param depth Optional number indicating the maximum recursion depth
* @param maxProperties Optional maximum number of properties/elements included in any single object/array
* @param memo Optional Memo class handling decycling
*/
function visit(key, value, depth, maxProperties, memo) {
if (depth === void 0) { depth = +Infinity; }
if (maxProperties === void 0) { maxProperties = +Infinity; }
if (memo === void 0) { memo = memoBuilder(); }
var _a = __read(memo, 2), memoize = _a[0], unmemoize = _a[1];
// If the value has a `toJSON` method, see if we can bail and let it do the work
var valueWithToJSON = value;
if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {
try {
return valueWithToJSON.toJSON();
}
catch (err) {
// pass (The built-in `toJSON` failed, but we can still try to do it ourselves)
}
}
// Get the simple cases out of the way first
if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))) {
return value;
}
var stringified = stringifyValue(key, value);
// Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`.
// Everything else will have already been serialized, so if we don't see that pattern, we're done.
if (!stringified.startsWith('[object ')) {
return stringified;
}
// We're also done if we've reached the max depth
if (depth === 0) {
// At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`.
return stringified.replace('object ', '');
}
// If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.
if (memoize(value)) {
return '[Circular ~]';
}
// At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse
// because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each
// property/entry, and keep track of the number of items we add to it.
var normalized = (Array.isArray(value) ? [] : {});
var numAdded = 0;
// Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant
// properties are non-enumerable and otherwise would get missed.
var visitable = (isError(value) || isEvent(value) ? convertToPlainObject(value) : value);
for (var visitKey in visitable) {
// Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.
if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
continue;
}
if (numAdded >= maxProperties) {
normalized[visitKey] = '[MaxProperties ~]';
break;
}
// Recursively visit all the child nodes
var visitValue = visitable[visitKey];
normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);
numAdded += 1;
}
// Once we've visited all the branches, remove the parent from memo storage
unmemoize(value);
// Return accumulated values
return normalized;
}
// TODO remove this in v7 (this means the method will no longer be exported, under any name)
export { visit as walk };
/**
* Stringify the given value. Handles various known special values and types.
*
* Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn
* the number 1231 into "[Object Number]", nor on `null`, as it will throw.
*
* @param value The value to stringify
* @returns A stringified representation of the given value
*/
function stringifyValue(key,
// this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for
// our internal use, it'll do
value) {
try {
if (key === 'domain' && value && typeof value === 'object' && value._events) {
return '[Domain]';
}
if (key === 'domainEmitter') {
return '[DomainEmitter]';
}
// It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first
// which won't throw if they are not present.
if (typeof global !== 'undefined' && value === global) {
return '[Global]';
}
// eslint-disable-next-line no-restricted-globals
if (typeof window !== 'undefined' && value === window) {
return '[Window]';
}
// eslint-disable-next-line no-restricted-globals
if (typeof document !== 'undefined' && value === document) {
return '[Document]';
}
// React's SyntheticEvent thingy
if (isSyntheticEvent(value)) {
return '[SyntheticEvent]';
}
if (typeof value === 'number' && value !== value) {
return '[NaN]';
}
// this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)
if (value === void 0) {
return '[undefined]';
}
if (typeof value === 'function') {
return "[Function: " + getFunctionName(value) + "]";
}
if (typeof value === 'symbol') {
return "[" + String(value) + "]";
}
// stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion
if (typeof value === 'bigint') {
return "[BigInt: " + String(value) + "]";
}
// Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting
// them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as
// `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class),
// we can make sure that only plain objects come out that way.
return "[object " + Object.getPrototypeOf(value).constructor.name + "]";
}
catch (err) {
return "**non-serializable** (" + err + ")";
}
}
/** Calculates bytes size of input string */
function utf8Length(value) {
// eslint-disable-next-line no-bitwise
return ~-encodeURI(value).split(/%..|./).length;
}
/** Calculates bytes size of input object */
function jsonSize(value) {
return utf8Length(JSON.stringify(value));
}
//# sourceMappingURL=normalize.js.map

1
node_modules/@sentry/utils/esm/normalize.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

81
node_modules/@sentry/utils/esm/object.d.ts generated vendored Normal file
View File

@@ -0,0 +1,81 @@
import { WrappedFunction } from '@sentry/types';
/**
* Replace a method in an object with a wrapped version of itself.
*
* @param source An object that contains a method to be wrapped.
* @param name The name of the method to be wrapped.
* @param replacementFactory A higher-order function that takes the original version of the given method and returns a
* wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
* preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
* args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
* @returns void
*/
export declare function fill(source: {
[key: string]: any;
}, name: string, replacementFactory: (...args: any[]) => any): void;
/**
* Defines a non-enumerable property on the given object.
*
* @param obj The object on which to set the property
* @param name The name of the property to be set
* @param value The value to which to set the property
*/
export declare function addNonEnumerableProperty(obj: {
[key: string]: unknown;
}, name: string, value: unknown): void;
/**
* Remembers the original function on the wrapped function and
* patches up the prototype.
*
* @param wrapped the wrapper function
* @param original the original function that gets wrapped
*/
export declare function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void;
/**
* This extracts the original function if available. See
* `markFunctionWrapped` for more information.
*
* @param func the function to unwrap
* @returns the unwrapped version of the function if available.
*/
export declare function getOriginalFunction(func: WrappedFunction): WrappedFunction | undefined;
/**
* Encodes given object into url-friendly format
*
* @param object An object that contains serializable values
* @returns string Encoded
*/
export declare function urlEncode(object: {
[key: string]: any;
}): string;
/**
* Transforms any object into an object literal with all its attributes
* attached to it.
*
* @param value Initial source that we have to transform in order for it to be usable by the serializer
*/
export declare function convertToPlainObject(value: unknown): {
[key: string]: unknown;
};
/**
* Given any captured exception, extract its keys and create a sorted
* and truncated list that will be used inside the event message.
* eg. `Non-error exception captured with keys: foo, bar, baz`
*/
export declare function extractExceptionKeysForMessage(exception: any, maxLength?: number): string;
/**
* Given any object, return the new object with removed keys that value was `undefined`.
* Works recursively on objects and arrays.
*/
export declare function dropUndefinedKeys<T>(val: T): T;
/**
* Ensure that something is an object.
*
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
*
* @param wat The subject of the objectification
* @returns A version of `wat` which can safely be used with `Object` class methods
*/
export declare function objectify(wat: unknown): typeof Object;
//# sourceMappingURL=object.d.ts.map

1
node_modules/@sentry/utils/esm/object.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/object.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,eAAe,EAAE,MAAM,eAAe,CAAC;AAM/D;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAoBpH;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAO5G;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAI7F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,GAAG,SAAS,CAEtF;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,MAAM,CAIhE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAqCA;AAsBD;;;;GAIG;AAEH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,EAAE,SAAS,GAAE,MAAW,GAAG,MAAM,CAwB7F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAgB9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,MAAM,CA0BrD"}

213
node_modules/@sentry/utils/esm/object.js generated vendored Normal file
View File

@@ -0,0 +1,213 @@
import { __assign, __values } from "tslib";
import { htmlTreeAsString } from './browser';
import { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';
import { truncate } from './string';
/**
* Replace a method in an object with a wrapped version of itself.
*
* @param source An object that contains a method to be wrapped.
* @param name The name of the method to be wrapped.
* @param replacementFactory A higher-order function that takes the original version of the given method and returns a
* wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
* preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
* args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
* @returns void
*/
export function fill(source, name, replacementFactory) {
if (!(name in source)) {
return;
}
var original = source[name];
var wrapped = replacementFactory(original);
// Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
// otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
if (typeof wrapped === 'function') {
try {
markFunctionWrapped(wrapped, original);
}
catch (_Oo) {
// This can throw if multiple fill happens on a global object like XMLHttpRequest
// Fixes https://github.com/getsentry/sentry-javascript/issues/2043
}
}
source[name] = wrapped;
}
/**
* Defines a non-enumerable property on the given object.
*
* @param obj The object on which to set the property
* @param name The name of the property to be set
* @param value The value to which to set the property
*/
export function addNonEnumerableProperty(obj, name, value) {
Object.defineProperty(obj, name, {
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
value: value,
writable: true,
configurable: true,
});
}
/**
* Remembers the original function on the wrapped function and
* patches up the prototype.
*
* @param wrapped the wrapper function
* @param original the original function that gets wrapped
*/
export function markFunctionWrapped(wrapped, original) {
var proto = original.prototype || {};
wrapped.prototype = original.prototype = proto;
addNonEnumerableProperty(wrapped, '__sentry_original__', original);
}
/**
* This extracts the original function if available. See
* `markFunctionWrapped` for more information.
*
* @param func the function to unwrap
* @returns the unwrapped version of the function if available.
*/
export function getOriginalFunction(func) {
return func.__sentry_original__;
}
/**
* Encodes given object into url-friendly format
*
* @param object An object that contains serializable values
* @returns string Encoded
*/
export function urlEncode(object) {
return Object.keys(object)
.map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); })
.join('&');
}
/**
* Transforms any object into an object literal with all its attributes
* attached to it.
*
* @param value Initial source that we have to transform in order for it to be usable by the serializer
*/
export function convertToPlainObject(value) {
var newObj = value;
if (isError(value)) {
newObj = __assign({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));
}
else if (isEvent(value)) {
var event_1 = value;
newObj = __assign({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));
if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {
newObj.detail = event_1.detail;
}
}
return newObj;
}
/** Creates a string representation of the target of an `Event` object */
function serializeEventTarget(target) {
try {
return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);
}
catch (_oO) {
return '<unknown>';
}
}
/** Filters out all but an object's own properties */
function getOwnProperties(obj) {
var extractedProps = {};
for (var property in obj) {
if (Object.prototype.hasOwnProperty.call(obj, property)) {
extractedProps[property] = obj[property];
}
}
return extractedProps;
}
/**
* Given any captured exception, extract its keys and create a sorted
* and truncated list that will be used inside the event message.
* eg. `Non-error exception captured with keys: foo, bar, baz`
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function extractExceptionKeysForMessage(exception, maxLength) {
if (maxLength === void 0) { maxLength = 40; }
var keys = Object.keys(convertToPlainObject(exception));
keys.sort();
if (!keys.length) {
return '[object has no keys]';
}
if (keys[0].length >= maxLength) {
return truncate(keys[0], maxLength);
}
for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {
var serialized = keys.slice(0, includedKeys).join(', ');
if (serialized.length > maxLength) {
continue;
}
if (includedKeys === keys.length) {
return serialized;
}
return truncate(serialized, maxLength);
}
return '';
}
/**
* Given any object, return the new object with removed keys that value was `undefined`.
* Works recursively on objects and arrays.
*/
export function dropUndefinedKeys(val) {
var e_1, _a;
if (isPlainObject(val)) {
var rv = {};
try {
for (var _b = __values(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;
if (typeof val[key] !== 'undefined') {
rv[key] = dropUndefinedKeys(val[key]);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return rv;
}
if (Array.isArray(val)) {
return val.map(dropUndefinedKeys);
}
return val;
}
/**
* Ensure that something is an object.
*
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
*
* @param wat The subject of the objectification
* @returns A version of `wat` which can safely be used with `Object` class methods
*/
export function objectify(wat) {
var objectified;
switch (true) {
case wat === undefined || wat === null:
objectified = new String(wat);
break;
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
// an object in order to wrap it.
case typeof wat === 'symbol' || typeof wat === 'bigint':
objectified = Object(wat);
break;
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
case isPrimitive(wat):
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
objectified = new wat.constructor(wat);
break;
// by process of elimination, at this point we know that `wat` must already be an object
default:
objectified = wat;
break;
}
return objectified;
}
//# sourceMappingURL=object.js.map

1
node_modules/@sentry/utils/esm/object.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

15
node_modules/@sentry/utils/esm/path.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
/** JSDoc */
export declare function resolve(...args: string[]): string;
/** JSDoc */
export declare function relative(from: string, to: string): string;
/** JSDoc */
export declare function normalizePath(path: string): string;
/** JSDoc */
export declare function isAbsolute(path: string): boolean;
/** JSDoc */
export declare function join(...args: string[]): string;
/** JSDoc */
export declare function dirname(path: string): string;
/** JSDoc */
export declare function basename(path: string, ext?: string): string;
//# sourceMappingURL=path.d.ts.map

1
node_modules/@sentry/utils/esm/path.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/path.ts"],"names":[],"mappings":"AA4CA,YAAY;AACZ,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CA0BjD;AA0BD,YAAY;AACZ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CA0BzD;AAID,YAAY;AACZ,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBlD;AAGD,YAAY;AACZ,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAGD,YAAY;AACZ,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAE9C;AAED,YAAY;AACZ,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB5C;AAED,YAAY;AACZ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAM3D"}

162
node_modules/@sentry/utils/esm/path.js generated vendored Normal file
View File

@@ -0,0 +1,162 @@
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
/** JSDoc */
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
}
else if (last === '..') {
parts.splice(i, 1);
// eslint-disable-next-line no-plusplus
up++;
}
else if (up) {
parts.splice(i, 1);
// eslint-disable-next-line no-plusplus
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
// eslint-disable-next-line no-plusplus
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// Split a filename into [root, dir, basename, ext], unix version
// 'root' is just a slash, or nothing.
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
/** JSDoc */
function splitPath(filename) {
var parts = splitPathRe.exec(filename);
return parts ? parts.slice(1) : [];
}
// path.resolve([from ...], to)
// posix version
/** JSDoc */
export function resolve() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var resolvedPath = '';
var resolvedAbsolute = false;
for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = i >= 0 ? args[i] : '/';
// Skip empty entries
if (!path) {
continue;
}
resolvedPath = path + "/" + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
}
/** JSDoc */
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') {
break;
}
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') {
break;
}
}
if (start > end) {
return [];
}
return arr.slice(start, end - start + 1);
}
// path.relative(from, to)
// posix version
/** JSDoc */
export function relative(from, to) {
/* eslint-disable no-param-reassign */
from = resolve(from).substr(1);
to = resolve(to).substr(1);
/* eslint-enable no-param-reassign */
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
}
// path.normalize(path)
// posix version
/** JSDoc */
export function normalizePath(path) {
var isPathAbsolute = isAbsolute(path);
var trailingSlash = path.substr(-1) === '/';
// Normalize the path
var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');
if (!normalizedPath && !isPathAbsolute) {
normalizedPath = '.';
}
if (normalizedPath && trailingSlash) {
normalizedPath += '/';
}
return (isPathAbsolute ? '/' : '') + normalizedPath;
}
// posix version
/** JSDoc */
export function isAbsolute(path) {
return path.charAt(0) === '/';
}
// posix version
/** JSDoc */
export function join() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return normalizePath(args.join('/'));
}
/** JSDoc */
export function dirname(path) {
var result = splitPath(path);
var root = result[0];
var dir = result[1];
if (!root && !dir) {
// No dirname whatsoever
return '.';
}
if (dir) {
// It has a dirname, strip trailing slash
dir = dir.substr(0, dir.length - 1);
}
return root + dir;
}
/** JSDoc */
export function basename(path, ext) {
var f = splitPath(path)[2];
if (ext && f.substr(ext.length * -1) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
}
//# sourceMappingURL=path.js.map

1
node_modules/@sentry/utils/esm/path.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2
node_modules/@sentry/utils/esm/polyfill.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare const setPrototypeOf: (o: any, proto: object | null) => any;
//# sourceMappingURL=polyfill.d.ts.map

1
node_modules/@sentry/utils/esm/polyfill.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../src/polyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uCACmE,CAAC"}

24
node_modules/@sentry/utils/esm/polyfill.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
/**
* setPrototypeOf polyfill using __proto__
*/
// eslint-disable-next-line @typescript-eslint/ban-types
function setProtoOf(obj, proto) {
// @ts-ignore __proto__ does not exist on obj
obj.__proto__ = proto;
return obj;
}
/**
* setPrototypeOf polyfill using mixin
*/
// eslint-disable-next-line @typescript-eslint/ban-types
function mixinProperties(obj, proto) {
for (var prop in proto) {
if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
// @ts-ignore typescript complains about indexing so we remove
obj[prop] = proto[prop];
}
}
return obj;
}
//# sourceMappingURL=polyfill.js.map

1
node_modules/@sentry/utils/esm/polyfill.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"polyfill.js","sourceRoot":"","sources":["../../src/polyfill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,cAAc,GACzB,MAAM,CAAC,cAAc,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;AAE/F;;GAEG;AACH,wDAAwD;AACxD,SAAS,UAAU,CAAiC,GAAY,EAAE,KAAa;IAC7E,6CAA6C;IAC7C,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,GAAuB,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,wDAAwD;AACxD,SAAS,eAAe,CAAiC,GAAY,EAAE,KAAa;IAClF,KAAK,IAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YACpD,8DAA8D;YAC9D,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,OAAO,GAAuB,CAAC;AACjC,CAAC","sourcesContent":["export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf<TTarget extends object, TProto>(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties<TTarget extends object, TProto>(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n"]}

11
node_modules/@sentry/utils/esm/promisebuffer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export interface PromiseBuffer<T> {
$: Array<PromiseLike<T>>;
add(taskProducer: () => PromiseLike<T>): PromiseLike<T>;
drain(timeout?: number): PromiseLike<boolean>;
}
/**
* Creates an new PromiseBuffer object with the specified limit
* @param limit max number of promises that can be stored in the buffer
*/
export declare function makePromiseBuffer<T>(limit?: number): PromiseBuffer<T>;
//# sourceMappingURL=promisebuffer.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"promisebuffer.d.ts","sourceRoot":"","sources":["../../src/promisebuffer.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa,CAAC,CAAC;IAG9B,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACzB,GAAG,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IACxD,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CA4FrE"}

91
node_modules/@sentry/utils/esm/promisebuffer.js generated vendored Normal file
View File

@@ -0,0 +1,91 @@
import { SentryError } from './error';
import { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';
/**
* Creates an new PromiseBuffer object with the specified limit
* @param limit max number of promises that can be stored in the buffer
*/
export function makePromiseBuffer(limit) {
var buffer = [];
function isReady() {
return limit === undefined || buffer.length < limit;
}
/**
* Remove a promise from the queue.
*
* @param task Can be any PromiseLike<T>
* @returns Removed promise.
*/
function remove(task) {
return buffer.splice(buffer.indexOf(task), 1)[0];
}
/**
* Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.
*
* @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:
* PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor
* functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By
* requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer
* limit check.
* @returns The original promise.
*/
function add(taskProducer) {
if (!isReady()) {
return rejectedSyncPromise(new SentryError('Not adding Promise due to buffer limit reached.'));
}
// start the task and add its promise to the queue
var task = taskProducer();
if (buffer.indexOf(task) === -1) {
buffer.push(task);
}
void task
.then(function () { return remove(task); })
// Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`
// rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't
// have promises, so TS has to polyfill when down-compiling.)
.then(null, function () {
return remove(task).then(null, function () {
// We have to add another catch here because `remove()` starts a new promise chain.
});
});
return task;
}
/**
* Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.
*
* @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or
* not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to
* `true`.
* @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and
* `false` otherwise
*/
function drain(timeout) {
return new SyncPromise(function (resolve, reject) {
var counter = buffer.length;
if (!counter) {
return resolve(true);
}
// wait for `timeout` ms and then resolve to `false` (if not cancelled first)
var capturedSetTimeout = setTimeout(function () {
if (timeout && timeout > 0) {
resolve(false);
}
}, timeout);
// if all promises resolve in time, cancel the timer and resolve to `true`
buffer.forEach(function (item) {
void resolvedSyncPromise(item).then(function () {
// eslint-disable-next-line no-plusplus
if (!--counter) {
clearTimeout(capturedSetTimeout);
resolve(true);
}
}, reject);
});
});
}
return {
$: buffer,
add: add,
drain: drain,
};
}
//# sourceMappingURL=promisebuffer.js.map

1
node_modules/@sentry/utils/esm/promisebuffer.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

23
node_modules/@sentry/utils/esm/ratelimit.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export declare type RateLimits = Record<string, number>;
export declare const DEFAULT_RETRY_AFTER: number;
/**
* Extracts Retry-After value from the request header or returns default value
* @param header string representation of 'Retry-After' header
* @param now current unix timestamp
*
*/
export declare function parseRetryAfterHeader(header: string, now?: number): number;
/**
* Gets the time that given category is disabled until for rate limiting
*/
export declare function disabledUntil(limits: RateLimits, category: string): number;
/**
* Checks if a category is rate limited
*/
export declare function isRateLimited(limits: RateLimits, category: string, now?: number): boolean;
/**
* Update ratelimits from incoming headers.
* Returns true if headers contains a non-empty rate limiting header.
*/
export declare function updateRateLimits(limits: RateLimits, headers: Record<string, string | null | undefined>, now?: number): RateLimits;
//# sourceMappingURL=ratelimit.d.ts.map

1
node_modules/@sentry/utils/esm/ratelimit.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ratelimit.d.ts","sourceRoot":"","sources":["../../src/ratelimit.ts"],"names":[],"mappings":"AACA,oBAAY,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhD,eAAO,MAAM,mBAAmB,QAAY,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,CAYtF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,OAAO,CAErG;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAClD,GAAG,GAAE,MAAmB,GACvB,UAAU,CAwCZ"}

98
node_modules/@sentry/utils/esm/ratelimit.js generated vendored Normal file
View File

@@ -0,0 +1,98 @@
import { __assign, __values } from "tslib";
export var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds
/**
* Extracts Retry-After value from the request header or returns default value
* @param header string representation of 'Retry-After' header
* @param now current unix timestamp
*
*/
export function parseRetryAfterHeader(header, now) {
if (now === void 0) { now = Date.now(); }
var headerDelay = parseInt("" + header, 10);
if (!isNaN(headerDelay)) {
return headerDelay * 1000;
}
var headerDate = Date.parse("" + header);
if (!isNaN(headerDate)) {
return headerDate - now;
}
return DEFAULT_RETRY_AFTER;
}
/**
* Gets the time that given category is disabled until for rate limiting
*/
export function disabledUntil(limits, category) {
return limits[category] || limits.all || 0;
}
/**
* Checks if a category is rate limited
*/
export function isRateLimited(limits, category, now) {
if (now === void 0) { now = Date.now(); }
return disabledUntil(limits, category) > now;
}
/**
* Update ratelimits from incoming headers.
* Returns true if headers contains a non-empty rate limiting header.
*/
export function updateRateLimits(limits, headers, now) {
var e_1, _a, e_2, _b;
if (now === void 0) { now = Date.now(); }
var updatedRateLimits = __assign({}, limits);
// "The name is case-insensitive."
// https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
var rateLimitHeader = headers['x-sentry-rate-limits'];
var retryAfterHeader = headers['retry-after'];
if (rateLimitHeader) {
try {
/**
* rate limit headers are of the form
* <header>,<header>,..
* where each <header> is of the form
* <retry_after>: <categories>: <scope>: <reason_code>
* where
* <retry_after> is a delay in seconds
* <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
* <category>;<category>;...
* <scope> is what's being limited (org, project, or key) - ignored by SDK
* <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
*/
for (var _c = __values(rateLimitHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {
var limit = _d.value;
var parameters = limit.split(':', 2);
var headerDelay = parseInt(parameters[0], 10);
var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
if (!parameters[1]) {
updatedRateLimits.all = now + delay;
}
else {
try {
for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {
var category = _f.value;
updatedRateLimits[category] = now + delay;
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
}
finally { if (e_2) throw e_2.error; }
}
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
}
else if (retryAfterHeader) {
updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
}
return updatedRateLimits;
}
//# sourceMappingURL=ratelimit.js.map

1
node_modules/@sentry/utils/esm/ratelimit.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

10
node_modules/@sentry/utils/esm/severity.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { Severity } from '@sentry/types';
import { SeverityLevel } from './enums';
/**
* Converts a string-based level into a {@link Severity}.
*
* @param level string representation of Severity
* @returns Severity
*/
export declare function severityFromString(level: SeverityLevel | string): Severity;
//# sourceMappingURL=severity.d.ts.map

1
node_modules/@sentry/utils/esm/severity.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/severity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAC;AAKxD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,QAAQ,CAM1E"}

20
node_modules/@sentry/utils/esm/severity.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { Severity } from '@sentry/types';
import { SeverityLevels } from './enums';
function isSupportedSeverity(level) {
return SeverityLevels.indexOf(level) !== -1;
}
/**
* Converts a string-based level into a {@link Severity}.
*
* @param level string representation of Severity
* @returns Severity
*/
export function severityFromString(level) {
if (level === 'warn')
return Severity.Warning;
if (isSupportedSeverity(level)) {
return level;
}
return Severity.Log;
}
//# sourceMappingURL=severity.js.map

1
node_modules/@sentry/utils/esm/severity.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"severity.js","sourceRoot":"","sources":["../../src/severity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAExD,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,cAAc,CAAC,OAAO,CAAC,KAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/D,CAAC;AACD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA6B;IAC9D,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC9C,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;QAC9B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC;AACtB,CAAC","sourcesContent":["import { Severity } from '@sentry/types';\n\nimport { SeverityLevel, SeverityLevels } from './enums';\n\nfunction isSupportedSeverity(level: string): level is Severity {\n return SeverityLevels.indexOf(level as SeverityLevel) !== -1;\n}\n/**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\nexport function severityFromString(level: SeverityLevel | string): Severity {\n if (level === 'warn') return Severity.Warning;\n if (isSupportedSeverity(level)) {\n return level;\n }\n return Severity.Log;\n}\n"]}

21
node_modules/@sentry/utils/esm/stacktrace.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { StackFrame } from '@sentry/types';
export declare type StackParser = (stack: string, skipFirst?: number) => StackFrame[];
export declare type StackLineParserFn = (line: string) => StackFrame | undefined;
export declare type StackLineParser = [number, StackLineParserFn];
/**
* Creates a stack parser with the supplied line parsers
*
* StackFrames are returned in the correct order for Sentry Exception
* frames and with Sentry SDK internal frames removed from the top and bottom
*
*/
export declare function createStackParser(...parsers: StackLineParser[]): StackParser;
/**
* @hidden
*/
export declare function stripSentryFramesAndReverse(stack: StackFrame[]): StackFrame[];
/**
* Safely extract function name from itself
*/
export declare function getFunctionName(fn: unknown): string;
//# sourceMappingURL=stacktrace.d.ts.map

1
node_modules/@sentry/utils/esm/stacktrace.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../../src/stacktrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,oBAAY,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,UAAU,EAAE,CAAC;AAC9E,oBAAY,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;AACzE,oBAAY,eAAe,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,WAAW,CAmB5E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CA6B7E;AAID;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,CAWnD"}

93
node_modules/@sentry/utils/esm/stacktrace.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
import { __assign, __values } from "tslib";
var STACKTRACE_LIMIT = 50;
/**
* Creates a stack parser with the supplied line parsers
*
* StackFrames are returned in the correct order for Sentry Exception
* frames and with Sentry SDK internal frames removed from the top and bottom
*
*/
export function createStackParser() {
var parsers = [];
for (var _i = 0; _i < arguments.length; _i++) {
parsers[_i] = arguments[_i];
}
var sortedParsers = parsers.sort(function (a, b) { return a[0] - b[0]; }).map(function (p) { return p[1]; });
return function (stack, skipFirst) {
var e_1, _a, e_2, _b;
if (skipFirst === void 0) { skipFirst = 0; }
var frames = [];
try {
for (var _c = __values(stack.split('\n').slice(skipFirst)), _d = _c.next(); !_d.done; _d = _c.next()) {
var line = _d.value;
try {
for (var sortedParsers_1 = (e_2 = void 0, __values(sortedParsers)), sortedParsers_1_1 = sortedParsers_1.next(); !sortedParsers_1_1.done; sortedParsers_1_1 = sortedParsers_1.next()) {
var parser = sortedParsers_1_1.value;
var frame = parser(line);
if (frame) {
frames.push(frame);
break;
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (sortedParsers_1_1 && !sortedParsers_1_1.done && (_b = sortedParsers_1.return)) _b.call(sortedParsers_1);
}
finally { if (e_2) throw e_2.error; }
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
return stripSentryFramesAndReverse(frames);
};
}
/**
* @hidden
*/
export function stripSentryFramesAndReverse(stack) {
if (!stack.length) {
return [];
}
var localStack = stack;
var firstFrameFunction = localStack[0].function || '';
var lastFrameFunction = localStack[localStack.length - 1].function || '';
// If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)
if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
localStack = localStack.slice(1);
}
// If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)
if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {
localStack = localStack.slice(0, -1);
}
// The frame where the crash happened, should be the last entry in the array
return localStack
.slice(0, STACKTRACE_LIMIT)
.map(function (frame) { return (__assign(__assign({}, frame), { filename: frame.filename || localStack[0].filename, function: frame.function || '?' })); })
.reverse();
}
var defaultFunctionName = '<anonymous>';
/**
* Safely extract function name from itself
*/
export function getFunctionName(fn) {
try {
if (!fn || typeof fn !== 'function') {
return defaultFunctionName;
}
return fn.name || defaultFunctionName;
}
catch (e) {
// Just accessing custom props in some Selenium environments
// can cause a "Permission denied" exception (see raven-js#495).
return defaultFunctionName;
}
}
//# sourceMappingURL=stacktrace.js.map

1
node_modules/@sentry/utils/esm/stacktrace.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../../src/stacktrace.ts"],"names":[],"mappings":";AAEA,IAAM,gBAAgB,GAAG,EAAE,CAAC;AAM5B;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB;IAAC,iBAA6B;SAA7B,UAA6B,EAA7B,qBAA6B,EAA7B,IAA6B;QAA7B,4BAA6B;;IAC7D,IAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAX,CAAW,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,CAAC,EAAJ,CAAI,CAAC,CAAC;IAEzE,OAAO,UAAC,KAAa,EAAE,SAAqB;;QAArB,0BAAA,EAAA,aAAqB;QAC1C,IAAM,MAAM,GAAiB,EAAE,CAAC;;YAEhC,KAAmB,IAAA,KAAA,SAAA,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA,gBAAA,4BAAE;gBAAlD,IAAM,IAAI,WAAA;;oBACb,KAAqB,IAAA,iCAAA,SAAA,aAAa,CAAA,CAAA,4CAAA,uEAAE;wBAA/B,IAAM,MAAM,0BAAA;wBACf,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;wBAE3B,IAAI,KAAK,EAAE;4BACT,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;4BACnB,MAAM;yBACP;qBACF;;;;;;;;;aACF;;;;;;;;;QAED,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAmB;IAC7D,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB,IAAM,kBAAkB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IACxD,IAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IAE3E,mHAAmH;IACnH,IAAI,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;QAChH,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClC;IAED,+HAA+H;IAC/H,IAAI,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE;QACrD,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACtC;IAED,4EAA4E;IAC5E,OAAO,UAAU;SACd,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC;SAC1B,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,uBACT,KAAK,KACR,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAClD,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,GAAG,IAC/B,EAJY,CAIZ,CAAC;SACF,OAAO,EAAE,CAAC;AACf,CAAC;AAED,IAAM,mBAAmB,GAAG,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,EAAW;IACzC,IAAI;QACF,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;YACnC,OAAO,mBAAmB,CAAC;SAC5B;QACD,OAAO,EAAE,CAAC,IAAI,IAAI,mBAAmB,CAAC;KACvC;IAAC,OAAO,CAAC,EAAE;QACV,4DAA4D;QAC5D,gEAAgE;QAChE,OAAO,mBAAmB,CAAC;KAC5B;AACH,CAAC","sourcesContent":["import { StackFrame } from '@sentry/types';\n\nconst STACKTRACE_LIMIT = 50;\n\nexport type StackParser = (stack: string, skipFirst?: number) => StackFrame[];\nexport type StackLineParserFn = (line: string) => StackFrame | undefined;\nexport type StackLineParser = [number, StackLineParserFn];\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack: string, skipFirst: number = 0): StackFrame[] => {\n const frames: StackFrame[] = [];\n\n for (const line of stack.split('\\n').slice(skipFirst)) {\n for (const parser of sortedParsers) {\n const frame = parser(line);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: StackFrame[]): StackFrame[] {\n if (!stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].function || '';\n const lastFrameFunction = localStack[localStack.length - 1].function || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(frame => ({\n ...frame,\n filename: frame.filename || localStack[0].filename,\n function: frame.function || '?',\n }))\n .reverse();\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n"]}

Some files were not shown because too many files have changed in this diff Show More