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

29
node_modules/@sentry/utils/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2019, Sentry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

24
node_modules/@sentry/utils/README.md generated vendored Normal file
View File

@@ -0,0 +1,24 @@
<p align="center">
<a href="https://sentry.io" target="_blank" align="center">
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
</a>
<br />
</p>
# Sentry JavaScript SDK Utilities
[![npm version](https://img.shields.io/npm/v/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
[![npm dm](https://img.shields.io/npm/dm/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
[![npm dt](https://img.shields.io/npm/dt/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
## Links
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
## General
Common utilities used by the Sentry JavaScript SDKs. **Warning, only submodule imports are allowed here.** Also note,
this function shouldn't be used externally, we will break them from time to time. This package is not part of our public
API contract, we use them only internally.

6
node_modules/@sentry/utils/dist/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/dist/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"}

15
node_modules/@sentry/utils/dist/async.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 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
function forget(promise) {
void promise.then(null, function (e) {
// TODO: Use a better logging mechanism
// eslint-disable-next-line no-console
console.error(e);
});
}
exports.forget = forget;
//# sourceMappingURL=async.js.map

1
node_modules/@sentry/utils/dist/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,SAAgB,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;AAND,wBAMC","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/dist/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/dist/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"}

108
node_modules/@sentry/utils/dist/browser.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
Object.defineProperty(exports, "__esModule", { value: true });
var global_1 = require("./global");
var is_1 = require("./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
*/
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>';
}
}
exports.htmlTreeAsString = htmlTreeAsString;
/**
* 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 && is_1.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
*/
function getLocationHref() {
var global = global_1.getGlobalObject();
try {
return global.document.location.href;
}
catch (oO) {
return '';
}
}
exports.getLocationHref = getLocationHref;
//# sourceMappingURL=browser.js.map

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

File diff suppressed because one or more lines are too long

8
node_modules/@sentry/utils/dist/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

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"}

20
node_modules/@sentry/utils/dist/clientreport.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
Object.defineProperty(exports, "__esModule", { value: true });
var envelope_1 = require("./envelope");
var time_1 = require("./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.
*/
function createClientReportEnvelope(discarded_events, dsn, timestamp) {
var clientReportItem = [
{ type: 'client_report' },
{
timestamp: timestamp || time_1.dateTimestampInSeconds(),
discarded_events: discarded_events,
},
];
return envelope_1.createEnvelope(dsn ? { dsn: dsn } : {}, [clientReportItem]);
}
exports.createClientReportEnvelope = createClientReportEnvelope;
//# sourceMappingURL=clientreport.js.map

1
node_modules/@sentry/utils/dist/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,uCAA4C;AAC5C,+BAAgD;AAEhD;;;;GAIG;AACH,SAAgB,0BAA0B,CACxC,gBAAkD,EAClD,GAAY,EACZ,SAAkB;IAElB,IAAM,gBAAgB,GAAqB;QACzC,EAAE,IAAI,EAAE,eAAe,EAAE;QACzB;YACE,SAAS,EAAE,SAAS,IAAI,6BAAsB,EAAE;YAChD,gBAAgB,kBAAA;SACjB;KACF,CAAC;IACF,OAAO,yBAAc,CAAuB,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACtF,CAAC;AAbD,gEAaC","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/dist/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/dist/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"}

92
node_modules/@sentry/utils/dist/dsn.js generated vendored Normal file
View File

@@ -0,0 +1,92 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var error_1 = require("./error");
var flags_1 = require("./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.
*/
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));
}
exports.dsnToString = dsnToString;
function dsnFromString(str) {
var match = DSN_REGEX.exec(str);
if (!match) {
throw new error_1.SentryError("Invalid Sentry Dsn: " + str);
}
var _a = tslib_1.__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 (!flags_1.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 error_1.SentryError("Invalid Sentry Dsn: " + component + " missing");
}
});
if (!projectId.match(/^\d+$/)) {
throw new error_1.SentryError("Invalid Sentry Dsn: Invalid projectId " + projectId);
}
if (!isValidProtocol(protocol)) {
throw new error_1.SentryError("Invalid Sentry Dsn: Invalid protocol " + protocol);
}
if (port && isNaN(parseInt(port, 10))) {
throw new error_1.SentryError("Invalid Sentry Dsn: Invalid port " + port);
}
return true;
}
/** The Sentry Dsn, identifying a Sentry instance and project. */
function makeDsn(from) {
var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
validateDsn(components);
return components;
}
exports.makeDsn = makeDsn;
//# sourceMappingURL=dsn.js.map

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

File diff suppressed because one or more lines are too long

3
node_modules/@sentry/utils/dist/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/dist/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"}

3
node_modules/@sentry/utils/dist/enums.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
//# sourceMappingURL=enums.js.map

1
node_modules/@sentry/utils/dist/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,QAAA,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/dist/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/dist/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"}

25
node_modules/@sentry/utils/dist/env.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
/*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Figures out if we're building a browser bundle.
*
* @returns true if this is a browser bundle build.
*/
function isBrowserBundle() {
return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
}
exports.isBrowserBundle = isBrowserBundle;
//# sourceMappingURL=env.js.map

1
node_modules/@sentry/utils/dist/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,SAAgB,eAAe;IAC7B,OAAO,OAAO,yBAAyB,KAAK,WAAW,IAAI,CAAC,CAAC,yBAAyB,CAAC;AACzF,CAAC;AAFD,0CAEC","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/dist/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/dist/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"}

51
node_modules/@sentry/utils/dist/envelope.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var is_1 = require("./is");
/**
* Creates an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
function createEnvelope(headers, items) {
if (items === void 0) { items = []; }
return [headers, items];
}
exports.createEnvelope = createEnvelope;
/**
* Add an item to an envelope.
* Make sure to always explicitly provide the generic to this function
* so that the envelope types resolve correctly.
*/
function addItemToEnvelope(envelope, newItem) {
var _a = tslib_1.__read(envelope, 2), headers = _a[0], items = _a[1];
return [headers, tslib_1.__spread(items, [newItem])];
}
exports.addItemToEnvelope = addItemToEnvelope;
/**
* Get the type of the envelope. Grabs the type from the first envelope item.
*/
function getEnvelopeType(envelope) {
var _a = tslib_1.__read(envelope, 2), _b = tslib_1.__read(_a[1], 1), _c = tslib_1.__read(_b[0], 1), firstItemHeader = _c[0];
return firstItemHeader.type;
}
exports.getEnvelopeType = getEnvelopeType;
/**
* Serializes an envelope into a string.
*/
function serializeEnvelope(envelope) {
var _a = tslib_1.__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 = tslib_1.__read(item, 2), itemHeaders = _a[0], payload = _a[1];
// We do not serialize payloads that are primitives
var serializedPayload = is_1.isPrimitive(payload) ? String(payload) : JSON.stringify(payload);
return acc + "\n" + JSON.stringify(itemHeaders) + "\n" + serializedPayload;
}, serializedHeaders);
}
exports.serializeEnvelope = serializeEnvelope;
//# sourceMappingURL=envelope.js.map

