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/hub/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.

22
node_modules/@sentry/hub/README.md generated vendored Normal file
View File

@@ -0,0 +1,22 @@
<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 Hub
[![npm version](https://img.shields.io/npm/v/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
[![npm dm](https://img.shields.io/npm/dm/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
[![npm dt](https://img.shields.io/npm/dt/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
[![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
This package provides the `Hub` and `Scope` for all JavaScript related SDKs.

3
node_modules/@sentry/hub/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/hub/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/hub/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/hub/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"]}

244
node_modules/@sentry/hub/dist/hub.d.ts generated vendored Normal file
View File

@@ -0,0 +1,244 @@
import { Breadcrumb, BreadcrumbHint, Client, CustomSamplingContext, Event, EventHint, Extra, Extras, Hub as HubInterface, Integration, IntegrationClass, Primitive, SessionContext, Severity, Span, SpanContext, Transaction, TransactionContext, User } from '@sentry/types';
import { Scope } from './scope';
import { Session } from './session';
/**
* API compatibility version of this hub.
*
* WARNING: This number should only be increased when the global interface
* changes and new methods are introduced.
*
* @hidden
*/
export declare const API_VERSION = 4;
/**
* A layer in the process stack.
* @hidden
*/
export interface Layer {
client?: Client;
scope?: Scope;
}
/**
* An object that contains a hub and maintains a scope stack.
* @hidden
*/
export interface Carrier {
__SENTRY__?: {
hub?: Hub;
/**
* Extra Hub properties injected by various SDKs
*/
integrations?: Integration[];
extensions?: {
/** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */
domain?: {
[key: string]: any;
};
} & {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
};
}
/**
* @hidden
* @deprecated Can be removed once `Hub.getActiveDomain` is removed.
*/
export interface DomainAsCarrier extends Carrier {
members: {
[key: string]: any;
}[];
}
/**
* @inheritDoc
*/
export declare class Hub implements HubInterface {
private readonly _version;
/** Is a {@link Layer}[] containing the client and scope */
private readonly _stack;
/** Contains the last event id of a captured event. */
private _lastEventId?;
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
constructor(client?: Client, scope?: Scope, _version?: number);
/**
* @inheritDoc
*/
isOlderThan(version: number): boolean;
/**
* @inheritDoc
*/
bindClient(client?: Client): void;
/**
* @inheritDoc
*/
pushScope(): Scope;
/**
* @inheritDoc
*/
popScope(): boolean;
/**
* @inheritDoc
*/
withScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
getClient<C extends Client>(): C | undefined;
/** Returns the scope of the top stack. */
getScope(): Scope | undefined;
/** Returns the scope stack for domains or the process. */
getStack(): Layer[];
/** Returns the topmost scope layer in the order domain > local > process. */
getStackTop(): Layer;
/**
* @inheritDoc
*/
captureException(exception: any, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureMessage(message: string, level?: Severity, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureEvent(event: Event, hint?: EventHint): string;
/**
* @inheritDoc
*/
lastEventId(): string | undefined;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* @inheritDoc
*/
setUser(user: User | null): void;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): void;
/**
* @inheritDoc
*/
setExtras(extras: Extras): void;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): void;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): void;
/**
* @inheritDoc
*/
setContext(name: string, context: {
[key: string]: any;
} | null): void;
/**
* @inheritDoc
*/
configureScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
run(callback: (hub: Hub) => void): void;
/**
* @inheritDoc
*/
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
/**
* @inheritDoc
*/
startSpan(context: SpanContext): Span;
/**
* @inheritDoc
*/
startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;
/**
* @inheritDoc
*/
traceHeaders(): {
[key: string]: string;
};
/**
* @inheritDoc
*/
captureSession(endSession?: boolean): void;
/**
* @inheritDoc
*/
endSession(): void;
/**
* @inheritDoc
*/
startSession(context?: SessionContext): Session;
/**
* Sends the current Session on the scope
*/
private _sendSessionUpdate;
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
private _invokeClient;
/**
* Calls global extension method and binding current instance to the function call
*/
private _callExtensionMethod;
}
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
export declare function getMainCarrier(): Carrier;
/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
export declare function makeMain(hub: Hub): Hub;
/**
* Returns the default hub instance.
*
* If a hub is already registered in the global carrier but this module
* contains a more recent version, it replaces the registered version.
* Otherwise, the currently registered hub will be returned.
*/
export declare function getCurrentHub(): Hub;
/**
* Returns the active domain, if one exists
* @deprecated No longer used; remove in v7
* @returns The domain, or undefined if there is no active domain
*/
export declare function getActiveDomain(): DomainAsCarrier | undefined;
/**
* This will create a new {@link Hub} and add to the passed object on
* __SENTRY__.hub.
* @param carrier object
* @hidden
*/
export declare function getHubFromCarrier(carrier: Carrier): Hub;
/**
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
* @param carrier object
* @param hub Hub
* @returns A boolean indicating success or failure
*/
export declare function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean;
//# sourceMappingURL=hub.d.ts.map

1
node_modules/@sentry/hub/dist/hub.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/hub.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,GAAG,IAAI,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,IAAI,EACL,MAAM,eAAe,CAAC;AAYvB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,IAAI,CAAC;AAQ7B;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,GAAG,CAAC;QACV;;WAEG;QACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;QAC7B,UAAU,CAAC,EAAE;YACX,+GAA+G;YAE/G,MAAM,CAAC,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAA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EG;IACI,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,WAAW;IAIhH;;OAEG;IACI,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAIhD;;OAEG;IACI,cAAc,CAAC,UAAU,GAAE,OAAe,GAAG,IAAI;IAUxD;;OAEG;IACI,UAAU,IAAI,IAAI;IAezB;;OAEG;IACI,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO;IA+BtD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;;;OAKG;IAEH,OAAO,CAAC,aAAa;IAQrB;;OAEG;IAGH,OAAO,CAAC,oBAAoB;CAQ7B;AAED;;;;;;IAMI;AACJ,wBAAgB,cAAc,IAAI,OAAO,CAOxC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAKtC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAenC;AAED;;;;GAIG;AAEH,wBAAgB,eAAe,IAAI,eAAe,GAAG,SAAS,CAM7D;AAsCD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAKnE"}

525
node_modules/@sentry/hub/dist/hub.js generated vendored Normal file
View File

@@ -0,0 +1,525 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils_1 = require("@sentry/utils");
var flags_1 = require("./flags");
var scope_1 = require("./scope");
var session_1 = require("./session");
/**
* API compatibility version of this hub.
*
* WARNING: This number should only be increased when the global interface
* changes and new methods are introduced.
*
* @hidden
*/
exports.API_VERSION = 4;
/**
* Default maximum number of breadcrumbs added to an event. Can be overwritten
* with {@link Options.maxBreadcrumbs}.
*/
var DEFAULT_BREADCRUMBS = 100;
/**
* @inheritDoc
*/
var Hub = /** @class */ (function () {
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
function Hub(client, scope, _version) {
if (scope === void 0) { scope = new scope_1.Scope(); }
if (_version === void 0) { _version = exports.API_VERSION; }
this._version = _version;
/** Is a {@link Layer}[] containing the client and scope */
this._stack = [{}];
this.getStackTop().scope = scope;
if (client) {
this.bindClient(client);
}
}
/**
* @inheritDoc
*/
Hub.prototype.isOlderThan = function (version) {
return this._version < version;
};
/**
* @inheritDoc
*/
Hub.prototype.bindClient = function (client) {
var top = this.getStackTop();
top.client = client;
if (client && client.setupIntegrations) {
client.setupIntegrations();
}
};
/**
* @inheritDoc
*/
Hub.prototype.pushScope = function () {
// We want to clone the content of prev scope
var scope = scope_1.Scope.clone(this.getScope());
this.getStack().push({
client: this.getClient(),
scope: scope,
});
return scope;
};
/**
* @inheritDoc
*/
Hub.prototype.popScope = function () {
if (this.getStack().length <= 1)
return false;
return !!this.getStack().pop();
};
/**
* @inheritDoc
*/
Hub.prototype.withScope = function (callback) {
var scope = this.pushScope();
try {
callback(scope);
}
finally {
this.popScope();
}
};
/**
* @inheritDoc
*/
Hub.prototype.getClient = function () {
return this.getStackTop().client;
};
/** Returns the scope of the top stack. */
Hub.prototype.getScope = function () {
return this.getStackTop().scope;
};
/** Returns the scope stack for domains or the process. */
Hub.prototype.getStack = function () {
return this._stack;
};
/** Returns the topmost scope layer in the order domain > local > process. */
Hub.prototype.getStackTop = function () {
return this._stack[this._stack.length - 1];
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
Hub.prototype.captureException = function (exception, hint) {
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils_1.uuid4());
var finalHint = hint;
// If there's no explicit hint provided, mimic the same thing that would happen
// in the minimal itself to create a consistent behavior.
// We don't do this in the client, as it's the lowest level API, and doing this,
// would prevent user from having full control over direct calls.
if (!hint) {
var syntheticException = void 0;
try {
throw new Error('Sentry syntheticException');
}
catch (exception) {
syntheticException = exception;
}
finalHint = {
originalException: exception,
syntheticException: syntheticException,
};
}
this._invokeClient('captureException', exception, tslib_1.__assign(tslib_1.__assign({}, finalHint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.captureMessage = function (message, level, hint) {
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils_1.uuid4());
var finalHint = hint;
// If there's no explicit hint provided, mimic the same thing that would happen
// in the minimal itself to create a consistent behavior.
// We don't do this in the client, as it's the lowest level API, and doing this,
// would prevent user from having full control over direct calls.
if (!hint) {
var syntheticException = void 0;
try {
throw new Error(message);
}
catch (exception) {
syntheticException = exception;
}
finalHint = {
originalException: message,
syntheticException: syntheticException,
};
}
this._invokeClient('captureMessage', message, level, tslib_1.__assign(tslib_1.__assign({}, finalHint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.captureEvent = function (event, hint) {
var eventId = hint && hint.event_id ? hint.event_id : utils_1.uuid4();
if (event.type !== 'transaction') {
this._lastEventId = eventId;
}
this._invokeClient('captureEvent', event, tslib_1.__assign(tslib_1.__assign({}, hint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.lastEventId = function () {
return this._lastEventId;
};
/**
* @inheritDoc
*/
Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (!scope || !client)
return;
// eslint-disable-next-line @typescript-eslint/unbound-method
var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;
if (maxBreadcrumbs <= 0)
return;
var timestamp = utils_1.dateTimestampInSeconds();
var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestamp }, breadcrumb);
var finalBreadcrumb = beforeBreadcrumb
? utils_1.consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })
: mergedBreadcrumb;
if (finalBreadcrumb === null)
return;
scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
};
/**
* @inheritDoc
*/
Hub.prototype.setUser = function (user) {
var scope = this.getScope();
if (scope)
scope.setUser(user);
};
/**
* @inheritDoc
*/
Hub.prototype.setTags = function (tags) {
var scope = this.getScope();
if (scope)
scope.setTags(tags);
};
/**
* @inheritDoc
*/
Hub.prototype.setExtras = function (extras) {
var scope = this.getScope();
if (scope)
scope.setExtras(extras);
};
/**
* @inheritDoc
*/
Hub.prototype.setTag = function (key, value) {
var scope = this.getScope();
if (scope)
scope.setTag(key, value);
};
/**
* @inheritDoc
*/
Hub.prototype.setExtra = function (key, extra) {
var scope = this.getScope();
if (scope)
scope.setExtra(key, extra);
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype.setContext = function (name, context) {
var scope = this.getScope();
if (scope)
scope.setContext(name, context);
};
/**
* @inheritDoc
*/
Hub.prototype.configureScope = function (callback) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (scope && client) {
callback(scope);
}
};
/**
* @inheritDoc
*/
Hub.prototype.run = function (callback) {
var oldHub = makeMain(this);
try {
callback(this);
}
finally {
makeMain(oldHub);
}
};
/**
* @inheritDoc
*/
Hub.prototype.getIntegration = function (integration) {
var client = this.getClient();
if (!client)
return null;
try {
return client.getIntegration(integration);
}
catch (_oO) {
flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub");
return null;
}
};
/**
* @inheritDoc
*/
Hub.prototype.startSpan = function (context) {
return this._callExtensionMethod('startSpan', context);
};
/**
* @inheritDoc
*/
Hub.prototype.startTransaction = function (context, customSamplingContext) {
return this._callExtensionMethod('startTransaction', context, customSamplingContext);
};
/**
* @inheritDoc
*/
Hub.prototype.traceHeaders = function () {
return this._callExtensionMethod('traceHeaders');
};
/**
* @inheritDoc
*/
Hub.prototype.captureSession = function (endSession) {
if (endSession === void 0) { endSession = false; }
// both send the update and pull the session from the scope
if (endSession) {
return this.endSession();
}
// only send the update
this._sendSessionUpdate();
};
/**
* @inheritDoc
*/
Hub.prototype.endSession = function () {
var layer = this.getStackTop();
var scope = layer && layer.scope;
var session = scope && scope.getSession();
if (session) {
session.close();
}
this._sendSessionUpdate();
// the session is over; take it off of the scope
if (scope) {
scope.setSession();
}
};
/**
* @inheritDoc
*/
Hub.prototype.startSession = function (context) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;
// Will fetch userAgent if called from browser sdk
var global = utils_1.getGlobalObject();
var userAgent = (global.navigator || {}).userAgent;
var session = new session_1.Session(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ release: release,
environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));
if (scope) {
// End existing session if there's one
var currentSession = scope.getSession && scope.getSession();
if (currentSession && currentSession.status === 'ok') {
currentSession.update({ status: 'exited' });
}
this.endSession();
// Afterwards we set the new session on the scope
scope.setSession(session);
}
return session;
};
/**
* Sends the current Session on the scope
*/
Hub.prototype._sendSessionUpdate = function () {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (!scope)
return;
var session = scope.getSession && scope.getSession();
if (session) {
if (client && client.captureSession) {
client.captureSession(session);
}
}
};
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype._invokeClient = function (method) {
var _a;
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var _b = this.getStackTop(), scope = _b.scope, client = _b.client;
if (client && client[method]) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
(_a = client)[method].apply(_a, tslib_1.__spread(args, [scope]));
}
};
/**
* Calls global extension method and binding current instance to the function call
*/
// @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype._callExtensionMethod = function (method) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var carrier = getMainCarrier();
var sentry = carrier.__SENTRY__;
if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
return sentry.extensions[method].apply(this, args);
}
flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("Extension method " + method + " couldn't be found, doing nothing.");
};
return Hub;
}());
exports.Hub = Hub;
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
function getMainCarrier() {
var carrier = utils_1.getGlobalObject();
carrier.__SENTRY__ = carrier.__SENTRY__ || {
extensions: {},
hub: undefined,
};
return carrier;
}
exports.getMainCarrier = getMainCarrier;
/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
function makeMain(hub) {
var registry = getMainCarrier();
var oldHub = getHubFromCarrier(registry);
setHubOnCarrier(registry, hub);
return oldHub;
}
exports.makeMain = makeMain;
/**
* Returns the default hub instance.
*
* If a hub is already registered in the global carrier but this module
* contains a more recent version, it replaces the registered version.
* Otherwise, the currently registered hub will be returned.
*/
function getCurrentHub() {
// Get main carrier (global for every environment)
var registry = getMainCarrier();
// If there's no hub, or its an old API, assign a new one
if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {
setHubOnCarrier(registry, new Hub());
}
// Prefer domains over global if they are there (applicable only to Node environment)
if (utils_1.isNodeEnv()) {
return getHubFromActiveDomain(registry);
}
// Return hub that lives on a global object
return getHubFromCarrier(registry);
}
exports.getCurrentHub = getCurrentHub;
/**
* Returns the active domain, if one exists
* @deprecated No longer used; remove in v7
* @returns The domain, or undefined if there is no active domain
*/
// eslint-disable-next-line deprecation/deprecation
function getActiveDomain() {
flags_1.IS_DEBUG_BUILD && utils_1.logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
var sentry = getMainCarrier().__SENTRY__;
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
}
exports.getActiveDomain = getActiveDomain;
/**
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
* @returns discovered hub
*/
function getHubFromActiveDomain(registry) {
try {
var sentry = getMainCarrier().__SENTRY__;
var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
// If there's no active domain, just return global hub
if (!activeDomain) {
return getHubFromCarrier(registry);
}
// If there's no hub on current domain, or it's an old API, assign a new one
if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {
var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));
}
// Return hub that lives on a domain
return getHubFromCarrier(activeDomain);
}
catch (_Oo) {
// Return hub that lives on a global object
return getHubFromCarrier(registry);
}
}
/**
* This will tell whether a carrier has a hub on it or not
* @param carrier object
*/
function hasHubOnCarrier(carrier) {
return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
}
/**
* This will create a new {@link Hub} and add to the passed object on
* __SENTRY__.hub.
* @param carrier object
* @hidden
*/
function getHubFromCarrier(carrier) {
return utils_1.getGlobalSingleton('hub', function () { return new Hub(); }, carrier);
}
exports.getHubFromCarrier = getHubFromCarrier;
/**
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
* @param carrier object
* @param hub Hub
* @returns A boolean indicating success or failure
*/
function setHubOnCarrier(carrier, hub) {
if (!carrier)
return false;
var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
__SENTRY__.hub = hub;
return true;
}
exports.setHubOnCarrier = setHubOnCarrier;
//# sourceMappingURL=hub.js.map

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

File diff suppressed because one or more lines are too long

5
node_modules/@sentry/hub/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export { addGlobalEventProcessor, Scope } from './scope';
export { Session } from './session';
export { SessionFlusher } from './sessionflusher';
export { getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier, Carrier, DomainAsCarrier, Layer, } from './hub';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@sentry/hub/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,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,GAAG,EACH,QAAQ,EACR,eAAe,EACf,OAAO,EAEP,eAAe,EACf,KAAK,GACN,MAAM,OAAO,CAAC"}

18
node_modules/@sentry/hub/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
Object.defineProperty(exports, "__esModule", { value: true });
var scope_1 = require("./scope");
exports.addGlobalEventProcessor = scope_1.addGlobalEventProcessor;
exports.Scope = scope_1.Scope;
var session_1 = require("./session");
exports.Session = session_1.Session;
var sessionflusher_1 = require("./sessionflusher");
exports.SessionFlusher = sessionflusher_1.SessionFlusher;
var hub_1 = require("./hub");
// eslint-disable-next-line deprecation/deprecation
exports.getActiveDomain = hub_1.getActiveDomain;
exports.getCurrentHub = hub_1.getCurrentHub;
exports.getHubFromCarrier = hub_1.getHubFromCarrier;
exports.getMainCarrier = hub_1.getMainCarrier;
exports.Hub = hub_1.Hub;
exports.makeMain = hub_1.makeMain;
exports.setHubOnCarrier = hub_1.setHubOnCarrier;
//# sourceMappingURL=index.js.map

1
node_modules/@sentry/hub/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,iCAAyD;AAAhD,0CAAA,uBAAuB,CAAA;AAAE,wBAAA,KAAK,CAAA;AACvC,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,mDAAkD;AAAzC,0CAAA,cAAc,CAAA;AACvB,6BAae;AAZb,mDAAmD;AACnD,gCAAA,eAAe,CAAA;AACf,8BAAA,aAAa,CAAA;AACb,kCAAA,iBAAiB,CAAA;AACjB,+BAAA,cAAc,CAAA;AACd,oBAAA,GAAG,CAAA;AACH,yBAAA,QAAQ,CAAA;AACR,gCAAA,eAAe,CAAA","sourcesContent":["export { addGlobalEventProcessor, Scope } from './scope';\nexport { Session } from './session';\nexport { SessionFlusher } from './sessionflusher';\nexport {\n // eslint-disable-next-line deprecation/deprecation\n getActiveDomain,\n getCurrentHub,\n getHubFromCarrier,\n getMainCarrier,\n Hub,\n makeMain,\n setHubOnCarrier,\n Carrier,\n // eslint-disable-next-line deprecation/deprecation\n DomainAsCarrier,\n Layer,\n} from './hub';\n"]}

184
node_modules/@sentry/hub/dist/scope.d.ts generated vendored Normal file
View File

@@ -0,0 +1,184 @@
import { Breadcrumb, CaptureContext, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, RequestSession, Scope as ScopeInterface, Severity, Span, Transaction, User } from '@sentry/types';
import { Session } from './session';
/**
* Holds additional event information. {@link Scope.applyToEvent} will be
* called by the client before an event will be sent.
*/
export declare class Scope implements ScopeInterface {
/** Flag if notifying is happening. */
protected _notifyingListeners: boolean;
/** Callback for client to receive scope changes. */
protected _scopeListeners: Array<(scope: Scope) => void>;
/** Callback list that will be called after {@link applyToEvent}. */
protected _eventProcessors: EventProcessor[];
/** Array of breadcrumbs. */
protected _breadcrumbs: Breadcrumb[];
/** User */
protected _user: User;
/** Tags */
protected _tags: {
[key: string]: Primitive;
};
/** Extra */
protected _extra: Extras;
/** Contexts */
protected _contexts: Contexts;
/** Fingerprint */
protected _fingerprint?: string[];
/** Severity */
protected _level?: Severity;
/** Transaction Name */
protected _transactionName?: string;
/** Span */
protected _span?: Span;
/** Session */
protected _session?: Session;
/** Request Mode Session Status */
protected _requestSession?: RequestSession;
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
protected _sdkProcessingMetadata?: {
[key: string]: unknown;
};
/**
* Inherit values from the parent scope.
* @param scope to clone.
*/
static clone(scope?: Scope): Scope;
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
addScopeListener(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
addEventProcessor(callback: EventProcessor): this;
/**
* @inheritDoc
*/
setUser(user: User | null): this;
/**
* @inheritDoc
*/
getUser(): User | undefined;
/**
* @inheritDoc
*/
getRequestSession(): RequestSession | undefined;
/**
* @inheritDoc
*/
setRequestSession(requestSession?: RequestSession): this;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): this;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): this;
/**
* @inheritDoc
*/
setExtras(extras: Extras): this;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): this;
/**
* @inheritDoc
*/
setFingerprint(fingerprint: string[]): this;
/**
* @inheritDoc
*/
setLevel(level: Severity): this;
/**
* @inheritDoc
*/
setTransactionName(name?: string): this;
/**
* Can be removed in major version.
* @deprecated in favor of {@link this.setTransactionName}
*/
setTransaction(name?: string): this;
/**
* @inheritDoc
*/
setContext(key: string, context: Context | null): this;
/**
* @inheritDoc
*/
setSpan(span?: Span): this;
/**
* @inheritDoc
*/
getSpan(): Span | undefined;
/**
* @inheritDoc
*/
getTransaction(): Transaction | undefined;
/**
* @inheritDoc
*/
setSession(session?: Session): this;
/**
* @inheritDoc
*/
getSession(): Session | undefined;
/**
* @inheritDoc
*/
update(captureContext?: CaptureContext): this;
/**
* @inheritDoc
*/
clear(): this;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
/**
* @inheritDoc
*/
clearBreadcrumbs(): this;
/**
* Applies the current context and fingerprint to the event.
* Note that breadcrumbs will be added by the client.
* Also if the event has already breadcrumbs on it, we do not merge them.
* @param event Event
* @param hint May contain additional information about the original exception.
* @hidden
*/
applyToEvent(event: Event, hint?: EventHint): PromiseLike<Event | null>;
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
setSDKProcessingMetadata(newData: {
[key: string]: unknown;
}): this;
/**
* This will be called after {@link applyToEvent} is finished.
*/
protected _notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint?: EventHint, index?: number): PromiseLike<Event | null>;
/**
* This will be called on every set call.
*/
protected _notifyScopeListeners(): void;
/**
* Applies fingerprint from the scope to the event if there's one,
* uses message if there's one instead or get rid of empty fingerprint
*/
private _applyFingerprint;
}
/**
* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
*/
export declare function addGlobalEventProcessor(callback: EventProcessor): void;
//# sourceMappingURL=scope.d.ts.map

1
node_modules/@sentry/hub/dist/scope.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/scope.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,KAAK,IAAI,cAAc,EAEvB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACL,MAAM,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IlC;;OAEG;IACI,cAAc,IAAI,WAAW,GAAG,SAAS;IAOhD;;OAEG;IACI,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAU1C;;OAEG;IACI,UAAU,IAAI,OAAO,GAAG,SAAS;IAIxC;;OAEG;IACI,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAiDpD;;OAEG;IACI,KAAK,IAAI,IAAI;IAgBpB;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAkB3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAwC9E;;OAEG;IACI,wBAAwB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI;IAM1E;;OAEG;IACH,SAAS,CAAC,sBAAsB,CAC9B,UAAU,EAAE,cAAc,EAAE,EAC5B,KAAK,EAAE,KAAK,GAAG,IAAI,EACnB,IAAI,CAAC,EAAE,SAAS,EAChB,KAAK,GAAE,MAAU,GAChB,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAoB5B;;OAEG;IACH,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAavC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAkB1B;AASD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"}

443
node_modules/@sentry/hub/dist/scope.js generated vendored Normal file
View File

@@ -0,0 +1,443 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils_1 = require("@sentry/utils");
/**
* Absolute maximum number of breadcrumbs added to an event.
* The `maxBreadcrumbs` option cannot be higher than this value.
*/
var MAX_BREADCRUMBS = 100;
/**
* Holds additional event information. {@link Scope.applyToEvent} will be
* called by the client before an event will be sent.
*/
var Scope = /** @class */ (function () {
function Scope() {
/** Flag if notifying is happening. */
this._notifyingListeners = false;
/** Callback for client to receive scope changes. */
this._scopeListeners = [];
/** Callback list that will be called after {@link applyToEvent}. */
this._eventProcessors = [];
/** Array of breadcrumbs. */
this._breadcrumbs = [];
/** User */
this._user = {};
/** Tags */
this._tags = {};
/** Extra */
this._extra = {};
/** Contexts */
this._contexts = {};
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
this._sdkProcessingMetadata = {};
}
/**
* Inherit values from the parent scope.
* @param scope to clone.
*/
Scope.clone = function (scope) {
var newScope = new Scope();
if (scope) {
newScope._breadcrumbs = tslib_1.__spread(scope._breadcrumbs);
newScope._tags = tslib_1.__assign({}, scope._tags);
newScope._extra = tslib_1.__assign({}, scope._extra);
newScope._contexts = tslib_1.__assign({}, scope._contexts);
newScope._user = scope._user;
newScope._level = scope._level;
newScope._span = scope._span;
newScope._session = scope._session;
newScope._transactionName = scope._transactionName;
newScope._fingerprint = scope._fingerprint;
newScope._eventProcessors = tslib_1.__spread(scope._eventProcessors);
newScope._requestSession = scope._requestSession;
}
return newScope;
};
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
Scope.prototype.addScopeListener = function (callback) {
this._scopeListeners.push(callback);
};
/**
* @inheritDoc
*/
Scope.prototype.addEventProcessor = function (callback) {
this._eventProcessors.push(callback);
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setUser = function (user) {
this._user = user || {};
if (this._session) {
this._session.update({ user: user });
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getUser = function () {
return this._user;
};
/**
* @inheritDoc
*/
Scope.prototype.getRequestSession = function () {
return this._requestSession;
};
/**
* @inheritDoc
*/
Scope.prototype.setRequestSession = function (requestSession) {
this._requestSession = requestSession;
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTags = function (tags) {
this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), tags);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTag = function (key, value) {
var _a;
this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), (_a = {}, _a[key] = value, _a));
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setExtras = function (extras) {
this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), extras);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setExtra = function (key, extra) {
var _a;
this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setFingerprint = function (fingerprint) {
this._fingerprint = fingerprint;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setLevel = function (level) {
this._level = level;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTransactionName = function (name) {
this._transactionName = name;
this._notifyScopeListeners();
return this;
};
/**
* Can be removed in major version.
* @deprecated in favor of {@link this.setTransactionName}
*/
Scope.prototype.setTransaction = function (name) {
return this.setTransactionName(name);
};
/**
* @inheritDoc
*/
Scope.prototype.setContext = function (key, context) {
var _a;
if (context === null) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete this._contexts[key];
}
else {
this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setSpan = function (span) {
this._span = span;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getSpan = function () {
return this._span;
};
/**
* @inheritDoc
*/
Scope.prototype.getTransaction = function () {
// Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
// have a pointer to the currently-active transaction.
var span = this.getSpan();
return span && span.transaction;
};
/**
* @inheritDoc
*/
Scope.prototype.setSession = function (session) {
if (!session) {
delete this._session;
}
else {
this._session = session;
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getSession = function () {
return this._session;
};
/**
* @inheritDoc
*/
Scope.prototype.update = function (captureContext) {
if (!captureContext) {
return this;
}
if (typeof captureContext === 'function') {
var updatedScope = captureContext(this);
return updatedScope instanceof Scope ? updatedScope : this;
}
if (captureContext instanceof Scope) {
this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), captureContext._tags);
this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), captureContext._extra);
this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), captureContext._contexts);
if (captureContext._user && Object.keys(captureContext._user).length) {
this._user = captureContext._user;
}
if (captureContext._level) {
this._level = captureContext._level;
}
if (captureContext._fingerprint) {
this._fingerprint = captureContext._fingerprint;
}
if (captureContext._requestSession) {
this._requestSession = captureContext._requestSession;
}
}
else if (utils_1.isPlainObject(captureContext)) {
// eslint-disable-next-line no-param-reassign
captureContext = captureContext;
this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), captureContext.tags);
this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), captureContext.extra);
this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), captureContext.contexts);
if (captureContext.user) {
this._user = captureContext.user;
}
if (captureContext.level) {
this._level = captureContext.level;
}
if (captureContext.fingerprint) {
this._fingerprint = captureContext.fingerprint;
}
if (captureContext.requestSession) {
this._requestSession = captureContext.requestSession;
}
}
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.clear = function () {
this._breadcrumbs = [];
this._tags = {};
this._extra = {};
this._user = {};
this._contexts = {};
this._level = undefined;
this._transactionName = undefined;
this._fingerprint = undefined;
this._requestSession = undefined;
this._span = undefined;
this._session = undefined;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
// No data has been changed, so don't notify scope listeners
if (maxCrumbs <= 0) {
return this;
}
var mergedBreadcrumb = tslib_1.__assign({ timestamp: utils_1.dateTimestampInSeconds() }, breadcrumb);
this._breadcrumbs = tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.clearBreadcrumbs = function () {
this._breadcrumbs = [];
this._notifyScopeListeners();
return this;
};
/**
* Applies the current context and fingerprint to the event.
* Note that breadcrumbs will be added by the client.
* Also if the event has already breadcrumbs on it, we do not merge them.
* @param event Event
* @param hint May contain additional information about the original exception.
* @hidden
*/
Scope.prototype.applyToEvent = function (event, hint) {
if (this._extra && Object.keys(this._extra).length) {
event.extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), event.extra);
}
if (this._tags && Object.keys(this._tags).length) {
event.tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), event.tags);
}
if (this._user && Object.keys(this._user).length) {
event.user = tslib_1.__assign(tslib_1.__assign({}, this._user), event.user);
}
if (this._contexts && Object.keys(this._contexts).length) {
event.contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), event.contexts);
}
if (this._level) {
event.level = this._level;
}
if (this._transactionName) {
event.transaction = this._transactionName;
}
// We want to set the trace context for normal events only if there isn't already
// a trace context on the event. There is a product feature in place where we link
// errors with transaction and it relies on that.
if (this._span) {
event.contexts = tslib_1.__assign({ trace: this._span.getTraceContext() }, event.contexts);
var transactionName = this._span.transaction && this._span.transaction.name;
if (transactionName) {
event.tags = tslib_1.__assign({ transaction: transactionName }, event.tags);
}
}
this._applyFingerprint(event);
event.breadcrumbs = tslib_1.__spread((event.breadcrumbs || []), this._breadcrumbs);
event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
event.sdkProcessingMetadata = this._sdkProcessingMetadata;
return this._notifyEventProcessors(tslib_1.__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);
};
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
Scope.prototype.setSDKProcessingMetadata = function (newData) {
this._sdkProcessingMetadata = tslib_1.__assign(tslib_1.__assign({}, this._sdkProcessingMetadata), newData);
return this;
};
/**
* This will be called after {@link applyToEvent} is finished.
*/
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
var _this = this;
if (index === void 0) { index = 0; }
return new utils_1.SyncPromise(function (resolve, reject) {
var processor = processors[index];
if (event === null || typeof processor !== 'function') {
resolve(event);
}
else {
var result = processor(tslib_1.__assign({}, event), hint);
if (utils_1.isThenable(result)) {
void result
.then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })
.then(null, reject);
}
else {
void _this._notifyEventProcessors(processors, result, hint, index + 1)
.then(resolve)
.then(null, reject);
}
}
});
};
/**
* This will be called on every set call.
*/
Scope.prototype._notifyScopeListeners = function () {
var _this = this;
// We need this check for this._notifyingListeners to be able to work on scope during updates
// If this check is not here we'll produce endless recursion when something is done with the scope
// during the callback.
if (!this._notifyingListeners) {
this._notifyingListeners = true;
this._scopeListeners.forEach(function (callback) {
callback(_this);
});
this._notifyingListeners = false;
}
};
/**
* Applies fingerprint from the scope to the event if there's one,
* uses message if there's one instead or get rid of empty fingerprint
*/
Scope.prototype._applyFingerprint = function (event) {
// Make sure it's an array first and we actually have something in place
event.fingerprint = event.fingerprint
? Array.isArray(event.fingerprint)
? event.fingerprint
: [event.fingerprint]
: [];
// If we have something on the scope, then merge it with event
if (this._fingerprint) {
event.fingerprint = event.fingerprint.concat(this._fingerprint);
}
// If we have no data at all, remove empty array default
if (event.fingerprint && !event.fingerprint.length) {
delete event.fingerprint;
}
};
return Scope;
}());
exports.Scope = Scope;
/**
* Returns the global event processors.
*/
function getGlobalEventProcessors() {
return utils_1.getGlobalSingleton('globalEventProcessors', function () { return []; });
}
/**
* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
*/
function addGlobalEventProcessor(callback) {
getGlobalEventProcessors().push(callback);
}
exports.addGlobalEventProcessor = addGlobalEventProcessor;
//# sourceMappingURL=scope.js.map

1
node_modules/@sentry/hub/dist/scope.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

42
node_modules/@sentry/hub/dist/session.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';
/**
* @inheritdoc
*/
export declare class Session implements SessionInterface {
userAgent?: string;
errors: number;
release?: string;
sid: string;
did?: string;
timestamp: number;
started: number;
duration?: number;
status: SessionStatus;
environment?: string;
ipAddress?: string;
init: boolean;
ignoreDuration: boolean;
constructor(context?: Omit<SessionContext, 'started' | 'status'>);
/** JSDoc */
update(context?: SessionContext): void;
/** JSDoc */
close(status?: Exclude<SessionStatus, 'ok'>): void;
/** JSDoc */
toJSON(): {
init: boolean;
sid: string;
did?: string;
timestamp: string;
started: string;
duration?: number;
status: SessionStatus;
errors: number;
attrs?: {
release?: string;
environment?: string;
user_agent?: string;
ip_address?: string;
};
};
}
//# sourceMappingURL=session.d.ts.map

1
node_modules/@sentry/hub/dist/session.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3F;;GAEG;AACH,qBAAa,OAAQ,YAAW,gBAAgB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAK;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAW;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAK;IACtB,MAAM,EAAE,aAAa,CAAQ;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,cAAc,EAAE,OAAO,CAAS;gBAEpB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,CAAC;IAUvE,YAAY;IAEL,MAAM,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI;IAwDjD,YAAY;IACL,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;IAUzD,YAAY;IACL,MAAM,IAAI;QACf,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CAmBF"}