1
node_modules/@sentry/utils/dist/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,2BAAmC;AAEnC;;;;GAIG;AACH,SAAgB,cAAc,CAAqB,OAAa,EAAE,KAAgB;IAAhB,sBAAA,EAAA,UAAgB;IAChF,OAAO,CAAC,OAAO,EAAE,KAAK,CAAM,CAAC;AAC/B,CAAC;AAFD,wCAEC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAqB,QAAW,EAAE,OAAqB;IAChF,IAAA,gCAA2B,EAA1B,eAAO,EAAE,aAAiB,CAAC;IAClC,OAAO,CAAC,OAAO,mBAAM,KAAK,GAAE,OAAO,GAAO,CAAC;AAC7C,CAAC;AAHD,8CAGC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAqB,QAAW;IACvD,IAAA,gCAAkC,EAA/B,6BAAmB,EAAlB,6BAAiB,EAAhB,uBAA6B,CAAC;IACzC,OAAO,eAAe,CAAC,IAAI,CAAC;AAC9B,CAAC;AAHD,0CAGC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,QAAkB;IAC5C,IAAA,gCAA2B,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,4BAA6B,EAA5B,mBAAW,EAAE,eAAe,CAAC;QACpC,mDAAmD;QACnD,IAAM,iBAAiB,GAAG,gBAAW,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;AAfD,8CAeC","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/dist/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/dist/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"}

18
node_modules/@sentry/utils/dist/error.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var polyfill_1 = require("./polyfill");
/** An error emitted by Sentry SDKs and related utilities. */
var SentryError = /** @class */ (function (_super) {
tslib_1.__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;
polyfill_1.setPrototypeOf(_this, _newTarget.prototype);
return _this;
}
return SentryError;
}(Error));
exports.SentryError = SentryError;
//# sourceMappingURL=error.js.map