115
node_modules/@sentry/hub/dist/session.js generated vendored Normal file
View File

@@ -0,0 +1,115 @@
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("@sentry/utils");
/**
* @inheritdoc
*/
var Session = /** @class */ (function () {
function Session(context) {
this.errors = 0;
this.sid = utils_1.uuid4();
this.duration = 0;
this.status = 'ok';
this.init = true;
this.ignoreDuration = false;
// Both timestamp and started are in seconds since the UNIX epoch.
var startingTime = utils_1.timestampInSeconds();
this.timestamp = startingTime;
this.started = startingTime;
if (context) {
this.update(context);
}
}
/** JSDoc */
// eslint-disable-next-line complexity
Session.prototype.update = function (context) {
if (context === void 0) { context = {}; }
if (context.user) {
if (!this.ipAddress && context.user.ip_address) {
this.ipAddress = context.user.ip_address;
}
if (!this.did && !context.did) {
this.did = context.user.id || context.user.email || context.user.username;
}
}
this.timestamp = context.timestamp || utils_1.timestampInSeconds();
if (context.ignoreDuration) {
this.ignoreDuration = context.ignoreDuration;
}
if (context.sid) {
// Good enough uuid validation. — Kamil
this.sid = context.sid.length === 32 ? context.sid : utils_1.uuid4();
}
if (context.init !== undefined) {
this.init = context.init;
}
if (!this.did && context.did) {
this.did = "" + context.did;
}
if (typeof context.started === 'number') {
this.started = context.started;
}
if (this.ignoreDuration) {
this.duration = undefined;
}
else if (typeof context.duration === 'number') {
this.duration = context.duration;
}
else {
var duration = this.timestamp - this.started;
this.duration = duration >= 0 ? duration : 0;
}
if (context.release) {
this.release = context.release;
}
if (context.environment) {
this.environment = context.environment;
}
if (!this.ipAddress && context.ipAddress) {
this.ipAddress = context.ipAddress;
}
if (!this.userAgent && context.userAgent) {
this.userAgent = context.userAgent;
}
if (typeof context.errors === 'number') {
this.errors = context.errors;
}
if (context.status) {
this.status = context.status;
}
};
/** JSDoc */
Session.prototype.close = function (status) {
if (status) {
this.update({ status: status });
}
else if (this.status === 'ok') {
this.update({ status: 'exited' });
}
else {
this.update();
}
};
/** JSDoc */
Session.prototype.toJSON = function () {
return utils_1.dropUndefinedKeys({
sid: "" + this.sid,
init: this.init,
// Make sure that sec is converted to ms for date constructor
started: new Date(this.started * 1000).toISOString(),
timestamp: new Date(this.timestamp * 1000).toISOString(),
status: this.status,
errors: this.errors,
did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
duration: this.duration,
attrs: {
release: this.release,
environment: this.environment,
ip_address: this.ipAddress,
user_agent: this.userAgent,
},
});
};
return Session;
}());
exports.Session = Session;
//# sourceMappingURL=session.js.map

1
node_modules/@sentry/hub/dist/session.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

38
node_modules/@sentry/hub/dist/sessionflusher.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { SessionAggregates, SessionFlusherLike, Transport } from '@sentry/types';
declare type ReleaseHealthAttributes = {
environment?: string;
release: string;
};
/**
* @inheritdoc
*/
export declare class SessionFlusher implements SessionFlusherLike {
readonly flushTimeout: number;
private _pendingAggregates;
private _sessionAttrs;
private _intervalId;
private _isEnabled;
private _transport;
constructor(transport: Transport, attrs: ReleaseHealthAttributes);
/** Sends session aggregates to Transport */
sendSessionAggregates(sessionAggregates: SessionAggregates): void;
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
flush(): void;
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
getSessionAggregates(): SessionAggregates;
/** JSDoc */
close(): void;
/**
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
* `_incrementSessionStatusCount` along with the start date
*/
incrementSessionStatusCount(): void;
/**
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
* the session received
*/
private _incrementSessionStatusCount;
}
export {};
//# sourceMappingURL=sessionflusher.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sessionflusher.d.ts","sourceRoot":"","sources":["../../src/sessionflusher.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACV,MAAM,eAAe,CAAC;AAMvB,aAAK,uBAAuB,GAAG;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,qBAAa,cAAe,YAAW,kBAAkB;IACvD,SAAgB,YAAY,EAAE,MAAM,CAAM;IAC1C,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,UAAU,CAAY;gBAEX,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,uBAAuB;IAOvE,4CAA4C;IACrC,qBAAqB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI;IAUxE,uGAAuG;IAChG,KAAK,IAAI,IAAI;IASpB,kFAAkF;IAC3E,oBAAoB,IAAI,iBAAiB;IAYhD,YAAY;IACL,KAAK,IAAI,IAAI;IAMpB;;;;OAIG;IACI,2BAA2B,IAAI,IAAI;IAkB1C;;;OAGG;IACH,OAAO,CAAC,4BAA4B;CAwBrC"}

106
node_modules/@sentry/hub/dist/sessionflusher.js generated vendored Normal file
View File

@@ -0,0 +1,106 @@
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("@sentry/utils");
var flags_1 = require("./flags");
var hub_1 = require("./hub");
/**
* @inheritdoc
*/
var SessionFlusher = /** @class */ (function () {
function SessionFlusher(transport, attrs) {
var _this = this;
this.flushTimeout = 60;
this._pendingAggregates = {};
this._isEnabled = true;
this._transport = transport;
// Call to setInterval, so that flush is called every 60 seconds
this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
this._sessionAttrs = attrs;
}
/** Sends session aggregates to Transport */
SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
if (!this._transport.sendSession) {
flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("Dropping session because custom transport doesn't implement sendSession");
return;
}
void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
flags_1.IS_DEBUG_BUILD && utils_1.logger.error('Error while sending session:', reason);
});
};
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
SessionFlusher.prototype.flush = function () {
var sessionAggregates = this.getSessionAggregates();
if (sessionAggregates.aggregates.length === 0) {
return;
}
this._pendingAggregates = {};
this.sendSessionAggregates(sessionAggregates);
};
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
SessionFlusher.prototype.getSessionAggregates = function () {
var _this = this;
var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
return _this._pendingAggregates[parseInt(key)];
});
var sessionAggregates = {
attrs: this._sessionAttrs,
aggregates: aggregates,
};
return utils_1.dropUndefinedKeys(sessionAggregates);
};
/** JSDoc */
SessionFlusher.prototype.close = function () {
clearInterval(this._intervalId);
this._isEnabled = false;
this.flush();
};
/**
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
* `_incrementSessionStatusCount` along with the start date
*/
SessionFlusher.prototype.incrementSessionStatusCount = function () {
if (!this._isEnabled) {
return;
}
var scope = hub_1.getCurrentHub().getScope();
var requestSession = scope && scope.getRequestSession();
if (requestSession && requestSession.status) {
this._incrementSessionStatusCount(requestSession.status, new Date());
// This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
// case captureRequestSession is called more than once to prevent double count
if (scope) {
scope.setRequestSession(undefined);
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
}
};
/**
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
* the session received
*/
SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
// Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
// corresponds to aggregated sessions in one specific minute bucket
// for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
if (!aggregationCounts.started) {
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
}
switch (status) {
case 'errored':
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
return aggregationCounts.errored;
case 'ok':
aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
return aggregationCounts.exited;
default:
aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
return aggregationCounts.crashed;
}
};
return SessionFlusher;
}());
exports.SessionFlusher = SessionFlusher;
//# sourceMappingURL=sessionflusher.js.map

1
node_modules/@sentry/hub/dist/sessionflusher.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

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

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

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

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

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

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

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

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

244
node_modules/@sentry/hub/esm/hub.d.ts generated vendored Normal file
View File

@@ -0,0 +1,244 @@
import { Breadcrumb, BreadcrumbHint, Client, CustomSamplingContext, Event, EventHint, Extra, Extras, Hub as HubInterface, Integration, IntegrationClass, Primitive, SessionContext, Severity, Span, SpanContext, Transaction, TransactionContext, User } from '@sentry/types';
import { Scope } from './scope';
import { Session } from './session';
/**
* API compatibility version of this hub.
*
* WARNING: This number should only be increased when the global interface
* changes and new methods are introduced.
*
* @hidden
*/
export declare const API_VERSION = 4;
/**
* A layer in the process stack.
* @hidden
*/
export interface Layer {
client?: Client;
scope?: Scope;
}
/**
* An object that contains a hub and maintains a scope stack.
* @hidden
*/
export interface Carrier {
__SENTRY__?: {
hub?: Hub;
/**
* Extra Hub properties injected by various SDKs
*/
integrations?: Integration[];
extensions?: {
/** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */
domain?: {
[key: string]: any;
};
} & {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
};
}
/**
* @hidden
* @deprecated Can be removed once `Hub.getActiveDomain` is removed.
*/
export interface DomainAsCarrier extends Carrier {
members: {
[key: string]: any;
}[];
}
/**
* @inheritDoc
*/
export declare class Hub implements HubInterface {
private readonly _version;
/** Is a {@link Layer}[] containing the client and scope */
private readonly _stack;
/** Contains the last event id of a captured event. */
private _lastEventId?;
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
constructor(client?: Client, scope?: Scope, _version?: number);
/**
* @inheritDoc
*/
isOlderThan(version: number): boolean;
/**
* @inheritDoc
*/
bindClient(client?: Client): void;
/**
* @inheritDoc
*/
pushScope(): Scope;
/**
* @inheritDoc
*/
popScope(): boolean;
/**
* @inheritDoc
*/
withScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
getClient<C extends Client>(): C | undefined;
/** Returns the scope of the top stack. */
getScope(): Scope | undefined;
/** Returns the scope stack for domains or the process. */
getStack(): Layer[];
/** Returns the topmost scope layer in the order domain > local > process. */
getStackTop(): Layer;
/**
* @inheritDoc
*/
captureException(exception: any, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureMessage(message: string, level?: Severity, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureEvent(event: Event, hint?: EventHint): string;
/**
* @inheritDoc
*/
lastEventId(): string | undefined;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* @inheritDoc
*/
setUser(user: User | null): void;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): void;
/**
* @inheritDoc
*/
setExtras(extras: Extras): void;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): void;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): void;
/**
* @inheritDoc
*/
setContext(name: string, context: {
[key: string]: any;
} | null): void;
/**
* @inheritDoc
*/
configureScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
run(callback: (hub: Hub) => void): void;
/**
* @inheritDoc
*/
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
/**
* @inheritDoc
*/
startSpan(context: SpanContext): Span;
/**
* @inheritDoc
*/
startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;
/**
* @inheritDoc
*/
traceHeaders(): {
[key: string]: string;
};
/**
* @inheritDoc
*/
captureSession(endSession?: boolean): void;
/**
* @inheritDoc
*/
endSession(): void;
/**
* @inheritDoc
*/
startSession(context?: SessionContext): Session;
/**
* Sends the current Session on the scope
*/
private _sendSessionUpdate;
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
private _invokeClient;
/**
* Calls global extension method and binding current instance to the function call
*/
private _callExtensionMethod;
}
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
export declare function getMainCarrier(): Carrier;
/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
export declare function makeMain(hub: Hub): Hub;
/**
* Returns the default hub instance.
*
* If a hub is already registered in the global carrier but this module
* contains a more recent version, it replaces the registered version.
* Otherwise, the currently registered hub will be returned.
*/
export declare function getCurrentHub(): Hub;
/**
* Returns the active domain, if one exists
* @deprecated No longer used; remove in v7
* @returns The domain, or undefined if there is no active domain
*/
export declare function getActiveDomain(): DomainAsCarrier | undefined;
/**
* This will create a new {@link Hub} and add to the passed object on
* __SENTRY__.hub.
* @param carrier object
* @hidden
*/
export declare function getHubFromCarrier(carrier: Carrier): Hub;
/**
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
* @param carrier object
* @param hub Hub
* @returns A boolean indicating success or failure
*/
export declare function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean;
//# sourceMappingURL=hub.d.ts.map

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

@@ -0,0 +1 @@
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/hub.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,KAAK,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AI,OAAO,CAOxC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAKtC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAenC;AAED;;;;GAIG;AAEH,wBAAgB,eAAe,IAAI,eAAe,GAAG,SAAS,CAM7D;AAsCD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAKnE"}

518
node_modules/@sentry/hub/esm/hub.js generated vendored Normal file
View File