1
node_modules/@sentry/utils/dist/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,uCAA4C;AAE5C,6DAA6D;AAC7D;IAAiC,uCAAK;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,yBAAc,CAAC,KAAI,EAAE,WAAW,SAAS,CAAC,CAAC;;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAVD,CAAiC,KAAK,GAUrC;AAVY,kCAAW","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/dist/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/dist/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"}

17
node_modules/@sentry/utils/dist/flags.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
/*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/** Flag that is true for debug builds, false otherwise. */
exports.IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
//# sourceMappingURL=flags.js.map

1
node_modules/@sentry/utils/dist/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;AAC9C,QAAA,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/dist/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/dist/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"}

41
node_modules/@sentry/utils/dist/global.js 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var node_1 = require("./node");
var fallbackGlobalObject = {};
/**
* Safely get global scope object
*
* @returns Global scope object
*/
function getGlobalObject() {
return (node_1.isNodeEnv()
? global
: typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
? window // eslint-disable-line no-restricted-globals
: typeof self !== 'undefined'
? self
: fallbackGlobalObject);
}
exports.getGlobalObject = getGlobalObject;
/**
* 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
*/
function getGlobalSingleton(name, creator, obj) {
var global = (obj || getGlobalObject());
var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});
var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
return singleton;
}
exports.getGlobalSingleton = getGlobalSingleton;
//# sourceMappingURL=global.js.map

1
node_modules/@sentry/utils/dist/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,+BAAmC;AAmBnC,IAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC;;;;GAIG;AACH,SAAgB,eAAe;IAC7B,OAAO,CACL,gBAAS,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;AAVD,0CAUC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,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;AALD,gDAKC","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/dist/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/dist/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"}

31
node_modules/@sentry/utils/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./async"), exports);
tslib_1.__exportStar(require("./browser"), exports);
tslib_1.__exportStar(require("./dsn"), exports);
tslib_1.__exportStar(require("./enums"), exports);
tslib_1.__exportStar(require("./error"), exports);
tslib_1.__exportStar(require("./global"), exports);
tslib_1.__exportStar(require("./instrument"), exports);
tslib_1.__exportStar(require("./is"), exports);
tslib_1.__exportStar(require("./logger"), exports);
tslib_1.__exportStar(require("./memo"), exports);
tslib_1.__exportStar(require("./misc"), exports);
tslib_1.__exportStar(require("./node"), exports);
tslib_1.__exportStar(require("./normalize"), exports);
tslib_1.__exportStar(require("./object"), exports);
tslib_1.__exportStar(require("./path"), exports);
tslib_1.__exportStar(require("./promisebuffer"), exports);
tslib_1.__exportStar(require("./severity"), exports);
tslib_1.__exportStar(require("./stacktrace"), exports);
tslib_1.__exportStar(require("./status"), exports);
tslib_1.__exportStar(require("./string"), exports);
tslib_1.__exportStar(require("./supports"), exports);
tslib_1.__exportStar(require("./syncpromise"), exports);
tslib_1.__exportStar(require("./time"), exports);
tslib_1.__exportStar(require("./tracing"), exports);
tslib_1.__exportStar(require("./env"), exports);
tslib_1.__exportStar(require("./envelope"), exports);
tslib_1.__exportStar(require("./clientreport"), exports);
tslib_1.__exportStar(require("./ratelimit"), exports);
//# sourceMappingURL=index.js.map

1
node_modules/@sentry/utils/dist/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,kDAAwB;AACxB,oDAA0B;AAC1B,gDAAsB;AACtB,kDAAwB;AACxB,kDAAwB;AACxB,mDAAyB;AACzB,uDAA6B;AAC7B,+CAAqB;AACrB,mDAAyB;AACzB,iDAAuB;AACvB,iDAAuB;AACvB,iDAAuB;AACvB,sDAA4B;AAC5B,mDAAyB;AACzB,iDAAuB;AACvB,0DAAgC;AAChC,qDAA2B;AAC3B,uDAA6B;AAC7B,mDAAyB;AACzB,mDAAyB;AACzB,qDAA2B;AAC3B,wDAA8B;AAC9B,iDAAuB;AACvB,oDAA0B;AAC1B,gDAAsB;AACtB,qDAA2B;AAC3B,yDAA+B;AAC/B,sDAA4B","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/dist/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/dist/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"}

526
node_modules/@sentry/utils/dist/instrument.js generated vendored Normal file
View File

@@ -0,0 +1,526 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var flags_1 = require("./flags");
var global_1 = require("./global");
var is_1 = require("./is");
var logger_1 = require("./logger");
var object_1 = require("./object");
var stacktrace_1 = require("./stacktrace");
var supports_1 = require("./supports");
var global = global_1.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:
flags_1.IS_DEBUG_BUILD && logger_1.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
*/
function addInstrumentationHandler(type, callback) {
handlers[type] = handlers[type] || [];
handlers[type].push(callback);
instrument(type);
}
exports.addInstrumentationHandler = addInstrumentationHandler;
/** JSDoc */
function triggerHandlers(type, data) {
var e_1, _a;
if (!type || !handlers[type]) {
return;
}
try {
for (var _b = tslib_1.__values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {
var handler = _c.value;
try {
handler(data);
}
catch (e) {
flags_1.IS_DEBUG_BUILD &&
logger_1.logger.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + stacktrace_1.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;
}
logger_1.CONSOLE_LEVELS.forEach(function (level) {
if (!(level in global.console)) {
return;
}
object_1.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 (!supports_1.supportsNativeFetch()) {
return;
}
object_1.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', tslib_1.__assign({}, handlerData));
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return originalFetch.apply(global, args).then(function (response) {
triggerHandlers('fetch', tslib_1.__assign(tslib_1.__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));
return response;
}, function (error) {
triggerHandlers('fetch', tslib_1.__assign(tslib_1.__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 && is_1.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 && is_1.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;
object_1.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: is_1.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 (is_1.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') {
object_1.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);
};
});
object_1.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 (!supports_1.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);
};
}
object_1.fill(global.history, 'pushState', historyReplacementFunction);
object_1.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;
}
object_1.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);
};
});
object_1.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/dist/instrument.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

112
node_modules/@sentry/utils/dist/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/dist/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"}

174
node_modules/@sentry/utils/dist/is.js generated vendored Normal file
View File

@@ -0,0 +1,174 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
Object.defineProperty(exports, "__esModule", { value: true });
// 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.
*/
function isError(wat) {
switch (objectToString.call(wat)) {
case '[object Error]':
case '[object Exception]':
case '[object DOMException]':
return true;
default:
return isInstanceOf(wat, Error);
}
}
exports.isError = isError;
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.
*/
function isErrorEvent(wat) {
return isBuiltin(wat, 'ErrorEvent');
}
exports.isErrorEvent = isErrorEvent;
/**
* Checks whether given value's type is DOMError
* {@link isDOMError}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isDOMError(wat) {
return isBuiltin(wat, 'DOMError');
}
exports.isDOMError = isDOMError;
/**
* Checks whether given value's type is DOMException
* {@link isDOMException}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isDOMException(wat) {
return isBuiltin(wat, 'DOMException');
}
exports.isDOMException = isDOMException;
/**
* Checks whether given value's type is a string
* {@link isString}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isString(wat) {
return isBuiltin(wat, 'String');
}
exports.isString = isString;
/**
* 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.
*/
function isPrimitive(wat) {
return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
}
exports.isPrimitive = isPrimitive;
/**
* 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.
*/
function isPlainObject(wat) {
return isBuiltin(wat, 'Object');
}
exports.isPlainObject = isPlainObject;
/**
* 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.
*/
function isEvent(wat) {
return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
}
exports.isEvent = isEvent;
/**
* 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.
*/
function isElement(wat) {
return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
}
exports.isElement = isElement;
/**
* Checks whether given value's type is an regexp
* {@link isRegExp}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isRegExp(wat) {
return isBuiltin(wat, 'RegExp');
}
exports.isRegExp = isRegExp;
/**
* Checks whether given value has a then function.
* @param wat A value to be checked.
*/
function isThenable(wat) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return Boolean(wat && wat.then && typeof wat.then === 'function');
}
exports.isThenable = isThenable;
/**
* Checks whether given value's type is a SyntheticEvent
* {@link isSyntheticEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isSyntheticEvent(wat) {
return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
}
exports.isSyntheticEvent = isSyntheticEvent;
/**
* Checks whether given value is NaN
* {@link isNaN}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isNaN(wat) {
return typeof wat === 'number' && wat !== wat;
}
exports.isNaN = isNaN;
/**
* 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.
*/
function isInstanceOf(wat, base) {
try {
return wat instanceof base;
}
catch (_e) {
return false;
}
}
exports.isInstanceOf = isInstanceOf;
//# sourceMappingURL=is.js.map

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