@@ -0,0 +1,518 @@
import { __assign, __read, __spread } from "tslib";
import { consoleSandbox, dateTimestampInSeconds, getGlobalObject, getGlobalSingleton, isNodeEnv, logger, uuid4, } from '@sentry/utils';
import { IS_DEBUG_BUILD } from './flags';
import { Scope } from './scope';
import { Session } from './session';
/**
* API compatibility version of this hub.
*
* WARNING: This number should only be increased when the global interface
* changes and new methods are introduced.
*
* @hidden
*/
export var API_VERSION = 4;
/**
* Default maximum number of breadcrumbs added to an event. Can be overwritten
* with {@link Options.maxBreadcrumbs}.
*/
var DEFAULT_BREADCRUMBS = 100;
/**
* @inheritDoc
*/
var Hub = /** @class */ (function () {
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
function Hub(client, scope, _version) {
if (scope === void 0) { scope = new Scope(); }
if (_version === void 0) { _version = API_VERSION; }
this._version = _version;
/** Is a {@link Layer}[] containing the client and scope */
this._stack = [{}];
this.getStackTop().scope = scope;
if (client) {
this.bindClient(client);
}
}
/**
* @inheritDoc
*/
Hub.prototype.isOlderThan = function (version) {
return this._version < version;
};
/**
* @inheritDoc
*/
Hub.prototype.bindClient = function (client) {
var top = this.getStackTop();
top.client = client;
if (client && client.setupIntegrations) {
client.setupIntegrations();
}
};
/**
* @inheritDoc
*/
Hub.prototype.pushScope = function () {
// We want to clone the content of prev scope
var scope = Scope.clone(this.getScope());
this.getStack().push({
client: this.getClient(),
scope: scope,
});
return scope;
};
/**
* @inheritDoc
*/
Hub.prototype.popScope = function () {
if (this.getStack().length <= 1)
return false;
return !!this.getStack().pop();
};
/**
* @inheritDoc
*/
Hub.prototype.withScope = function (callback) {
var scope = this.pushScope();
try {
callback(scope);
}
finally {
this.popScope();
}
};
/**
* @inheritDoc
*/
Hub.prototype.getClient = function () {
return this.getStackTop().client;
};
/** Returns the scope of the top stack. */
Hub.prototype.getScope = function () {
return this.getStackTop().scope;
};
/** Returns the scope stack for domains or the process. */
Hub.prototype.getStack = function () {
return this._stack;
};
/** Returns the topmost scope layer in the order domain > local > process. */
Hub.prototype.getStackTop = function () {
return this._stack[this._stack.length - 1];
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
Hub.prototype.captureException = function (exception, hint) {
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());
var finalHint = hint;
// If there's no explicit hint provided, mimic the same thing that would happen
// in the minimal itself to create a consistent behavior.
// We don't do this in the client, as it's the lowest level API, and doing this,
// would prevent user from having full control over direct calls.
if (!hint) {
var syntheticException = void 0;
try {
throw new Error('Sentry syntheticException');
}
catch (exception) {
syntheticException = exception;
}
finalHint = {
originalException: exception,
syntheticException: syntheticException,
};
}
this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.captureMessage = function (message, level, hint) {
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());
var finalHint = hint;
// If there's no explicit hint provided, mimic the same thing that would happen
// in the minimal itself to create a consistent behavior.
// We don't do this in the client, as it's the lowest level API, and doing this,
// would prevent user from having full control over direct calls.
if (!hint) {
var syntheticException = void 0;
try {
throw new Error(message);
}
catch (exception) {
syntheticException = exception;
}
finalHint = {
originalException: message,
syntheticException: syntheticException,
};
}
this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.captureEvent = function (event, hint) {
var eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (event.type !== 'transaction') {
this._lastEventId = eventId;
}
this._invokeClient('captureEvent', event, __assign(__assign({}, hint), { event_id: eventId }));
return eventId;
};
/**
* @inheritDoc
*/
Hub.prototype.lastEventId = function () {
return this._lastEventId;
};
/**
* @inheritDoc
*/
Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (!scope || !client)
return;
// eslint-disable-next-line @typescript-eslint/unbound-method
var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;
if (maxBreadcrumbs <= 0)
return;
var timestamp = dateTimestampInSeconds();
var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb);
var finalBreadcrumb = beforeBreadcrumb
? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })
: mergedBreadcrumb;
if (finalBreadcrumb === null)
return;
scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
};
/**
* @inheritDoc
*/
Hub.prototype.setUser = function (user) {
var scope = this.getScope();
if (scope)
scope.setUser(user);
};
/**
* @inheritDoc
*/
Hub.prototype.setTags = function (tags) {
var scope = this.getScope();
if (scope)
scope.setTags(tags);
};
/**
* @inheritDoc
*/
Hub.prototype.setExtras = function (extras) {
var scope = this.getScope();
if (scope)
scope.setExtras(extras);
};
/**
* @inheritDoc
*/
Hub.prototype.setTag = function (key, value) {
var scope = this.getScope();
if (scope)
scope.setTag(key, value);
};
/**
* @inheritDoc
*/
Hub.prototype.setExtra = function (key, extra) {
var scope = this.getScope();
if (scope)
scope.setExtra(key, extra);
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype.setContext = function (name, context) {
var scope = this.getScope();
if (scope)
scope.setContext(name, context);
};
/**
* @inheritDoc
*/
Hub.prototype.configureScope = function (callback) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (scope && client) {
callback(scope);
}
};
/**
* @inheritDoc
*/
Hub.prototype.run = function (callback) {
var oldHub = makeMain(this);
try {
callback(this);
}
finally {
makeMain(oldHub);
}
};
/**
* @inheritDoc
*/
Hub.prototype.getIntegration = function (integration) {
var client = this.getClient();
if (!client)
return null;
try {
return client.getIntegration(integration);
}
catch (_oO) {
IS_DEBUG_BUILD && logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub");
return null;
}
};
/**
* @inheritDoc
*/
Hub.prototype.startSpan = function (context) {
return this._callExtensionMethod('startSpan', context);
};
/**
* @inheritDoc
*/
Hub.prototype.startTransaction = function (context, customSamplingContext) {
return this._callExtensionMethod('startTransaction', context, customSamplingContext);
};
/**
* @inheritDoc
*/
Hub.prototype.traceHeaders = function () {
return this._callExtensionMethod('traceHeaders');
};
/**
* @inheritDoc
*/
Hub.prototype.captureSession = function (endSession) {
if (endSession === void 0) { endSession = false; }
// both send the update and pull the session from the scope
if (endSession) {
return this.endSession();
}
// only send the update
this._sendSessionUpdate();
};
/**
* @inheritDoc
*/
Hub.prototype.endSession = function () {
var layer = this.getStackTop();
var scope = layer && layer.scope;
var session = scope && scope.getSession();
if (session) {
session.close();
}
this._sendSessionUpdate();
// the session is over; take it off of the scope
if (scope) {
scope.setSession();
}
};
/**
* @inheritDoc
*/
Hub.prototype.startSession = function (context) {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;
// Will fetch userAgent if called from browser sdk
var global = getGlobalObject();
var userAgent = (global.navigator || {}).userAgent;
var session = new Session(__assign(__assign(__assign({ release: release,
environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));
if (scope) {
// End existing session if there's one
var currentSession = scope.getSession && scope.getSession();
if (currentSession && currentSession.status === 'ok') {
currentSession.update({ status: 'exited' });
}
this.endSession();
// Afterwards we set the new session on the scope
scope.setSession(session);
}
return session;
};
/**
* Sends the current Session on the scope
*/
Hub.prototype._sendSessionUpdate = function () {
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
if (!scope)
return;
var session = scope.getSession && scope.getSession();
if (session) {
if (client && client.captureSession) {
client.captureSession(session);
}
}
};
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype._invokeClient = function (method) {
var _a;
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var _b = this.getStackTop(), scope = _b.scope, client = _b.client;
if (client && client[method]) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
(_a = client)[method].apply(_a, __spread(args, [scope]));
}
};
/**
* Calls global extension method and binding current instance to the function call
*/
// @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Hub.prototype._callExtensionMethod = function (method) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var carrier = getMainCarrier();
var sentry = carrier.__SENTRY__;
if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
return sentry.extensions[method].apply(this, args);
}
IS_DEBUG_BUILD && logger.warn("Extension method " + method + " couldn't be found, doing nothing.");
};
return Hub;
}());
export { Hub };
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
export function getMainCarrier() {
var carrier = getGlobalObject();
carrier.__SENTRY__ = carrier.__SENTRY__ || {
extensions: {},
hub: undefined,
};
return carrier;
}
/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
export function makeMain(hub) {
var registry = getMainCarrier();
var oldHub = getHubFromCarrier(registry);
setHubOnCarrier(registry, hub);
return oldHub;
}
/**
* Returns the default hub instance.
*
* If a hub is already registered in the global carrier but this module
* contains a more recent version, it replaces the registered version.
* Otherwise, the currently registered hub will be returned.
*/
export function getCurrentHub() {
// Get main carrier (global for every environment)
var registry = getMainCarrier();
// If there's no hub, or its an old API, assign a new one
if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
setHubOnCarrier(registry, new Hub());
}
// Prefer domains over global if they are there (applicable only to Node environment)
if (isNodeEnv()) {
return getHubFromActiveDomain(registry);
}
// Return hub that lives on a global object
return getHubFromCarrier(registry);
}
/**
* Returns the active domain, if one exists
* @deprecated No longer used; remove in v7
* @returns The domain, or undefined if there is no active domain
*/
// eslint-disable-next-line deprecation/deprecation
export function getActiveDomain() {
IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
var sentry = getMainCarrier().__SENTRY__;
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
}
/**
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
* @returns discovered hub
*/
function getHubFromActiveDomain(registry) {
try {
var sentry = getMainCarrier().__SENTRY__;
var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
// If there's no active domain, just return global hub
if (!activeDomain) {
return getHubFromCarrier(registry);
}
// If there's no hub on current domain, or it's an old API, assign a new one
if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));
}
// Return hub that lives on a domain
return getHubFromCarrier(activeDomain);
}
catch (_Oo) {
// Return hub that lives on a global object
return getHubFromCarrier(registry);
}
}
/**
* This will tell whether a carrier has a hub on it or not
* @param carrier object
*/
function hasHubOnCarrier(carrier) {
return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
}
/**
* This will create a new {@link Hub} and add to the passed object on
* __SENTRY__.hub.
* @param carrier object
* @hidden
*/
export function getHubFromCarrier(carrier) {
return getGlobalSingleton('hub', function () { return new Hub(); }, carrier);
}
/**
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
* @param carrier object
* @param hub Hub
* @returns A boolean indicating success or failure
*/
export function setHubOnCarrier(carrier, hub) {
if (!carrier)
return false;
var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
__SENTRY__.hub = hub;
return true;
}
//# sourceMappingURL=hub.js.map

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

File diff suppressed because one or more lines are too long

5
node_modules/@sentry/hub/esm/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export { addGlobalEventProcessor, Scope } from './scope';
export { Session } from './session';
export { SessionFlusher } from './sessionflusher';
export { getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier, Carrier, DomainAsCarrier, Layer, } from './hub';
//# sourceMappingURL=index.d.ts.map

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

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,GAAG,EACH,QAAQ,EACR,eAAe,EACf,OAAO,EAEP,eAAe,EACf,KAAK,GACN,MAAM,OAAO,CAAC"}

7
node_modules/@sentry/hub/esm/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export { addGlobalEventProcessor, Scope } from './scope';
export { Session } from './session';
export { SessionFlusher } from './sessionflusher';
export {
// eslint-disable-next-line deprecation/deprecation
getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier, } from './hub';
//# sourceMappingURL=index.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO;AACL,mDAAmD;AACnD,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,GAAG,EACH,QAAQ,EACR,eAAe,GAKhB,MAAM,OAAO,CAAC","sourcesContent":["export { addGlobalEventProcessor, Scope } from './scope';\nexport { Session } from './session';\nexport { SessionFlusher } from './sessionflusher';\nexport {\n // eslint-disable-next-line deprecation/deprecation\n getActiveDomain,\n getCurrentHub,\n getHubFromCarrier,\n getMainCarrier,\n Hub,\n makeMain,\n setHubOnCarrier,\n Carrier,\n // eslint-disable-next-line deprecation/deprecation\n DomainAsCarrier,\n Layer,\n} from './hub';\n"]}

184
node_modules/@sentry/hub/esm/scope.d.ts generated vendored Normal file
View File

@@ -0,0 +1,184 @@
import { Breadcrumb, CaptureContext, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, RequestSession, Scope as ScopeInterface, Severity, Span, Transaction, User } from '@sentry/types';
import { Session } from './session';
/**
* Holds additional event information. {@link Scope.applyToEvent} will be
* called by the client before an event will be sent.
*/
export declare class Scope implements ScopeInterface {
/** Flag if notifying is happening. */
protected _notifyingListeners: boolean;
/** Callback for client to receive scope changes. */
protected _scopeListeners: Array<(scope: Scope) => void>;
/** Callback list that will be called after {@link applyToEvent}. */
protected _eventProcessors: EventProcessor[];
/** Array of breadcrumbs. */
protected _breadcrumbs: Breadcrumb[];
/** User */
protected _user: User;
/** Tags */
protected _tags: {
[key: string]: Primitive;
};
/** Extra */
protected _extra: Extras;
/** Contexts */
protected _contexts: Contexts;
/** Fingerprint */
protected _fingerprint?: string[];
/** Severity */
protected _level?: Severity;
/** Transaction Name */
protected _transactionName?: string;
/** Span */
protected _span?: Span;
/** Session */
protected _session?: Session;
/** Request Mode Session Status */
protected _requestSession?: RequestSession;
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
protected _sdkProcessingMetadata?: {
[key: string]: unknown;
};
/**
* Inherit values from the parent scope.
* @param scope to clone.
*/
static clone(scope?: Scope): Scope;
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
addScopeListener(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
addEventProcessor(callback: EventProcessor): this;
/**
* @inheritDoc
*/
setUser(user: User | null): this;
/**
* @inheritDoc
*/
getUser(): User | undefined;
/**
* @inheritDoc
*/
getRequestSession(): RequestSession | undefined;
/**
* @inheritDoc
*/
setRequestSession(requestSession?: RequestSession): this;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): this;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): this;
/**
* @inheritDoc
*/
setExtras(extras: Extras): this;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): this;
/**
* @inheritDoc
*/
setFingerprint(fingerprint: string[]): this;
/**
* @inheritDoc
*/
setLevel(level: Severity): this;
/**
* @inheritDoc
*/
setTransactionName(name?: string): this;
/**
* Can be removed in major version.
* @deprecated in favor of {@link this.setTransactionName}
*/
setTransaction(name?: string): this;
/**
* @inheritDoc
*/
setContext(key: string, context: Context | null): this;
/**
* @inheritDoc
*/
setSpan(span?: Span): this;
/**
* @inheritDoc
*/
getSpan(): Span | undefined;
/**
* @inheritDoc
*/
getTransaction(): Transaction | undefined;
/**
* @inheritDoc
*/
setSession(session?: Session): this;
/**
* @inheritDoc
*/
getSession(): Session | undefined;
/**
* @inheritDoc
*/
update(captureContext?: CaptureContext): this;
/**
* @inheritDoc
*/
clear(): this;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
/**
* @inheritDoc
*/
clearBreadcrumbs(): this;
/**
* Applies the current context and fingerprint to the event.
* Note that breadcrumbs will be added by the client.
* Also if the event has already breadcrumbs on it, we do not merge them.
* @param event Event
* @param hint May contain additional information about the original exception.
* @hidden
*/
applyToEvent(event: Event, hint?: EventHint): PromiseLike<Event | null>;
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
setSDKProcessingMetadata(newData: {
[key: string]: unknown;
}): this;
/**
* This will be called after {@link applyToEvent} is finished.
*/
protected _notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint?: EventHint, index?: number): PromiseLike<Event | null>;
/**
* This will be called on every set call.
*/
protected _notifyScopeListeners(): void;
/**
* Applies fingerprint from the scope to the event if there's one,
* uses message if there's one instead or get rid of empty fingerprint
*/
private _applyFingerprint;
}
/**
* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
*/
export declare function addGlobalEventProcessor(callback: EventProcessor): void;
//# sourceMappingURL=scope.d.ts.map

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