File diff suppressed because one or more lines are too long

18
node_modules/@sentry/utils/dist/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/dist/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"}

86
node_modules/@sentry/utils/dist/logger.js generated vendored Normal file
View File

@@ -0,0 +1,86 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var flags_1 = require("./flags");
var global_1 = require("./global");
// TODO: Implement different loggers for different environments
var global = global_1.getGlobalObject();
/** Prefix for logging strings */
var PREFIX = 'Sentry Logger ';
exports.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
*/
function consoleSandbox(callback) {
var global = global_1.getGlobalObject();
if (!('console' in global)) {
return callback();
}
var originalConsole = global.console;
var wrappedLevels = {};
// Restore all wrapped console methods
exports.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];
});
}
}
exports.consoleSandbox = consoleSandbox;
function makeLogger() {
var enabled = false;
var logger = {
enable: function () {
enabled = true;
},
disable: function () {
enabled = false;
},
};
if (flags_1.IS_DEBUG_BUILD) {
exports.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, tslib_1.__spread([PREFIX + "[" + name + "]:"], args));
});
}
};
});
}
else {
exports.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;
exports.logger = logger;
if (flags_1.IS_DEBUG_BUILD) {
exports.logger = logger = global_1.getGlobalSingleton('logger', makeLogger);
}
else {
exports.logger = logger = makeLogger();
}
//# sourceMappingURL=logger.js.map

1
node_modules/@sentry/utils/dist/logger.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";;AAEA,iCAAyC;AACzC,mCAA+D;AAE/D,+DAA+D;AAC/D,IAAM,MAAM,GAAG,wBAAe,EAA0B,CAAC;AAEzD,iCAAiC;AACjC,IAAM,MAAM,GAAG,gBAAgB,CAAC;AAEnB,QAAA,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAW3F;;;;;GAKG;AACH,SAAgB,cAAc,CAAI,QAAiB;IACjD,IAAM,MAAM,GAAG,wBAAe,EAAU,CAAC;IAEzC,IAAI,CAAC,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE;QAC1B,OAAO,QAAQ,EAAE,CAAC;KACnB;IAED,IAAM,eAAe,GAAG,MAAM,CAAC,OAA4C,CAAC;IAC5E,IAAM,aAAa,GAAkC,EAAE,CAAC;IAExD,sCAAsC;IACtC,sBAAc,CAAC,OAAO,CAAC,UAAA,KAAK;QAC1B,6DAA6D;QAC7D,IAAM,mBAAmB,GACvB,eAAe,CAAC,KAAK,CAAC,IAAK,eAAe,CAAC,KAAK,CAAqB,CAAC,mBAAmB,CAAC;QAC5F,IAAI,KAAK,IAAI,MAAM,CAAC,OAAO,IAAI,mBAAmB,EAAE;YAClD,aAAa,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,KAAK,CAAuC,CAAC;YACpF,eAAe,CAAC,KAAK,CAAC,GAAG,mBAA4C,CAAC;SACvE;IACH,CAAC,CAAC,CAAC;IAEH,IAAI;QACF,OAAO,QAAQ,EAAE,CAAC;KACnB;YAAS;QACR,sCAAsC;QACtC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,UAAA,KAAK;YACtC,eAAe,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,KAAsC,CAAC,CAAC;QACjF,CAAC,CAAC,CAAC;KACJ;AACH,CAAC;AA7BD,wCA6BC;AAED,SAAS,UAAU;IACjB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAM,MAAM,GAAoB;QAC9B,MAAM,EAAE;YACN,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QACD,OAAO,EAAE;YACP,OAAO,GAAG,KAAK,CAAC;QAClB,CAAC;KACF,CAAC;IAEF,IAAI,sBAAc,EAAE;QAClB,sBAAc,CAAC,OAAO,CAAC,UAAA,IAAI;YACzB,8DAA8D;YAC9D,MAAM,CAAC,IAAI,CAAC,GAAG;gBAAC,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBAC5B,IAAI,OAAO,EAAE;oBACX,cAAc,CAAC;;wBACb,CAAA,KAAA,MAAM,CAAC,OAAO,CAAA,CAAC,IAAI,CAAC,6BAAI,MAAM,SAAI,IAAI,OAAI,GAAK,IAAI,GAAE;oBACvD,CAAC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,sBAAc,CAAC,OAAO,CAAC,UAAA,IAAI;YACzB,MAAM,CAAC,IAAI,CAAC,GAAG,cAAM,OAAA,SAAS,EAAT,CAAS,CAAC;QACjC,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,MAAgB,CAAC;AAC1B,CAAC;AAED,0GAA0G;AAC1G,IAAI,MAAc,CAAC;AAOV,wBAAM;AANf,IAAI,sBAAc,EAAE;IAClB,iBAAA,MAAM,GAAG,2BAAkB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;CACnD;KAAM;IACL,iBAAA,MAAM,GAAG,UAAU,EAAE,CAAC;CACvB","sourcesContent":["import { WrappedFunction } from '@sentry/types';\n\nimport { IS_DEBUG_BUILD } from './flags';\nimport { getGlobalObject, getGlobalSingleton } from './global';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject<Window | NodeJS.Global>();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'] as const;\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record<typeof CONSOLE_LEVELS[number], LoggerMethod>;\n\n/** JSDoc */\ninterface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n const global = getGlobalObject<Window>();\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as Console & Record<string, unknown>;\n const wrappedLevels: Partial<LoggerConsoleMethods> = {};\n\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(level => {\n // TODO(v7): Remove this check as it's only needed for Node 6\n const originalWrappedFunc =\n originalConsole[level] && (originalConsole[level] as WrappedFunction).__sentry_original__;\n if (level in global.console && originalWrappedFunc) {\n wrappedLevels[level] = originalConsole[level] as LoggerConsoleMethods[typeof level];\n originalConsole[level] = originalWrappedFunc as Console[typeof level];\n }\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level as typeof CONSOLE_LEVELS[number]];\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial<Logger> = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n };\n\n if (IS_DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args: any[]) => {\n if (enabled) {\n consoleSandbox(() => {\n global.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nlet logger: Logger;\nif (IS_DEBUG_BUILD) {\n logger = getGlobalSingleton('logger', makeLogger);\n} else {\n logger = makeLogger();\n}\n\nexport { logger };\n"]}

6
node_modules/@sentry/utils/dist/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/dist/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"}

44
node_modules/@sentry/utils/dist/memo.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Helper to decycle json objects
*/
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];
}
exports.memoBuilder = memoBuilder;
//# sourceMappingURL=memo.js.map

1
node_modules/@sentry/utils/dist/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,SAAgB,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;AAnCD,kCAmCC","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/dist/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/dist/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"}

220
node_modules/@sentry/utils/dist/misc.js generated vendored Normal file
View File

@@ -0,0 +1,220 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var global_1 = require("./global");
var object_1 = require("./object");
var string_1 = require("./string");
/**
* UUID4 generator
*
* @returns string Generated UUID4.
*/
function uuid4() {
var global = global_1.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);
});
}
exports.uuid4 = uuid4;
/**
* 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
*/
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,
};
}
exports.parseUrl = parseUrl;
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
*/
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>';
}
exports.getEventDescription = getEventDescription;
/**
* 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
*/
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';
}
}
exports.addExceptionTypeValue = addExceptionTypeValue;
/**
* 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
*/
function addExceptionMechanism(event, newMechanism) {
var firstException = getFirstException(event);
if (!firstException) {
return;
}
var defaultMechanism = { type: 'generic', handled: true };
var currentMechanism = firstException.mechanism;
firstException.mechanism = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, defaultMechanism), currentMechanism), newMechanism);
if (newMechanism && 'data' in newMechanism) {
var mergedData = tslib_1.__assign(tslib_1.__assign({}, (currentMechanism && currentMechanism.data)), newMechanism.data);
firstException.mechanism.data = mergedData;
}
}
exports.addExceptionMechanism = addExceptionMechanism;
// 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
*/
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],
};
}
exports.parseSemver = parseSemver;
/**
* 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
*/
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 string_1.snipLine(line, 0); });
frame.context_line = string_1.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 string_1.snipLine(line, 0); });
}
exports.addContextToFrame = addContextToFrame;
/**
* 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
*/
function stripUrlQueryAndFragment(urlPath) {
// eslint-disable-next-line no-useless-escape
return urlPath.split(/[\?#]/, 1)[0];
}
exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment;
/**
* 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)
*/
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
object_1.addNonEnumerableProperty(exception, '__sentry_captured__', true);
}
catch (err) {
// `exception` is a primitive, so we can't mark it seen
}
return false;
}
exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught;
//# sourceMappingURL=misc.js.map

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