@@ -0,0 +1 @@
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/scope.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,K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EAAE,IAAI,GAAG,IAAI;IAMjC;;OAEG;IACI,OAAO,IAAI,IAAI,GAAG,SAAS;IAIlC;;OAEG;IACI,cAAc,IAAI,WAAW,GAAG,SAAS;IAOhD;;OAEG;IACI,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAU1C;;OAEG;IACI,UAAU,IAAI,OAAO,GAAG,SAAS;IAIxC;;OAEG;IACI,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAiDpD;;OAEG;IACI,KAAK,IAAI,IAAI;IAgBpB;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAkB3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAwC9E;;OAEG;IACI,wBAAwB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI;IAM1E;;OAEG;IACH,SAAS,CAAC,sBAAsB,CAC9B,UAAU,EAAE,cAAc,EAAE,EAC5B,KAAK,EAAE,KAAK,GAAG,IAAI,EACnB,IAAI,CAAC,EAAE,SAAS,EAChB,KAAK,GAAE,MAAU,GAChB,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAoB5B;;OAEG;IACH,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAavC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAkB1B;AASD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"}

441
node_modules/@sentry/hub/esm/scope.js generated vendored Normal file
View File

@@ -0,0 +1,441 @@
import { __assign, __read, __spread } from "tslib";
import { dateTimestampInSeconds, getGlobalSingleton, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';
/**
* Absolute maximum number of breadcrumbs added to an event.
* The `maxBreadcrumbs` option cannot be higher than this value.
*/
var MAX_BREADCRUMBS = 100;
/**
* Holds additional event information. {@link Scope.applyToEvent} will be
* called by the client before an event will be sent.
*/
var Scope = /** @class */ (function () {
function Scope() {
/** Flag if notifying is happening. */
this._notifyingListeners = false;
/** Callback for client to receive scope changes. */
this._scopeListeners = [];
/** Callback list that will be called after {@link applyToEvent}. */
this._eventProcessors = [];
/** Array of breadcrumbs. */
this._breadcrumbs = [];
/** User */
this._user = {};
/** Tags */
this._tags = {};
/** Extra */
this._extra = {};
/** Contexts */
this._contexts = {};
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
this._sdkProcessingMetadata = {};
}
/**
* Inherit values from the parent scope.
* @param scope to clone.
*/
Scope.clone = function (scope) {
var newScope = new Scope();
if (scope) {
newScope._breadcrumbs = __spread(scope._breadcrumbs);
newScope._tags = __assign({}, scope._tags);
newScope._extra = __assign({}, scope._extra);
newScope._contexts = __assign({}, scope._contexts);
newScope._user = scope._user;
newScope._level = scope._level;
newScope._span = scope._span;
newScope._session = scope._session;
newScope._transactionName = scope._transactionName;
newScope._fingerprint = scope._fingerprint;
newScope._eventProcessors = __spread(scope._eventProcessors);
newScope._requestSession = scope._requestSession;
}
return newScope;
};
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
Scope.prototype.addScopeListener = function (callback) {
this._scopeListeners.push(callback);
};
/**
* @inheritDoc
*/
Scope.prototype.addEventProcessor = function (callback) {
this._eventProcessors.push(callback);
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setUser = function (user) {
this._user = user || {};
if (this._session) {
this._session.update({ user: user });
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getUser = function () {
return this._user;
};
/**
* @inheritDoc
*/
Scope.prototype.getRequestSession = function () {
return this._requestSession;
};
/**
* @inheritDoc
*/
Scope.prototype.setRequestSession = function (requestSession) {
this._requestSession = requestSession;
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTags = function (tags) {
this._tags = __assign(__assign({}, this._tags), tags);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTag = function (key, value) {
var _a;
this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setExtras = function (extras) {
this._extra = __assign(__assign({}, this._extra), extras);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setExtra = function (key, extra) {
var _a;
this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setFingerprint = function (fingerprint) {
this._fingerprint = fingerprint;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setLevel = function (level) {
this._level = level;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setTransactionName = function (name) {
this._transactionName = name;
this._notifyScopeListeners();
return this;
};
/**
* Can be removed in major version.
* @deprecated in favor of {@link this.setTransactionName}
*/
Scope.prototype.setTransaction = function (name) {
return this.setTransactionName(name);
};
/**
* @inheritDoc
*/
Scope.prototype.setContext = function (key, context) {
var _a;
if (context === null) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete this._contexts[key];
}
else {
this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.setSpan = function (span) {
this._span = span;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getSpan = function () {
return this._span;
};
/**
* @inheritDoc
*/
Scope.prototype.getTransaction = function () {
// Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
// have a pointer to the currently-active transaction.
var span = this.getSpan();
return span && span.transaction;
};
/**
* @inheritDoc
*/
Scope.prototype.setSession = function (session) {
if (!session) {
delete this._session;
}
else {
this._session = session;
}
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.getSession = function () {
return this._session;
};
/**
* @inheritDoc
*/
Scope.prototype.update = function (captureContext) {
if (!captureContext) {
return this;
}
if (typeof captureContext === 'function') {
var updatedScope = captureContext(this);
return updatedScope instanceof Scope ? updatedScope : this;
}
if (captureContext instanceof Scope) {
this._tags = __assign(__assign({}, this._tags), captureContext._tags);
this._extra = __assign(__assign({}, this._extra), captureContext._extra);
this._contexts = __assign(__assign({}, this._contexts), captureContext._contexts);
if (captureContext._user && Object.keys(captureContext._user).length) {
this._user = captureContext._user;
}
if (captureContext._level) {
this._level = captureContext._level;
}
if (captureContext._fingerprint) {
this._fingerprint = captureContext._fingerprint;
}
if (captureContext._requestSession) {
this._requestSession = captureContext._requestSession;
}
}
else if (isPlainObject(captureContext)) {
// eslint-disable-next-line no-param-reassign
captureContext = captureContext;
this._tags = __assign(__assign({}, this._tags), captureContext.tags);
this._extra = __assign(__assign({}, this._extra), captureContext.extra);
this._contexts = __assign(__assign({}, this._contexts), captureContext.contexts);
if (captureContext.user) {
this._user = captureContext.user;
}
if (captureContext.level) {
this._level = captureContext.level;
}
if (captureContext.fingerprint) {
this._fingerprint = captureContext.fingerprint;
}
if (captureContext.requestSession) {
this._requestSession = captureContext.requestSession;
}
}
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.clear = function () {
this._breadcrumbs = [];
this._tags = {};
this._extra = {};
this._user = {};
this._contexts = {};
this._level = undefined;
this._transactionName = undefined;
this._fingerprint = undefined;
this._requestSession = undefined;
this._span = undefined;
this._session = undefined;
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
// No data has been changed, so don't notify scope listeners
if (maxCrumbs <= 0) {
return this;
}
var mergedBreadcrumb = __assign({ timestamp: dateTimestampInSeconds() }, breadcrumb);
this._breadcrumbs = __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);
this._notifyScopeListeners();
return this;
};
/**
* @inheritDoc
*/
Scope.prototype.clearBreadcrumbs = function () {
this._breadcrumbs = [];
this._notifyScopeListeners();
return this;
};
/**
* Applies the current context and fingerprint to the event.
* Note that breadcrumbs will be added by the client.
* Also if the event has already breadcrumbs on it, we do not merge them.
* @param event Event
* @param hint May contain additional information about the original exception.
* @hidden
*/
Scope.prototype.applyToEvent = function (event, hint) {
if (this._extra && Object.keys(this._extra).length) {
event.extra = __assign(__assign({}, this._extra), event.extra);
}
if (this._tags && Object.keys(this._tags).length) {
event.tags = __assign(__assign({}, this._tags), event.tags);
}
if (this._user && Object.keys(this._user).length) {
event.user = __assign(__assign({}, this._user), event.user);
}
if (this._contexts && Object.keys(this._contexts).length) {
event.contexts = __assign(__assign({}, this._contexts), event.contexts);
}
if (this._level) {
event.level = this._level;
}
if (this._transactionName) {
event.transaction = this._transactionName;
}
// We want to set the trace context for normal events only if there isn't already
// a trace context on the event. There is a product feature in place where we link
// errors with transaction and it relies on that.
if (this._span) {
event.contexts = __assign({ trace: this._span.getTraceContext() }, event.contexts);
var transactionName = this._span.transaction && this._span.transaction.name;
if (transactionName) {
event.tags = __assign({ transaction: transactionName }, event.tags);
}
}
this._applyFingerprint(event);
event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);
event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
event.sdkProcessingMetadata = this._sdkProcessingMetadata;
return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);
};
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
Scope.prototype.setSDKProcessingMetadata = function (newData) {
this._sdkProcessingMetadata = __assign(__assign({}, this._sdkProcessingMetadata), newData);
return this;
};
/**
* This will be called after {@link applyToEvent} is finished.
*/
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
var _this = this;
if (index === void 0) { index = 0; }
return new SyncPromise(function (resolve, reject) {
var processor = processors[index];
if (event === null || typeof processor !== 'function') {
resolve(event);
}
else {
var result = processor(__assign({}, event), hint);
if (isThenable(result)) {
void result
.then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })
.then(null, reject);
}
else {
void _this._notifyEventProcessors(processors, result, hint, index + 1)
.then(resolve)
.then(null, reject);
}
}
});
};
/**
* This will be called on every set call.
*/
Scope.prototype._notifyScopeListeners = function () {
var _this = this;
// We need this check for this._notifyingListeners to be able to work on scope during updates
// If this check is not here we'll produce endless recursion when something is done with the scope
// during the callback.
if (!this._notifyingListeners) {
this._notifyingListeners = true;
this._scopeListeners.forEach(function (callback) {
callback(_this);
});
this._notifyingListeners = false;
}
};
/**
* Applies fingerprint from the scope to the event if there's one,
* uses message if there's one instead or get rid of empty fingerprint
*/
Scope.prototype._applyFingerprint = function (event) {
// Make sure it's an array first and we actually have something in place
event.fingerprint = event.fingerprint
? Array.isArray(event.fingerprint)
? event.fingerprint
: [event.fingerprint]
: [];
// If we have something on the scope, then merge it with event
if (this._fingerprint) {
event.fingerprint = event.fingerprint.concat(this._fingerprint);
}
// If we have no data at all, remove empty array default
if (event.fingerprint && !event.fingerprint.length) {
delete event.fingerprint;
}
};
return Scope;
}());
export { Scope };
/**
* Returns the global event processors.
*/
function getGlobalEventProcessors() {
return getGlobalSingleton('globalEventProcessors', function () { return []; });
}
/**
* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
*/
export function addGlobalEventProcessor(callback) {
getGlobalEventProcessors().push(callback);
}
//# sourceMappingURL=scope.js.map

1
node_modules/@sentry/hub/esm/scope.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

42
node_modules/@sentry/hub/esm/session.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';
/**
* @inheritdoc
*/
export declare class Session implements SessionInterface {
userAgent?: string;
errors: number;
release?: string;
sid: string;
did?: string;
timestamp: number;
started: number;
duration?: number;
status: SessionStatus;
environment?: string;
ipAddress?: string;
init: boolean;
ignoreDuration: boolean;
constructor(context?: Omit<SessionContext, 'started' | 'status'>);
/** JSDoc */
update(context?: SessionContext): void;
/** JSDoc */
close(status?: Exclude<SessionStatus, 'ok'>): void;
/** JSDoc */
toJSON(): {
init: boolean;
sid: string;
did?: string;
timestamp: string;
started: string;
duration?: number;
status: SessionStatus;
errors: number;
attrs?: {
release?: string;
environment?: string;
user_agent?: string;
ip_address?: string;
};
};
}
//# sourceMappingURL=session.d.ts.map

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

@@ -0,0 +1 @@
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3F;;GAEG;AACH,qBAAa,OAAQ,YAAW,gBAAgB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAK;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAW;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAK;IACtB,MAAM,EAAE,aAAa,CAAQ;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,cAAc,EAAE,OAAO,CAAS;gBAEpB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,CAAC;IAUvE,YAAY;IAEL,MAAM,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI;IAwDjD,YAAY;IACL,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;IAUzD,YAAY;IACL,MAAM,IAAI;QACf,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CAmBF"}

114
node_modules/@sentry/hub/esm/session.js generated vendored Normal file
View File

@@ -0,0 +1,114 @@
import { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';
/**
* @inheritdoc
*/
var Session = /** @class */ (function () {
function Session(context) {
this.errors = 0;
this.sid = uuid4();
this.duration = 0;
this.status = 'ok';
this.init = true;
this.ignoreDuration = false;
// Both timestamp and started are in seconds since the UNIX epoch.
var startingTime = timestampInSeconds();
this.timestamp = startingTime;
this.started = startingTime;
if (context) {
this.update(context);
}
}
/** JSDoc */
// eslint-disable-next-line complexity
Session.prototype.update = function (context) {
if (context === void 0) { context = {}; }
if (context.user) {
if (!this.ipAddress && context.user.ip_address) {
this.ipAddress = context.user.ip_address;
}
if (!this.did && !context.did) {
this.did = context.user.id || context.user.email || context.user.username;
}
}
this.timestamp = context.timestamp || timestampInSeconds();
if (context.ignoreDuration) {
this.ignoreDuration = context.ignoreDuration;
}
if (context.sid) {
// Good enough uuid validation. — Kamil
this.sid = context.sid.length === 32 ? context.sid : uuid4();
}
if (context.init !== undefined) {
this.init = context.init;
}
if (!this.did && context.did) {
this.did = "" + context.did;
}
if (typeof context.started === 'number') {
this.started = context.started;
}
if (this.ignoreDuration) {
this.duration = undefined;
}
else if (typeof context.duration === 'number') {
this.duration = context.duration;
}
else {
var duration = this.timestamp - this.started;
this.duration = duration >= 0 ? duration : 0;
}
if (context.release) {
this.release = context.release;
}
if (context.environment) {
this.environment = context.environment;
}
if (!this.ipAddress && context.ipAddress) {
this.ipAddress = context.ipAddress;
}
if (!this.userAgent && context.userAgent) {
this.userAgent = context.userAgent;
}
if (typeof context.errors === 'number') {
this.errors = context.errors;
}
if (context.status) {
this.status = context.status;
}
};
/** JSDoc */
Session.prototype.close = function (status) {
if (status) {
this.update({ status: status });
}
else if (this.status === 'ok') {
this.update({ status: 'exited' });
}
else {
this.update();
}
};
/** JSDoc */
Session.prototype.toJSON = function () {
return dropUndefinedKeys({
sid: "" + this.sid,
init: this.init,
// Make sure that sec is converted to ms for date constructor
started: new Date(this.started * 1000).toISOString(),
timestamp: new Date(this.timestamp * 1000).toISOString(),
status: this.status,
errors: this.errors,
did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
duration: this.duration,
attrs: {
release: this.release,
environment: this.environment,
ip_address: this.ipAddress,
user_agent: this.userAgent,
},
});
};
return Session;
}());
export { Session };
//# sourceMappingURL=session.js.map

1
node_modules/@sentry/hub/esm/session.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

38
node_modules/@sentry/hub/esm/sessionflusher.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { SessionAggregates, SessionFlusherLike, Transport } from '@sentry/types';
declare type ReleaseHealthAttributes = {
environment?: string;
release: string;
};
/**
* @inheritdoc
*/
export declare class SessionFlusher implements SessionFlusherLike {
readonly flushTimeout: number;
private _pendingAggregates;
private _sessionAttrs;
private _intervalId;
private _isEnabled;
private _transport;
constructor(transport: Transport, attrs: ReleaseHealthAttributes);
/** Sends session aggregates to Transport */
sendSessionAggregates(sessionAggregates: SessionAggregates): void;
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
flush(): void;
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
getSessionAggregates(): SessionAggregates;
/** JSDoc */
close(): void;
/**
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
* `_incrementSessionStatusCount` along with the start date
*/
incrementSessionStatusCount(): void;
/**
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
* the session received
*/
private _incrementSessionStatusCount;
}
export {};
//# sourceMappingURL=sessionflusher.d.ts.map

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

@@ -0,0 +1 @@
{"version":3,"file":"sessionflusher.d.ts","sourceRoot":"","sources":["../../src/sessionflusher.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACV,MAAM,eAAe,CAAC;AAMvB,aAAK,uBAAuB,GAAG;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,qBAAa,cAAe,YAAW,kBAAkB;IACvD,SAAgB,YAAY,EAAE,MAAM,CAAM;IAC1C,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,UAAU,CAAY;gBAEX,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,uBAAuB;IAOvE,4CAA4C;IACrC,qBAAqB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI;IAUxE,uGAAuG;IAChG,KAAK,IAAI,IAAI;IASpB,kFAAkF;IAC3E,oBAAoB,IAAI,iBAAiB;IAYhD,YAAY;IACL,KAAK,IAAI,IAAI;IAMpB;;;;OAIG;IACI,2BAA2B,IAAI,IAAI;IAkB1C;;;OAGG;IACH,OAAO,CAAC,4BAA4B;CAwBrC"}

105
node_modules/@sentry/hub/esm/sessionflusher.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
import { dropUndefinedKeys, logger } from '@sentry/utils';
import { IS_DEBUG_BUILD } from './flags';
import { getCurrentHub } from './hub';
/**
* @inheritdoc
*/
var SessionFlusher = /** @class */ (function () {
function SessionFlusher(transport, attrs) {
var _this = this;
this.flushTimeout = 60;
this._pendingAggregates = {};
this._isEnabled = true;
this._transport = transport;
// Call to setInterval, so that flush is called every 60 seconds
this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
this._sessionAttrs = attrs;
}
/** Sends session aggregates to Transport */
SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
if (!this._transport.sendSession) {
IS_DEBUG_BUILD && logger.warn("Dropping session because custom transport doesn't implement sendSession");
return;
}
void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);
});
};
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
SessionFlusher.prototype.flush = function () {
var sessionAggregates = this.getSessionAggregates();
if (sessionAggregates.aggregates.length === 0) {
return;
}
this._pendingAggregates = {};
this.sendSessionAggregates(sessionAggregates);
};
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
SessionFlusher.prototype.getSessionAggregates = function () {
var _this = this;
var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
return _this._pendingAggregates[parseInt(key)];
});
var sessionAggregates = {
attrs: this._sessionAttrs,
aggregates: aggregates,
};
return dropUndefinedKeys(sessionAggregates);
};
/** JSDoc */
SessionFlusher.prototype.close = function () {
clearInterval(this._intervalId);
this._isEnabled = false;
this.flush();
};
/**
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
* `_incrementSessionStatusCount` along with the start date
*/
SessionFlusher.prototype.incrementSessionStatusCount = function () {
if (!this._isEnabled) {
return;
}
var scope = getCurrentHub().getScope();
var requestSession = scope && scope.getRequestSession();
if (requestSession && requestSession.status) {
this._incrementSessionStatusCount(requestSession.status, new Date());
// This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
// case captureRequestSession is called more than once to prevent double count
if (scope) {
scope.setRequestSession(undefined);
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
}
};
/**
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
* the session received
*/
SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
// Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
// corresponds to aggregated sessions in one specific minute bucket
// for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
if (!aggregationCounts.started) {
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
}
switch (status) {
case 'errored':
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
return aggregationCounts.errored;
case 'ok':
aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
return aggregationCounts.exited;
default:
aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
return aggregationCounts.crashed;
}
};
return SessionFlusher;
}());
export { SessionFlusher };
//# sourceMappingURL=sessionflusher.js.map

1
node_modules/@sentry/hub/esm/sessionflusher.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

View File

@@ -0,0 +1,12 @@
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

142
node_modules/@sentry/hub/node_modules/tslib/README.md generated vendored Normal file
View File

@@ -0,0 +1,142 @@
# tslib
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 2.3.3 or later
npm install tslib
# TypeScript 2.3.2 or earlier
npm install tslib@1.6.1
```
## yarn
```sh
# TypeScript 2.3.3 or later
yarn add tslib
# TypeScript 2.3.2 or earlier
yarn add tslib@1.6.1
```
## bower
```sh
# TypeScript 2.3.3 or later
bower install tslib
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 2.3.3 or later
jspm install tslib
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
}
}
}
```
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Homepage](http://www.typescriptlang.org/)

View File

@@ -0,0 +1,51 @@
import tslib from '../tslib.js';
const {
__extends,
__assign,
__rest,
__decorate,
__param,
__metadata,
__awaiter,
__generator,
__exportStar,
__createBinding,
__values,
__read,
__spread,
__spreadArrays,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
} = tslib;
export {
__extends,
__assign,
__rest,
__decorate,
__param,
__metadata,
__awaiter,
__generator,
__exportStar,
__createBinding,
__values,
__read,
__spread,
__spreadArrays,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
};

View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@@ -0,0 +1,37 @@
{
"name": "tslib",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "1.14.1",
"license": "0BSD",
"description": "Runtime library for TypeScript helper functions",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tslib.git"
},
"main": "tslib.js",
"module": "tslib.es6.js",
"jsnext:main": "tslib.es6.js",
"typings": "tslib.d.ts",
"sideEffects": false,
"exports": {
".": {
"module": "./tslib.es6.js",
"import": "./modules/index.js",
"default": "./tslib.js"
},
"./": "./"
}
}

View File

@@ -0,0 +1,23 @@
// When on node 14, it validates that all of the commonjs exports
// are correctly re-exported for es modules importers.
const nodeMajor = Number(process.version.split(".")[0].slice(1))
if (nodeMajor < 14) {
console.log("Skipping because node does not support module exports.")
process.exit(0)
}
// ES Modules import via the ./modules folder
import * as esTSLib from "../../modules/index.js"
// Force a commonjs resolve
import { createRequire } from "module";
const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js");
for (const key in commonJSTSLib) {
if (commonJSTSLib.hasOwnProperty(key)) {
if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`)
}
}
console.log("All exports in commonjs are available for es module consumers.")