File diff suppressed because one or more lines are too long

31
node_modules/@sentry/utils/dist/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/dist/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"}

61
node_modules/@sentry/utils/dist/node.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var env_1 = require("./env");
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
function isNodeEnv() {
// explicitly check for browser bundles as those can be optimized statically
// by terser/rollup.
return (!env_1.isBrowserBundle() &&
Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');
}
exports.isNodeEnv = isNodeEnv;
/**
* 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
function dynamicRequire(mod, request) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return mod.require(request);
}
exports.dynamicRequire = dynamicRequire;
/**
* 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
*/
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;
}
exports.loadModule = loadModule;
//# sourceMappingURL=node.js.map

1
node_modules/@sentry/utils/dist/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,6BAAwC;AAExC;;;;GAIG;AACH,SAAgB,SAAS;IACvB,4EAA4E;IAC5E,oBAAoB;IACpB,OAAO,CACL,CAAC,qBAAe,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;AAPD,8BAOC;AAED;;;;GAIG;AACH,iHAAiH;AACjH,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAe;IACtD,sEAAsE;IACtE,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAHD,wCAGC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,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;AAjBD,gCAiBC","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/dist/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/dist/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"}

197
node_modules/@sentry/utils/dist/normalize.js generated vendored Normal file
View File

@@ -0,0 +1,197 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var is_1 = require("./is");
var memo_1 = require("./memo");
var object_1 = require("./object");
var stacktrace_1 = require("./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.
*/
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 + ")" };
}
}
exports.normalize = normalize;
/** JSDoc */
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;
}
exports.normalizeToSize = normalizeToSize;
/**
* 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 = memo_1.memoBuilder(); }
var _a = tslib_1.__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) && !is_1.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 = (is_1.isError(value) || is_1.isEvent(value) ? object_1.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;
}
exports.walk = visit;
/**
* 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 (is_1.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: " + stacktrace_1.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/dist/normalize.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

81
node_modules/@sentry/utils/dist/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/dist/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"}

223
node_modules/@sentry/utils/dist/object.js generated vendored Normal file
View File

@@ -0,0 +1,223 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var browser_1 = require("./browser");
var is_1 = require("./is");
var string_1 = require("./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
*/
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;
}
exports.fill = fill;
/**
* 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
*/
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,
});
}
exports.addNonEnumerableProperty = addNonEnumerableProperty;
/**
* 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
*/
function markFunctionWrapped(wrapped, original) {
var proto = original.prototype || {};
wrapped.prototype = original.prototype = proto;
addNonEnumerableProperty(wrapped, '__sentry_original__', original);
}
exports.markFunctionWrapped = markFunctionWrapped;
/**
* 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.
*/
function getOriginalFunction(func) {
return func.__sentry_original__;
}
exports.getOriginalFunction = getOriginalFunction;
/**
* Encodes given object into url-friendly format
*
* @param object An object that contains serializable values
* @returns string Encoded
*/
function urlEncode(object) {
return Object.keys(object)
.map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); })
.join('&');
}
exports.urlEncode = urlEncode;
/**
* 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
*/
function convertToPlainObject(value) {
var newObj = value;
if (is_1.isError(value)) {
newObj = tslib_1.__assign({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));
}
else if (is_1.isEvent(value)) {
var event_1 = value;
newObj = tslib_1.__assign({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));
if (typeof CustomEvent !== 'undefined' && is_1.isInstanceOf(value, CustomEvent)) {
newObj.detail = event_1.detail;
}
}
return newObj;
}
exports.convertToPlainObject = convertToPlainObject;
/** Creates a string representation of the target of an `Event` object */
function serializeEventTarget(target) {
try {
return is_1.isElement(target) ? browser_1.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
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 string_1.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 string_1.truncate(serialized, maxLength);
}
return '';
}
exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage;
/**
* Given any object, return the new object with removed keys that value was `undefined`.
* Works recursively on objects and arrays.
*/
function dropUndefinedKeys(val) {
var e_1, _a;
if (is_1.isPlainObject(val)) {
var rv = {};
try {
for (var _b = tslib_1.__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;
}
exports.dropUndefinedKeys = dropUndefinedKeys;
/**
* 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
*/
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 is_1.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;
}
exports.objectify = objectify;
//# sourceMappingURL=object.js.map

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

File diff suppressed because one or more lines are too long

15
node_modules/@sentry/utils/dist/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/dist/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"}

170
node_modules/@sentry/utils/dist/path.js generated vendored Normal file
View File

@@ -0,0 +1,170 @@
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
Object.defineProperty(exports, "__esModule", { value: true });
/** 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 */
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 || '.';
}
exports.resolve = resolve;
/** 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 */
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('/');
}
exports.relative = relative;
// path.normalize(path)
// posix version
/** JSDoc */
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;
}
exports.normalizePath = normalizePath;
// posix version
/** JSDoc */
function isAbsolute(path) {
return path.charAt(0) === '/';
}
exports.isAbsolute = isAbsolute;
// posix version
/** JSDoc */
function join() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return normalizePath(args.join('/'));
}
exports.join = join;
/** JSDoc */
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;
}
exports.dirname = dirname;
/** JSDoc */
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;
}
exports.basename = basename;
//# sourceMappingURL=path.js.map

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