View File

@@ -0,0 +1,6 @@
{
"type": "module",
"scripts": {
"test": "node index.js"
}
}

37
node_modules/@sentry/hub/node_modules/tslib/tslib.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
export declare function __extends(d: Function, b: Function): void;
export declare function __assign(t: any, ...sources: any[]): any;
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
export declare function __param(paramIndex: number, decorator: Function): Function;
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
export declare function __generator(thisArg: any, body: Function): any;
export declare function __exportStar(m: any, exports: any): void;
export declare function __values(o: any): any;
export declare function __read(o: any, n?: number): any[];
export declare function __spread(...args: any[][]): any[];
export declare function __spreadArrays(...args: any[][]): any[];
export declare function __await(v: any): any;
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
export declare function __asyncDelegator(o: any): any;
export declare function __asyncValues(o: any): any;
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
export declare function __importStar<T>(mod: T): T;
export declare function __importDefault<T>(mod: T): T | { default: T };
export declare function __classPrivateFieldGet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V;
export declare function __classPrivateFieldSet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V;
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;

View File

@@ -0,0 +1 @@
<script src="tslib.es6.js"></script>

View File

@@ -0,0 +1,218 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
export function __createBinding(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}
export function __exportStar(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
}
export function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
export function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
export function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
export function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}

View File

@@ -0,0 +1 @@
<script src="tslib.js"></script>

284
node_modules/@sentry/hub/node_modules/tslib/tslib.js generated vendored Normal file
View File

@@ -0,0 +1,284 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
var __classPrivateFieldGet;
var __classPrivateFieldSet;
var __createBinding;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
__extends = function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__createBinding = function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
};
__exportStar = function (m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
};
__values = function (o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
__spreadArrays = function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
__classPrivateFieldGet = function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
};
__classPrivateFieldSet = function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__createBinding", __createBinding);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__spreadArrays", __spreadArrays);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
});

24
node_modules/@sentry/hub/package.json generated vendored Normal file
View File

@@ -0,0 +1,24 @@
{
"name": "@sentry/hub",
"version": "6.19.7",
"description": "Sentry hub which handles global state managment.",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/hub",
"author": "Sentry",
"license": "BSD-3-Clause",
"engines": {
"node": ">=6"
},
"main": "dist/index.js",
"module": "esm/index.js",
"types": "types/index.d.ts",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "6.19.7",
"@sentry/utils": "6.19.7",
"tslib": "^1.9.3"
},
"sideEffects": false
}

3
node_modules/@sentry/hub/types/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/hub/types/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"}

244
node_modules/@sentry/hub/types/hub.d.ts generated vendored Normal file
View File

@@ -0,0 +1,244 @@
import { Breadcrumb, BreadcrumbHint, Client, CustomSamplingContext, Event, EventHint, Extra, Extras, Hub as HubInterface, Integration, IntegrationClass, Primitive, SessionContext, Severity, Span, SpanContext, Transaction, TransactionContext, User } from '@sentry/types';
import { Scope } from './scope';
import { Session } from './session';
/**
* API compatibility version of this hub.
*
* WARNING: This number should only be increased when the global interface
* changes and new methods are introduced.
*
* @hidden
*/
export declare const API_VERSION = 4;
/**
* A layer in the process stack.
* @hidden
*/
export interface Layer {
client?: Client;
scope?: Scope;
}
/**
* An object that contains a hub and maintains a scope stack.
* @hidden
*/
export interface Carrier {
__SENTRY__?: {
hub?: Hub;
/**
* Extra Hub properties injected by various SDKs
*/
integrations?: Integration[];
extensions?: {
/** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */
domain?: {
[key: string]: any;
};
} & {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
};
}
/**
* @hidden
* @deprecated Can be removed once `Hub.getActiveDomain` is removed.
*/
export interface DomainAsCarrier extends Carrier {
members: {
[key: string]: any;
}[];
}
/**
* @inheritDoc
*/
export declare class Hub implements HubInterface {
private readonly _version;
/** Is a {@link Layer}[] containing the client and scope */
private readonly _stack;
/** Contains the last event id of a captured event. */
private _lastEventId?;
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
constructor(client?: Client, scope?: Scope, _version?: number);
/**
* @inheritDoc
*/
isOlderThan(version: number): boolean;
/**
* @inheritDoc
*/
bindClient(client?: Client): void;
/**
* @inheritDoc
*/
pushScope(): Scope;
/**
* @inheritDoc
*/
popScope(): boolean;
/**
* @inheritDoc
*/
withScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
getClient<C extends Client>(): C | undefined;
/** Returns the scope of the top stack. */
getScope(): Scope | undefined;
/** Returns the scope stack for domains or the process. */
getStack(): Layer[];
/** Returns the topmost scope layer in the order domain > local > process. */
getStackTop(): Layer;
/**
* @inheritDoc
*/
captureException(exception: any, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureMessage(message: string, level?: Severity, hint?: EventHint): string;
/**
* @inheritDoc
*/
captureEvent(event: Event, hint?: EventHint): string;
/**
* @inheritDoc
*/
lastEventId(): string | undefined;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* @inheritDoc
*/
setUser(user: User | null): void;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): void;
/**
* @inheritDoc
*/
setExtras(extras: Extras): void;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): void;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): void;
/**
* @inheritDoc
*/
setContext(name: string, context: {
[key: string]: any;
} | null): void;
/**
* @inheritDoc
*/
configureScope(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
run(callback: (hub: Hub) => void): void;
/**
* @inheritDoc
*/
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
/**
* @inheritDoc
*/
startSpan(context: SpanContext): Span;
/**
* @inheritDoc
*/
startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;
/**
* @inheritDoc
*/
traceHeaders(): {
[key: string]: string;
};
/**
* @inheritDoc
*/
captureSession(endSession?: boolean): void;
/**
* @inheritDoc
*/
endSession(): void;
/**
* @inheritDoc
*/
startSession(context?: SessionContext): Session;
/**
* Sends the current Session on the scope
*/
private _sendSessionUpdate;
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
private _invokeClient;
/**
* Calls global extension method and binding current instance to the function call
*/
private _callExtensionMethod;
}
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
export declare function getMainCarrier(): Carrier;
/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
export declare function makeMain(hub: Hub): Hub;
/**
* Returns the default hub instance.
*
* If a hub is already registered in the global carrier but this module
* contains a more recent version, it replaces the registered version.
* Otherwise, the currently registered hub will be returned.
*/
export declare function getCurrentHub(): Hub;
/**
* Returns the active domain, if one exists
* @deprecated No longer used; remove in v7
* @returns The domain, or undefined if there is no active domain
*/
export declare function getActiveDomain(): DomainAsCarrier | undefined;
/**
* This will create a new {@link Hub} and add to the passed object on
* __SENTRY__.hub.
* @param carrier object
* @hidden
*/
export declare function getHubFromCarrier(carrier: Carrier): Hub;
/**
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
* @param carrier object
* @param hub Hub
* @returns A boolean indicating success or failure
*/
export declare function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean;
//# sourceMappingURL=hub.d.ts.map

1
node_modules/@sentry/hub/types/hub.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/hub.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,GAAG,IAAI,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,IAAI,EACL,MAAM,eAAe,CAAC;AAYvB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;GAOG;A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H,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAKnE"}

5
node_modules/@sentry/hub/types/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export { addGlobalEventProcessor, Scope } from './scope';
export { Session } from './session';
export { SessionFlusher } from './sessionflusher';
export { getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier, Carrier, DomainAsCarrier, Layer, } from './hub';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@sentry/hub/types/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,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,GAAG,EACH,QAAQ,EACR,eAAe,EACf,OAAO,EAEP,eAAe,EACf,KAAK,GACN,MAAM,OAAO,CAAC"}

184
node_modules/@sentry/hub/types/scope.d.ts generated vendored Normal file
View File

@@ -0,0 +1,184 @@
import { Breadcrumb, CaptureContext, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, RequestSession, Scope as ScopeInterface, Severity, Span, Transaction, User } from '@sentry/types';
import { Session } from './session';
/**
* Holds additional event information. {@link Scope.applyToEvent} will be
* called by the client before an event will be sent.
*/
export declare class Scope implements ScopeInterface {
/** Flag if notifying is happening. */
protected _notifyingListeners: boolean;
/** Callback for client to receive scope changes. */
protected _scopeListeners: Array<(scope: Scope) => void>;
/** Callback list that will be called after {@link applyToEvent}. */
protected _eventProcessors: EventProcessor[];
/** Array of breadcrumbs. */
protected _breadcrumbs: Breadcrumb[];
/** User */
protected _user: User;
/** Tags */
protected _tags: {
[key: string]: Primitive;
};
/** Extra */
protected _extra: Extras;
/** Contexts */
protected _contexts: Contexts;
/** Fingerprint */
protected _fingerprint?: string[];
/** Severity */
protected _level?: Severity;
/** Transaction Name */
protected _transactionName?: string;
/** Span */
protected _span?: Span;
/** Session */
protected _session?: Session;
/** Request Mode Session Status */
protected _requestSession?: RequestSession;
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
protected _sdkProcessingMetadata?: {
[key: string]: unknown;
};
/**
* Inherit values from the parent scope.
* @param scope to clone.
*/
static clone(scope?: Scope): Scope;
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
addScopeListener(callback: (scope: Scope) => void): void;
/**
* @inheritDoc
*/
addEventProcessor(callback: EventProcessor): this;
/**
* @inheritDoc
*/
setUser(user: User | null): this;
/**
* @inheritDoc
*/
getUser(): User | undefined;
/**
* @inheritDoc
*/
getRequestSession(): RequestSession | undefined;
/**
* @inheritDoc
*/
setRequestSession(requestSession?: RequestSession): this;
/**
* @inheritDoc
*/
setTags(tags: {
[key: string]: Primitive;
}): this;
/**
* @inheritDoc
*/
setTag(key: string, value: Primitive): this;
/**
* @inheritDoc
*/
setExtras(extras: Extras): this;
/**
* @inheritDoc
*/
setExtra(key: string, extra: Extra): this;
/**
* @inheritDoc
*/
setFingerprint(fingerprint: string[]): this;
/**
* @inheritDoc
*/
setLevel(level: Severity): this;
/**
* @inheritDoc
*/
setTransactionName(name?: string): this;
/**
* Can be removed in major version.
* @deprecated in favor of {@link this.setTransactionName}
*/
setTransaction(name?: string): this;
/**
* @inheritDoc
*/
setContext(key: string, context: Context | null): this;
/**
* @inheritDoc
*/
setSpan(span?: Span): this;
/**
* @inheritDoc
*/
getSpan(): Span | undefined;
/**
* @inheritDoc
*/
getTransaction(): Transaction | undefined;
/**
* @inheritDoc
*/
setSession(session?: Session): this;
/**
* @inheritDoc
*/
getSession(): Session | undefined;
/**
* @inheritDoc
*/
update(captureContext?: CaptureContext): this;
/**
* @inheritDoc
*/
clear(): this;
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
/**
* @inheritDoc
*/
clearBreadcrumbs(): this;
/**
* Applies the current context and fingerprint to the event.
* Note that breadcrumbs will be added by the client.
* Also if the event has already breadcrumbs on it, we do not merge them.
* @param event Event
* @param hint May contain additional information about the original exception.
* @hidden
*/
applyToEvent(event: Event, hint?: EventHint): PromiseLike<Event | null>;
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
setSDKProcessingMetadata(newData: {
[key: string]: unknown;
}): this;
/**
* This will be called after {@link applyToEvent} is finished.
*/
protected _notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint?: EventHint, index?: number): PromiseLike<Event | null>;
/**
* This will be called on every set call.
*/
protected _notifyScopeListeners(): void;
/**
* Applies fingerprint from the scope to the event if there's one,
* uses message if there's one instead or get rid of empty fingerprint
*/
private _applyFingerprint;
}
/**
* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
*/
export declare function addGlobalEventProcessor(callback: EventProcessor): void;
//# sourceMappingURL=scope.d.ts.map

1
node_modules/@sentry/hub/types/scope.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/scope.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,KAAK,IAAI,cAAc,EAEvB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACL,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;;GAGG;AACH,qBAAa,KAAM,YAAW,cAAc;IAC1C,sCAAsC;IACtC,SAAS,CAAC,mBAAmB,EAAE,OA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SAAS;IAIxC;;OAEG;IACI,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAiDpD;;OAEG;IACI,KAAK,IAAI,IAAI;IAgBpB;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAkB3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAwC9E;;OAEG;IACI,wBAAwB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI;IAM1E;;OAEG;IACH,SAAS,CAAC,sBAAsB,CAC9B,UAAU,EAAE,cAAc,EAAE,EAC5B,KAAK,EAAE,KAAK,GAAG,IAAI,EACnB,IAAI,CAAC,EAAE,SAAS,EAChB,KAAK,GAAE,MAAU,GAChB,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAoB5B;;OAEG;IACH,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAavC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAkB1B;AASD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"}

42
node_modules/@sentry/hub/types/session.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';
/**
* @inheritdoc
*/
export declare class Session implements SessionInterface {
userAgent?: string;
errors: number;
release?: string;
sid: string;
did?: string;
timestamp: number;
started: number;
duration?: number;
status: SessionStatus;
environment?: string;
ipAddress?: string;
init: boolean;
ignoreDuration: boolean;
constructor(context?: Omit<SessionContext, 'started' | 'status'>);
/** JSDoc */
update(context?: SessionContext): void;
/** JSDoc */
close(status?: Exclude<SessionStatus, 'ok'>): void;
/** JSDoc */
toJSON(): {
init: boolean;
sid: string;
did?: string;
timestamp: string;
started: string;
duration?: number;
status: SessionStatus;
errors: number;
attrs?: {
release?: string;
environment?: string;
user_agent?: string;
ip_address?: string;
};
};
}
//# sourceMappingURL=session.d.ts.map

1
node_modules/@sentry/hub/types/session.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3F;;GAEG;AACH,qBAAa,OAAQ,YAAW,gBAAgB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAK;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAW;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAK;IACtB,MAAM,EAAE,aAAa,CAAQ;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,cAAc,EAAE,OAAO,CAAS;gBAEpB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,CAAC;IAUvE,YAAY;IAEL,MAAM,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI;IAwDjD,YAAY;IACL,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;IAUzD,YAAY;IACL,MAAM,IAAI;QACf,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CAmBF"}

38
node_modules/@sentry/hub/types/sessionflusher.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { SessionAggregates, SessionFlusherLike, Transport } from '@sentry/types';
declare type ReleaseHealthAttributes = {
environment?: string;
release: string;
};
/**
* @inheritdoc
*/
export declare class SessionFlusher implements SessionFlusherLike {
readonly flushTimeout: number;
private _pendingAggregates;
private _sessionAttrs;
private _intervalId;
private _isEnabled;
private _transport;
constructor(transport: Transport, attrs: ReleaseHealthAttributes);
/** Sends session aggregates to Transport */
sendSessionAggregates(sessionAggregates: SessionAggregates): void;
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
flush(): void;
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
getSessionAggregates(): SessionAggregates;
/** JSDoc */
close(): void;
/**
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
* `_incrementSessionStatusCount` along with the start date
*/
incrementSessionStatusCount(): void;
/**
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
* the session received
*/
private _incrementSessionStatusCount;
}
export {};
//# sourceMappingURL=sessionflusher.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sessionflusher.d.ts","sourceRoot":"","sources":["../../src/sessionflusher.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACV,MAAM,eAAe,CAAC;AAMvB,aAAK,uBAAuB,GAAG;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,qBAAa,cAAe,YAAW,kBAAkB;IACvD,SAAgB,YAAY,EAAE,MAAM,CAAM;IAC1C,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,UAAU,CAAY;gBAEX,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,uBAAuB;IAOvE,4CAA4C;IACrC,qBAAqB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI;IAUxE,uGAAuG;IAChG,KAAK,IAAI,IAAI;IASpB,kFAAkF;IAC3E,oBAAoB,IAAI,iBAAiB;IAYhD,YAAY;IACL,KAAK,IAAI,IAAI;IAMpB;;;;OAIG;IACI,2BAA2B,IAAI,IAAI;IAkB1C;;;OAGG;IACH,OAAO,CAAC,4BAA4B;CAwBrC"}