File diff suppressed because one or more lines are too long

2
node_modules/@sentry/utils/dist/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/dist/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"}

25
node_modules/@sentry/utils/dist/polyfill.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.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/dist/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,QAAA,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/dist/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"}

93
node_modules/@sentry/utils/dist/promisebuffer.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
Object.defineProperty(exports, "__esModule", { value: true });
var error_1 = require("./error");
var syncpromise_1 = require("./syncpromise");
/**
* Creates an new PromiseBuffer object with the specified limit
* @param limit max number of promises that can be stored in the buffer
*/
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 syncpromise_1.rejectedSyncPromise(new error_1.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_1.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 syncpromise_1.resolvedSyncPromise(item).then(function () {
// eslint-disable-next-line no-plusplus
if (!--counter) {
clearTimeout(capturedSetTimeout);
resolve(true);
}
}, reject);
});
});
}
return {
$: buffer,
add: add,
drain: drain,
};
}
exports.makePromiseBuffer = makePromiseBuffer;
//# sourceMappingURL=promisebuffer.js.map

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

File diff suppressed because one or more lines are too long

23
node_modules/@sentry/utils/dist/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/dist/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"}

103
node_modules/@sentry/utils/dist/ratelimit.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
exports.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
*
*/
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 exports.DEFAULT_RETRY_AFTER;
}
exports.parseRetryAfterHeader = parseRetryAfterHeader;
/**
* Gets the time that given category is disabled until for rate limiting
*/
function disabledUntil(limits, category) {
return limits[category] || limits.all || 0;
}
exports.disabledUntil = disabledUntil;
/**
* Checks if a category is rate limited
*/
function isRateLimited(limits, category, now) {
if (now === void 0) { now = Date.now(); }
return disabledUntil(limits, category) > now;
}
exports.isRateLimited = isRateLimited;
/**
* Update ratelimits from incoming headers.
* Returns true if headers contains a non-empty rate limiting header.
*/
function updateRateLimits(limits, headers, now) {
var e_1, _a, e_2, _b;
if (now === void 0) { now = Date.now(); }
var updatedRateLimits = tslib_1.__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 = tslib_1.__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, tslib_1.__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;
}
exports.updateRateLimits = updateRateLimits;
//# sourceMappingURL=ratelimit.js.map

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

File diff suppressed because one or more lines are too long

10
node_modules/@sentry/utils/dist/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/dist/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"}

22
node_modules/@sentry/utils/dist/severity.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Object.defineProperty(exports, "__esModule", { value: true });
var types_1 = require("@sentry/types");
var enums_1 = require("./enums");
function isSupportedSeverity(level) {
return enums_1.SeverityLevels.indexOf(level) !== -1;
}
/**
* Converts a string-based level into a {@link Severity}.
*
* @param level string representation of Severity
* @returns Severity
*/
function severityFromString(level) {
if (level === 'warn')
return types_1.Severity.Warning;
if (isSupportedSeverity(level)) {
return level;
}
return types_1.Severity.Log;
}
exports.severityFromString = severityFromString;
//# sourceMappingURL=severity.js.map

1
node_modules/@sentry/utils/dist/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,uCAAyC;AAEzC,iCAAwD;AAExD,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,sBAAc,CAAC,OAAO,CAAC,KAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/D,CAAC;AACD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,KAA6B;IAC9D,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,gBAAQ,CAAC,OAAO,CAAC;IAC9C,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;QAC9B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,gBAAQ,CAAC,GAAG,CAAC;AACtB,CAAC;AAND,gDAMC","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/dist/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/dist/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"}

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